[mythtv-users] v4l - one last try....

Yan Seiner yan at seiner.com
Wed Feb 1 15:01:16 UTC 2006


Chad wrote:

>On 1/31/06, Yan Seiner <yan at seiner.com> wrote:
>  
>
>>Nick Rout wrote:
>>
>>    
>>
>>>To answer your earlier question, there IS a setting somewhere im
>>>mythsetup that allows you to call an external program for channel
>>>changing, I assume this would then make mythtv leave your card alone and
>>>use the external program (which you would have to write i guess)
>>>
>>>
>>>
>>>      
>>>
>>The only one I found is in mythtv-setup - and it only seems to get
>>called when mythv first sets the channel at the start of the live tv
>>session.  After that, myth changes the channel itself...
>>
>>--Yan
>>
>>_______________________________________________
>>    
>>
>
>
>I think it's probably more of an understanding error than a
>system/RPM/distro error.
>
>I'll do my best to break down what I do to get my el-cheapo BTTV's
>from wrapper to capturing content for mythtv playback:
>
>Step one, open package ;)  Just kidding
>
>Ok, So I usually start with TV-Time to see that things actually work,
>narrowing my brain burning to myth setup.  So, make sure in TV-Time
>you can tune all the channels you *think* you should be able to
>(whatever your TV channels are), and that there is audio, and you can
>change channels up and down.  If you can't do that, skip to the bottom
>of this reply and see "troubleshooting"  If it does, then continue on
>next.
>
>So I can switch channels, see video and hear audio, great.  Now to
>convince MythTV I can do the same thing.  First thing, make sure no
>backend is running on that box:
>killall mythbackend
>Then, fire up mythtv-setup, and I, for lack of confidence in my
>method, go through every section there just to make sure things are
>how I want them.  So, in General, go through the screens and check
>each setting is correct.  I believe you said you are using a rooftop
>antenna, so us-bcast should be your selection for your frequency (use
>the arrow button to cycle, don't type in settings unless you have to
>for any choices).  Then move onto capture card.  Make sure you are
>inputing the correct card there.  Should just be a V4L card, probably
>/dev/video0, /dev/dsp, and whatever for vbi, probably vbi0.  Default
>Input should be Television.
>
>Move onto the next section and setup a Program Lineup (usually through
>Zap2It for us North Americans).  Associate the program lineup
>(whatever you named it) with the card you have setup (this pair up is
>VERY important).
>
>>From there you can probably exit.  Then, run: mythfilldatabase  Wait a
>while and let it run til it's finished.  Then fire up mythbackend,
>don't daemonize it or anything, run it straight from a command prompt.
> Fire up a second terminal and launch mythfrontend, again, let the
>data scroll out in the command prompt (gives you some feedback for
>troubleshooting).
>
>Don't go to Watch TV, instead go to Setup, and re-configure everything
>related to TV.  Recording Profiles should be setup, I go into General
>and make sure all my settings are just how I want.  Once you done
>tinkering back then, go back and choose Watch TV or setup a small
>manual recording (2 or 3 minutes) come back when it's done and try to
>play it back.  Then play with Live TV from there.
>  
>
OK, I've done all that.  A bunch of times.....

Since xawtv works, and myth hangs, I've been watching the log files....

Here's what happens when I change a channel (not every time, but often):

xawtv:

Feb  1 06:45:25 tooth kernel: bttv0: timeout: drop=283 irq=18815/18816, 
risc=09fb8194, bits: HSYNC FDSR
Feb  1 06:45:25 tooth kernel: bttv0: reset, reinitialize
Feb  1 06:45:25 tooth kernel: bttv0: PLL can sleep, using XTAL (28636363).

mythtv:

Feb  1 06:41:51 tooth kernel: bttv0: timeout: drop=178 irq=4299/4300, 
risc=1a73f074, bits: HSYNC OFLOW FDSR
hang....

For some reason, xawtv picks up on the timeout, whereas myth just hangs 
waiting for a card that needs to be reset...

xawtv also spits out this error, while myth is silent:

ioctl: VIDIOC_DQBUF(index=0;type=VIDEO_CAPTURE;bytesused=0;flags=0x0 
[];field=ANY;;timecode.type=0;timecode.flags=0;timecode.frames=0;timecode.seconds=0;timecode.minutes=0;timecode.hours=0;timecode.userbits="";sequence=0;memory=unknown): 
Input/output error

Myth backend actually does say (some 30 seconds after the timeout)

2006-02-01 06:42:26.254 Couldn't read data from the capture card in 15 
seconds. Stopping.

Afete which the backend seems to go on as usual, except it will no 
longer respond to frontends at all for anything.  (this is what leads me 
to believe it's not in my config; myth should not just keel over if I 
have the wrong channel.... It's not that I can't watch TV, it's that I 
have to restart the backend every time I try to change the channel....)

Just as a guess, it seems that myth is ignoring an ioctl return code 
somewhere in the handling of the video stream....  I'll try to track 
that down, but c++  ain't exactly my strong suit.

I've fiddled with PCI IRQs and latencies, thinking maybe it's a latency 
issue, but no joy...  This happens with both kernel 2.6.11 and 2.6.15...

I think I may just install the tuner cards in one of my frontends, and 
see if I can get it work there...

--Yan



More information about the mythtv-users mailing list