diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/anysee.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/anysee.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index 2f408d2e1ef3..c786359fba03 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c | |||
@@ -41,6 +41,9 @@ | |||
41 | static int dvb_usb_anysee_debug; | 41 | static int dvb_usb_anysee_debug; |
42 | module_param_named(debug, dvb_usb_anysee_debug, int, 0644); | 42 | module_param_named(debug, dvb_usb_anysee_debug, int, 0644); |
43 | MODULE_PARM_DESC(debug, "set debugging level" DVB_USB_DEBUG_STATUS); | 43 | MODULE_PARM_DESC(debug, "set debugging level" DVB_USB_DEBUG_STATUS); |
44 | int dvb_usb_anysee_delsys; | ||
45 | module_param_named(delsys, dvb_usb_anysee_delsys, int, 0644); | ||
46 | MODULE_PARM_DESC(delsys, "select delivery mode (0=DVB-C, 1=DVB-T)"); | ||
44 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | 47 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
45 | 48 | ||
46 | static struct mutex anysee_usb_mutex; | 49 | static struct mutex anysee_usb_mutex; |
@@ -178,14 +181,14 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
178 | inc = 1; | 181 | inc = 1; |
179 | } | 182 | } |
180 | if (ret) | 183 | if (ret) |
181 | return ret; | 184 | break; |
182 | 185 | ||
183 | i += inc; | 186 | i += inc; |
184 | } | 187 | } |
185 | 188 | ||
186 | mutex_unlock(&d->i2c_mutex); | 189 | mutex_unlock(&d->i2c_mutex); |
187 | 190 | ||
188 | return i; | 191 | return ret ? ret : i; |
189 | } | 192 | } |
190 | 193 | ||
191 | static u32 anysee_i2c_func(struct i2c_adapter *adapter) | 194 | static u32 anysee_i2c_func(struct i2c_adapter *adapter) |
@@ -272,9 +275,11 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
272 | model demod hw firmware | 275 | model demod hw firmware |
273 | 1. E30 MT352 02 0.2.1 | 276 | 1. E30 MT352 02 0.2.1 |
274 | 2. E30 ZL10353 02 0.2.1 | 277 | 2. E30 ZL10353 02 0.2.1 |
275 | 3. E30 Plus ZL10353 06 0.1.0 | 278 | 3. E30 Combo ZL10353 0f 0.1.2 DVB-T/C combo |
276 | 4. E30C Plus TDA10023 0a 0.1.0 rev 0.2 | 279 | 4. E30 Plus ZL10353 06 0.1.0 |
277 | 4. E30C Plus TDA10023 0f 0.1.2 rev 0.4 | 280 | 5. E30C Plus TDA10023 0a 0.1.0 rev 0.2 |
281 | E30C Plus TDA10023 0f 0.1.2 rev 0.4 | ||
282 | E30 Combo TDA10023 0f 0.1.2 DVB-T/C combo | ||
278 | */ | 283 | */ |
279 | 284 | ||
280 | /* Zarlink MT352 DVB-T demod inside of Samsung DNOS404ZH102A NIM */ | 285 | /* Zarlink MT352 DVB-T demod inside of Samsung DNOS404ZH102A NIM */ |
@@ -293,6 +298,21 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
293 | return 0; | 298 | return 0; |
294 | } | 299 | } |
295 | 300 | ||
301 | /* for E30 Combo Plus DVB-T demodulator */ | ||
302 | if (dvb_usb_anysee_delsys) { | ||
303 | ret = anysee_write_reg(adap->dev, 0xb0, 0x01); | ||
304 | if (ret) | ||
305 | return ret; | ||
306 | |||
307 | /* Zarlink ZL10353 DVB-T demod */ | ||
308 | adap->fe = dvb_attach(zl10353_attach, &anysee_zl10353_config, | ||
309 | &adap->dev->i2c_adap); | ||
310 | if (adap->fe != NULL) { | ||
311 | state->tuner = DVB_PLL_SAMSUNG_DTOS403IH102A; | ||
312 | return 0; | ||
313 | } | ||
314 | } | ||
315 | |||
296 | /* connect demod on IO port D for TDA10023 & ZL10353 */ | 316 | /* connect demod on IO port D for TDA10023 & ZL10353 */ |
297 | ret = anysee_write_reg(adap->dev, 0xb0, 0x25); | 317 | ret = anysee_write_reg(adap->dev, 0xb0, 0x25); |
298 | if (ret) | 318 | if (ret) |