Commit 3f3b48a0 authored by Abylay Ospan's avatar Abylay Ospan Committed by Mauro Carvalho Chehab

[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: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 6c77161a
This diff is collapsed.
......@@ -40,12 +40,7 @@ struct cxd2841er_config {
extern struct dvb_frontend *cxd2841er_attach_s(struct cxd2841er_config *cfg,
struct i2c_adapter *i2c);
extern struct dvb_frontend *cxd2841er_attach_t(struct cxd2841er_config *cfg,
struct i2c_adapter *i2c);
extern struct dvb_frontend *cxd2841er_attach_c(struct cxd2841er_config *cfg,
struct i2c_adapter *i2c);
extern struct dvb_frontend *cxd2841er_attach_i(struct cxd2841er_config *cfg,
extern struct dvb_frontend *cxd2841er_attach_t_c(struct cxd2841er_config *cfg,
struct i2c_adapter *i2c);
#else
static inline struct dvb_frontend *cxd2841er_attach_s(
......@@ -56,21 +51,7 @@ static inline struct dvb_frontend *cxd2841er_attach_s(
return NULL;
}
static inline struct dvb_frontend *cxd2841er_attach_t(
struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
{
pr_warn("%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
static inline struct dvb_frontend *cxd2841er_attach_c(
struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
{
pr_warn("%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
static inline struct dvb_frontend *cxd2841er_attach_i(
static inline struct dvb_frontend *cxd2841er_attach_t_c(
struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
{
pr_warn("%s: driver disabled by Kconfig\n", __func__);
......
......@@ -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;
}
......@@ -490,55 +487,6 @@ static int netup_unidvb_dvb_init(struct netup_unidvb_dev *ndev,
helene_conf.set_tuner_priv = &ndev->dma[num];
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__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment