mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
hw_demux: txl: add dtmb for txl
PD#169838: hw_demux: txl: add dtmb for txl Change-Id: Ibfdce0f298cfec3e77a1221b975dca8879254604 Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
This commit is contained in:
committed by
Dongjin Kim
parent
6ce9ee378d
commit
68ff3759d7
@@ -38,6 +38,18 @@ static inline struct dvb_frontend* si2159_attach (struct dvb_frontend *fe,struct
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct dvb_frontend* r842_attach (struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr/*,
|
||||
struct r842_config *cfg*/)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct dvb_frontend* r840_attach (struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr/*,
|
||||
struct r840_config *cfg*/)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct dvb_frontend* atbm8881_attach (const struct amlfe_demod_config *config)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
@@ -53,6 +53,8 @@ typedef enum __tuner_type
|
||||
TUNER_SI2151,
|
||||
TUNER_MXL661,
|
||||
TUNER_SI2159,
|
||||
TUNER_R842,
|
||||
TUNER_R840,
|
||||
TUNER_MAX_NUM
|
||||
}tuner_type;
|
||||
|
||||
@@ -1883,6 +1885,22 @@ static int aml_dvb_probe(struct platform_device *pdev)
|
||||
pr_inf("si2159_attach attach sucess\n");
|
||||
s_tuner_type[i] = TUNER_SI2159;
|
||||
}
|
||||
}else if(!strcmp(str,"r842_tuner")) {
|
||||
if (!dvb_attach(r842_attach, frontend[i],i2c_adapter,i2c_addr)) {
|
||||
pr_error("dvb attach r842_attach tuner error\n");
|
||||
goto error_fe;
|
||||
} else {
|
||||
pr_inf("r842_attach attach sucess\n");
|
||||
s_tuner_type[i] = TUNER_R842;
|
||||
}
|
||||
}else if(!strcmp(str,"r840_tuner")) {
|
||||
if (!dvb_attach(r840_attach, frontend[i],i2c_adapter,i2c_addr)) {
|
||||
pr_error("dvb attach r840_attach tuner error\n");
|
||||
goto error_fe;
|
||||
} else {
|
||||
pr_inf("r840_attach attach sucess\n");
|
||||
s_tuner_type[i] = TUNER_R840;
|
||||
}
|
||||
}else {
|
||||
pr_error("can't support tuner type: %s\n",str);
|
||||
}
|
||||
@@ -1996,6 +2014,12 @@ error_fe:
|
||||
}else if (s_tuner_type[i] == TUNER_SI2159) {
|
||||
dvb_detach(si2159_attach);
|
||||
s_tuner_type[i] = TUNER_INVALID;
|
||||
}else if (s_tuner_type[i] == TUNER_R842) {
|
||||
dvb_detach(r842_attach);
|
||||
s_tuner_type[i] = TUNER_INVALID;
|
||||
}else if (s_tuner_type[i] == TUNER_R840) {
|
||||
dvb_detach(r840_attach);
|
||||
s_tuner_type[i] = TUNER_INVALID;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -2040,10 +2064,14 @@ static int aml_dvb_remove(struct platform_device *pdev)
|
||||
dvb_detach(mxl661_attach);
|
||||
}else if (s_tuner_type[i] == TUNER_SI2159) {
|
||||
dvb_detach(si2159_attach);
|
||||
}else if (s_tuner_type[i] == TUNER_R842) {
|
||||
dvb_detach(r842_attach);
|
||||
}else if (s_tuner_type[i] == TUNER_R840) {
|
||||
dvb_detach(r840_attach);
|
||||
}
|
||||
|
||||
if (frontend[i] && \
|
||||
( (s_tuner_type[i] == TUNER_SI2151) || (s_tuner_type[i] == TUNER_MXL661) || (s_tuner_type[i] == TUNER_SI2159) ) \
|
||||
( (s_tuner_type[i] == TUNER_SI2151) || (s_tuner_type[i] == TUNER_MXL661) || (s_tuner_type[i] == TUNER_SI2159) || (s_tuner_type[i] == TUNER_R842) || (s_tuner_type[i] == TUNER_R840)) \
|
||||
)
|
||||
{
|
||||
dvb_unregister_frontend(frontend[i]);
|
||||
|
||||
Reference in New Issue
Block a user