summaryrefslogtreecommitdiff
path: root/drivers/media/pci/netup_unidvb
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2016-05-14 00:08:40 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-06-07 12:16:37 -0300
commit3f3b48a0c6caba3b1a16a79d6a75a6ea4eac6b9c (patch)
treeea84466b66190941b0dc6abeb925a2a094d92fd9 /drivers/media/pci/netup_unidvb
parent6c77161a18baa506bd5343c98764789146b72b7a (diff)
[media] Change frontend allocation strategy for NetUP Universal DVB cards
Old behaviour: frontend0 - DVB-S/S2 frontend1 - DVB-T/T2 frontend2 - DVB-C frontend3 - ISDB-T New behaviour (DVBv5 API compliant): frontend0 - DVB-S/S2 frontend1 - DVB-T/T2/C/ISDB-T DTV standard should be selected by DTV_DELIVERY_SYSTEM call. And DVB-C default bandwidth now 8MHz Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/netup_unidvb')
-rw-r--r--drivers/media/pci/netup_unidvb/netup_unidvb_core.c66
1 files changed, 7 insertions, 59 deletions
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 950092344eb3..d278d4e151a0 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -385,18 +385,15 @@ static int netup_unidvb_queue_init(struct netup_dma *dma,
static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
int num)
{
- int fe_count = 0;
+ int fe_count = 2;
int i = 0;
- struct vb2_dvb_frontend *fes[4];
+ struct vb2_dvb_frontend *fes[2];
u8 fe_name[32];
- if (ndev->rev == NETUP_HW_REV_1_3) {
- fe_count = 3;
+ if (ndev->rev == NETUP_HW_REV_1_3)
demod_config.xtal = SONY_XTAL_20500;
- } else {
- fe_count = 4;
+ else
demod_config.xtal = SONY_XTAL_24000;
- }
if (num < 0 || num > 1) {
dev_dbg(&ndev->pci_dev->dev,
@@ -469,11 +466,11 @@ static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
}
/* DVB-T/T2 frontend */
- fes[1]->dvb.frontend = dvb_attach(cxd2841er_attach_t,
+ fes[1]->dvb.frontend = dvb_attach(cxd2841er_attach_t_c,
&demod_config, &ndev->i2c[num].adap);
if (fes[1]->dvb.frontend == NULL) {
dev_dbg(&ndev->pci_dev->dev,
- "%s(): unable to attach DVB-T frontend\n", __func__);
+ "%s(): unable to attach Ter frontend\n", __func__);
goto frontend_detach;
}
fes[1]->dvb.frontend->id = 1;
@@ -482,7 +479,7 @@ static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
if (!dvb_attach(ascot2e_attach, fes[1]->dvb.frontend,
&ascot2e_conf, &ndev->i2c[num].adap)) {
dev_dbg(&ndev->pci_dev->dev,
- "%s(): unable to attach DVB-T tuner frontend\n",
+ "%s(): unable to attach Ter tuner frontend\n",
__func__);
goto frontend_detach;
}
@@ -491,55 +488,6 @@ static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
if (!dvb_attach(helene_attach, fes[1]->dvb.frontend,
&helene_conf, &ndev->i2c[num].adap)) {
dev_err(&ndev->pci_dev->dev,
- "%s(): unable to attach HELENE DVB-T/T2 tuner frontend\n",
- __func__);
- goto frontend_detach;
- }
- }
-
- /* DVB-C/C2 frontend */
- fes[2]->dvb.frontend = dvb_attach(cxd2841er_attach_c,
- &demod_config, &ndev->i2c[num].adap);
- if (fes[2]->dvb.frontend == NULL) {
- dev_dbg(&ndev->pci_dev->dev,
- "%s(): unable to attach DVB-C frontend\n", __func__);
- goto frontend_detach;
- }
- fes[2]->dvb.frontend->id = 2;
- if (ndev->rev == NETUP_HW_REV_1_3) {
- if (!dvb_attach(ascot2e_attach, fes[2]->dvb.frontend,
- &ascot2e_conf, &ndev->i2c[num].adap)) {
- dev_dbg(&ndev->pci_dev->dev,
- "%s(): unable to attach DVB-T/C tuner frontend\n",
- __func__);
- goto frontend_detach;
- }
- } else {
- helene_conf.set_tuner_priv = &ndev->dma[num];
- if (!dvb_attach(helene_attach, fes[2]->dvb.frontend,
- &helene_conf, &ndev->i2c[num].adap)) {
- dev_err(&ndev->pci_dev->dev,
- "%s(): unable to attach HELENE Ter tuner frontend\n",
- __func__);
- goto frontend_detach;
- }
- }
-
- if (ndev->rev == NETUP_HW_REV_1_4) {
- /* ISDB-T frontend */
- fes[3]->dvb.frontend = dvb_attach(cxd2841er_attach_i,
- &demod_config, &ndev->i2c[num].adap);
- if (fes[3]->dvb.frontend == NULL) {
- dev_dbg(&ndev->pci_dev->dev,
- "%s(): unable to attach ISDB-T frontend\n",
- __func__);
- goto frontend_detach;
- }
- fes[3]->dvb.frontend->id = 3;
- helene_conf.set_tuner_priv = &ndev->dma[num];
- if (!dvb_attach(helene_attach, fes[3]->dvb.frontend,
- &helene_conf, &ndev->i2c[num].adap)) {
- dev_err(&ndev->pci_dev->dev,
"%s(): unable to attach HELENE Ter tuner frontend\n",
__func__);
goto frontend_detach;