More tvtime audio work…

I spent the last couple of nights continuing work on tvtime’s audio support. I’m able to playback the audio from the capture device, but I am having problems with underruns. It has actually ended up being a non-trivial exercise delivering audio from a tuner to the sound card with less than 30ms of latency (required to maintain lipsync).

The work uncovered a bug in the em28xx-audio module, which Douglas Landgraf volunteered to investigate while I stay focused on tvtime (I sent him code demonstrating the problem last night). I’m also seeing a case on the HVR-950q where there’s a roughly 1/4 chance that starting audio streaming locks up the video capture, which is *bad*. It’s not clear to my how the two could be related, but I will have to dig into it further.

I’m still looking forward to getting a release out to testers, but at this rate it looks pretty unlikely that I will make my original target, which was the end of the week.

2 thoughts on “More tvtime audio work…

    • I had not taken the time to nail down the actual cause, but it appears that if the period time is less than 30000, you get memory corruption and a panic.

      Probably a race in the locking code for the buffer pool (perhaps exacerbated by lots of snd_prepare calls coming in due to underrun conditions).

      I suspect most people never see it because they use sox or aplay, which has nearly 500ms of buffering (which results in a loss of lipsync but also never results in underruns).


Leave a Reply