[linux-dvb] RFC - xc5000 init_fw option is broken for HVR-950q

Devin Heitmueller devin.heitmueller at gmail.com
Wed Dec 17 05:29:21 CET 2008


On Tue, Dec 16, 2008 at 11:22 PM, Michael Krufky <mkrufky at linuxtv.org> wrote:
> On Tue, Dec 16, 2008 at 11:06 PM, Michael Krufky <mkrufky at linuxtv.org> wrote:
>> Devin,
>>
>> On Tue, Dec 16, 2008 at 10:31 PM, Devin Heitmueller
>> <devin.heitmueller at gmail.com> wrote:
>>> It looks like because the reset callback is set *after* the
>>> dvb_attach(xc5000...), the if the init_fw option is set the firmware
>>> load will fail (saying "xc5000: no tuner reset callback function,
>>> fatal")
>>>
>>> We need to be setting the callback *before* the dvb_attach() to handle
>>> this case.
>>>
>>> Let me know if anybody sees anything wrong with this proposed patch,
>>> otherwise I will submit a pull request.
>>>
>>> Thanks,
>>>
>>> Devin
>>>
>>> diff -r 95d2c94ec371 linux/drivers/media/video/au0828/au0828-dvb.c
>>> --- a/linux/drivers/media/video/au0828/au0828-dvb.c     Tue Dec 16
>>> 21:35:23 2008 -0500
>>> +++ b/linux/drivers/media/video/au0828/au0828-dvb.c     Tue Dec 16
>>> 22:27:57 2008 -0500
>>> @@ -382,6 +382,9 @@
>>>
>>>        dprintk(1, "%s()\n", __func__);
>>>
>>> +       /* define general-purpose callback pointer */
>>> +       dvb->frontend->callback = au0828_tuner_callback;
>>> +
>>>        /* init frontend */
>>>        switch (dev->board) {
>>>        case AU0828_BOARD_HAUPPAUGE_HVR850:
>>> @@ -431,8 +434,6 @@
>>>                       __func__);
>>>                return -1;
>>>        }
>>> -       /* define general-purpose callback pointer */
>>> -       dvb->frontend->callback = au0828_tuner_callback;
>>>
>>>        /* register everything */
>>>
>>> --
>>> Devin J. Heitmueller
>>> http://www.devinheitmueller.com
>>> AIM: devinheitmueller
>>
>>
>> This patch is fine & correct - Thanks - Please have it merged into master.
>>
>> Acked-by: Michael Krufky <mkrufky at linuxtv.org>
>>
>
> Devin and I  (mostly Devin, actually) just realized that
> "dvb->frontend = NULL until after the demod is attached.  The line
> needs to be between the two dvb_attach() calls."
>
> So, I think we should leave the callback assignment where it is, and
> just get rid of the init_fw parameter for the xc5000 driver.
>
> I added this init_fw option in the first place, and we really dont
> need it there anymore.
>
> -Mike
>

Updated patch attached which removes the init_fw option entirely.

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xc5000_remove_init_fw
Type: application/octet-stream
Size: 1402 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20081216/6e7f49be/attachment.obj 


More information about the linux-dvb mailing list