Dear Devin and Mauro,

we have some problems with "Terratec Prodigy (DVBT) USB" and "Pinnacle Hybrid 
Pro Stick (320e)"
since the patch shown below: when the patch is applied, we are not able to tune 
any digital
channels any more using the driver from mcentral.de/hg/~mrec/em28xx-new .

Could you please explain a little bit in more detail (or give us a reference 
where it is described)
what the functions ops.i2c_gate_ctrl() and ops.tuner_ops.sleep() supposed to do?

Regards,

        Márton Németh

Waldemar Brodkorb wrote:
> Németh Márton wrote,
>>
>> I have investigated this problem and tried the following kernel versions:
>>
>> 2.6.27  good
>> 2.6.28-rc2      good
>> 2.6.28-rc4      good
>> 2.6.28-rc5      bad
>>
>> So it seems that some change(s) between 2.6.28-rc4 and 2.6.28-rc5 broke the 
>> digital channel tuning.
> 
> Yes, you are right. These two lines break the channel tuning:
> 
> diff -Nur linux-2.6.28-rc4/drivers/media/dvb/dvb-core/dvb_frontend.c 
> linux-2.6.28-rc5/drivers/media/dvb/dvb-core/dvb_frontend.c
> --- linux-2.6.28-rc4/drivers/media/dvb/dvb-core/dvb_frontend.c  2008-11-10 
> 01:36:15.000000000 +0100
> +++ linux-2.6.28-rc5/drivers/media/dvb/dvb-core/dvb_frontend.c  2008-11-15 
> 22:42:56.000000000 +0100
> @@ -223,6 +223,8 @@
>         if (fe->ops.init)
>                 fe->ops.init(fe);
>         if (fe->ops.tuner_ops.init) {
> +               if (fe->ops.i2c_gate_ctrl)
> +                       fe->ops.i2c_gate_ctrl(fe, 1);
>                 fe->ops.tuner_ops.init(fe);
>                 if (fe->ops.i2c_gate_ctrl)
>                         fe->ops.i2c_gate_ctrl(fe, 0);
> 
> If I recompile my 2.6.28 kernel without these two lines, everything works 
> fine.
> 
> Who understands why this breaks the em28xx-new modules and probably not the
> included drivers.

I found the patch at
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=41286d972530b7a47acb48376d714b6b121a6c22

Here is the description:
> From: Devin Heitmueller <devin.heitmuel...@gmail.com>
> Date: Sun, 16 Nov 2008 03:44:52 +0000 (-0300)
> Subject: V4L/DVB (9634): Make sure the i2c gate is open before powering down 
> tuner
>
> V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner
>
> It is not safe to assume that the i2c gate will be open before issuing the
> command to power down the tuner.  In fact, many demods only open the gate
> long enough to issue the tuning command.
>
> This fix allows power management to work properly for those tuners behind an
> i2c gate (in my case the problem was with the HVR-950Q)
>
> Signed-off-by: Devin Heitmueller <devin.heitmuel...@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>
> ---
>
> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c 
> b/drivers/media/dvb/dvb-core/dvb_frontend.c
> index b38cebe..7a421e9 100644
> --- a/drivers/media/dvb/dvb-core/dvb_frontend.c
> +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
> @@ -585,6 +585,8 @@ restart:
>               if (fe->ops.set_voltage)
>                       fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);
>               if (fe->ops.tuner_ops.sleep) {
> +                     if (fe->ops.i2c_gate_ctrl)
> +                             fe->ops.i2c_gate_ctrl(fe, 1);
>                       fe->ops.tuner_ops.sleep(fe);
>                       if (fe->ops.i2c_gate_ctrl)
>                               fe->ops.i2c_gate_ctrl(fe, 0);



_______________________________________________
Em28xx mailing list
Em28xx@mcentral.de
http://mcentral.de/mailman/listinfo/em28xx

Reply via email to