Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (12265): em28xx: fix tuning problem in HVR-900 (R1)

When the change was introduced in the zl10353 for the i2c gate behavior, this
broke the HVR-900 which was not behind a gate. Use a version of the zl10353
config profile that indicates the tuner is not behind such a gate.

Without this patch the first tune succeeds, but subsequent tuning attempts
will fail.

The change also renames the terratec zl10353 profile I wrote to be more
generic, since it is shared by the non-terratec device.

Thanks to Michael Krufky for providing a HVR-900 and DVB-T environment to test
with.

Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Devin Heitmueller and committed by
Mauro Carvalho Chehab
a84f79ae e16e5a37

+11 -3
+11 -3
drivers/media/video/em28xx/em28xx-dvb.c
··· 245 245 .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK 246 246 }; 247 247 248 - static struct zl10353_config em28xx_terratec_xs_zl10353_xc3028 = { 248 + static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = { 249 249 .demod_address = (0x1e >> 1), 250 250 .no_tuner = 1, 251 251 .disable_i2c_gate_ctrl = 1, ··· 477 477 goto out_free; 478 478 } 479 479 break; 480 - case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 481 480 case EM2880_BOARD_KWORLD_DVB_310U: 482 481 case EM2880_BOARD_EMPIRE_DUAL_TV: 483 482 dvb->frontend = dvb_attach(zl10353_attach, ··· 487 488 goto out_free; 488 489 } 489 490 break; 491 + case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 492 + dvb->frontend = dvb_attach(zl10353_attach, 493 + &em28xx_zl10353_xc3028_no_i2c_gate, 494 + &dev->i2c_adap); 495 + if (attach_xc3028(0x61, dev) < 0) { 496 + result = -EINVAL; 497 + goto out_free; 498 + } 499 + break; 490 500 case EM2880_BOARD_TERRATEC_HYBRID_XS: 491 501 case EM2881_BOARD_PINNACLE_HYBRID_PRO: 492 502 dvb->frontend = dvb_attach(zl10353_attach, 493 - &em28xx_terratec_xs_zl10353_xc3028, 503 + &em28xx_zl10353_xc3028_no_i2c_gate, 494 504 &dev->i2c_adap); 495 505 if (dvb->frontend == NULL) { 496 506 /* This board could have either a zl10353 or a mt352.