[mythtv] Ticket locking and a PulseAudio fix
jyavenard at gmail.com
Tue May 10 02:35:39 UTC 2011
On 10 May 2011 06:06, James Le Cuirot <chewi at aura-online.co.uk> wrote:
> My main reason for commenting was to say I was going to look into it
> because I got the impression that you weren't going to. In retrospect,
I can't think of a single part in MythTV that isn't actively
maintained when bugs are reported.
All devs; while all benevolent and having many other things on their
plate have shown much dedication in troubleshooting and fixing
reported issue. Have a browse on the IRC channel and see how buzzing
All those issues are unfortunate because it prevents working on real new stuff.
> The last time I had tried the ALSA driver with PulseAudio, it was
> horribly out of sync. Despite what you'd said, I didn't think that the
> problems I'd had had been fixed. I later found out that they had.
I using ALSA:pulse was bad; I wouldn't have suggested it. Lots of work
has been done to improve A/V sync
I don't know why Pulse is causing so much grievance ; and I can
honestly I've spent hundreds of hours on the issue and it never gets
The blast of static is puzzling as people are only reporting this in
myth. Having said that, I'm now 100% convince the problem is with
Using master; I can consistently reproduce the static crap in the
audio test screen under the following circumstances:
- Audio hardware only supports 48kHz; with pulse running at 44.1kHz
(default). Feed Pulse 44.1kHz audio: you get static or channel
completely out of whack (when it should do left, right, left, right,
the test does right, right, left, right, right)
Why do I say it is pulse?
If I use the pulse's OSS compatibility layer (so I use /dev/dsp) ;
under the above conditions you get exactly the same kind of static and
The OSS code has been in myth for years; it's very stable (being so
simple) ; yet when pulse is running you get channel corruption and
static. Change the pulse sampling rate or disable pulse and all is
So not even using Myth's native pulse code ; I can consistently
reproduces the problem so long as pulse is running and has taken over
the audio system.
The work around I found to minimise the problem so far:
- Use ALSA:pulse ; the resampling is done within ALSA and doesn't
suffer the same problem as when done within myth
- Change pulse default resampling to 48000Hz
- If mainly watching 48kHz content, disable myth resampler as feeding
44.1kHz of audio to pulse lead to corruption
> I didn't want to cause any upset and I'm sorry if I have. To this
> casual outsider, it looked as though users were being unfairly silenced
> and it was starting to bother me. This is a lesson learnt.
It was late, I hadn't slept, I had spent a good part of the week-end
troubleshooting this issue and I couldn't reproduce it myself. I had
missed that silly if (pause) return line.
Yes, corking the audio when pausing would be more appropriate. However
the core audio is in use for many different kind of platforms and the
choice was made to make as much code as possible common to all parts.
Corking like what pulse does isn't available everywhere; so playing
silence (00s) is the best compromise. Why pulse start playing static
from a stream of 00s: you tell me.
More information about the mythtv-dev