[mythtv] [mythtv-commits] Ticket #3304: Problem switching hybrid card from digital to analog

Daniel Kristjansson danielk at cuymedia.net
Fri Apr 13 13:54:44 UTC 2007

On Fri, 2007-04-13 at 13:29 +0000, MythTV wrote:
> #3304: Problem switching hybrid card from digital to analog
> ---------------------------------------------+------------------------------
>  Reporter:  Ed Windes <ed+myth at winlund.com>  |       Owner:  ijr    
>      Type:  defect                           |      Status:  new    
>  Priority:  major                            |   Milestone:  unknown
> Component:  mythtv                           |     Version:  head   
>  Severity:  medium                           |  
> ---------------------------------------------+------------------------------
>  I'm using an ATSC110 (saa7134) hybrid digital/analog card.  When I switch
>  from a digital channel to an analog one, I see the video/audio from the
>  new analog channel, but after 1-2 seconds something happens to the tuner,
>  and the picture goes to static.
>  After some hacking around, it appears that there's some delayed effect
>  after closing the DVB device that interferes with the v4l analog device.
>  I found a crude hack to work around the problem:  I added a 5 second sleep
>  in libs/libmythtv/tv_rec.cpp in TVRec::TuningShutdowns()  (in the block
>  with the "handle HW change" comment, after the close/delete of the old
>  device, and before the CreateChannel() call for the new one.)
>  Any ideas what may be going on?  This seems like a problem in either  the
>  v4l driver or the hardware itself, but I'm not sure it's fixable there.  I
>  suppose it would be cleaner to add a delay when the DVB device is closed.

Have you tried playing with the dvb driver's timeouts?
In particular "dvb_shutdown_timeout" ?

This feature was added after I initially added hybrid support
for the DVB cards. It freaks out the hardware a few seconds
after we stop using the DVB side of the card. What is really
needed is some coordination between the analog and digital
drivers for the card. Last I checked hybrid cards are officially
unsupported by the DVB/V4L drivers and you are supposed to
unload one set of drivers and load the other set whenever
you switch from one modulation to the other. I'm hoping that
now that there are hybrid cards in Europe and the projects
have been combined one of the DVB/V4L devs will fix the problem.

BTW We already have a freakout check in the analog portion
of MythTV. On line 1454 in NuppelVideoRecorder we retune
if we get a EIO on a VIDIOC_DQBUF ioctl. This works for the
pcHDTV cards, but your card may be throwing a different error
when this happens. Can you check for "DQBUF ioctl failed" in
your logs after this happens and see if the error message on
the next line gives you anything useful?

-- Daniel

More information about the mythtv-dev mailing list