MythTV Backend fails to record audio, due to PulseAudio
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mythtv (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mythtv
I have my MythTV backend set up to record audio directly from an ALSA device provided by my capture card. Most attempts to record produce the following errors in mythbackend.log:
2010-09-08 11:42:36.208 AudioInALSA(tuner) Error: pcm open failed: Device or resource busy
2010-09-08 11:42:36.401 NVR(/dev/
2010-09-08 11:42:36.459 NVR(/dev/
I have determined that this is due pulse's support for re-routing ALSA access to the pulseaudio daemon. This behavior doesn't make much sense for the MythTV backend, since pulseaudio is a user-level daemon by default and mythbackend is system-wide and should work even when no users are logged in. Therefore it's best to bypass pulseaudio in mythbackend. The environment variable PULSE_INTERNAL can do that.
If mythbackend is started with PULSE_INTERNAL=1 in its environment, the problem goes away and it records sound successfully every time.
What I'm doing right now is I edited /etc/init/
exec /usr/bin/
with
script
PULSE_
end script
bless you! Although I don't really understand what's going on here, I can confirm the problem and the workaround.
You're my hero! I was running MythTV on Ubuntu 10.4 with OSS for 2 years, but did not get the beast to work with ALSA until right now.