@@ -493,7 +493,7 @@ static int af9015_copy_firmware(struct dvb_usb_device *d)
/* wait 2nd demodulator ready */
msleep(100);
- ret = af9015_read_reg_i2c(d, 0x3a, 0x98be, &val);
+ ret = af9015_read_reg_i2c(d, af9015_af9013_config[1].demod_address, 0x98be, &val);
if (ret)
goto error;
else
@@ -913,8 +913,13 @@ static int af9015_read_config(struct usb_device *udev)
ret = af9015_rw_udev(udev, &req);
if (ret)
goto error;
- af9015_af9013_config[1].demod_address = val;
+ if (val != AF9015_I2C_DEMOD)
+ af9015_af9013_config[1].demod_address = val;
+ else
+ af9015_config.dual_mode = 0;
+ }
+ if (af9015_config.dual_mode) {
/* enable 2nd adapter */
for (i = 0; i < af9015_properties_count; i++)
af9015_properties[i].num_adapters = 2;
@@ -1023,11 +1028,6 @@ error:
if (le16_to_cpu(udev->descriptor.idVendor) == USB_VID_AVERMEDIA &&
le16_to_cpu(udev->descriptor.idProduct) == USB_PID_AVERMEDIA_A850) {
deb_info("%s: AverMedia A850: overriding config\n", __func__);
- /* disable dual mode */
- af9015_config.dual_mode = 0;
- /* disable 2nd adapter */
- for (i = 0; i < af9015_properties_count; i++)
- af9015_properties[i].num_adapters = 1;
/* set correct IF */
af9015_af9013_config[0].tuner_if = 4570;