[mythtv-users] 0.24 no sound with Alsa multi pcm - channels setup problem

Jean-Yves Avenard jyavenard at gmail.com
Wed Nov 17 11:52:32 UTC 2010


On 17 November 2010 08:45, Matt Taylor <mwtaylor at gmail.com> wrote:
> Hi,
>
> I use a custom asound.conf to give me output over optical (for my
> receiver) and analogue simultaneously so that I can have sound in
> another room at the same time, this uses the alsa multi pcm. This setup
> worked fine with 0.23 (and is fine in mplayer, mpd etc.) but with 0.24
> release and 0.24-fixes svn I cannot produce sound using this output. I
> get an error like this one when trying to use ALSA:default:
>
> 2010-11-16 21:12:30.186 Opening ALSA audio device 'default'.
> 2010-11-16 21:12:30.233 ALSA, Error: Channels count 2 not available:
> Invalid argument
> 2010-11-16 21:12:30.233 ALSA, Error: Unable to set ALSA parameters:
> Invalid argument
> 2010-11-16 21:12:30.265 AudioOutput Error: Aborting reconfigure
> 2010-11-16 21:12:30.265 AudioPlayer: Disabling Audio, reason is:
> Aborting reconfigure
>
> If I disable the channel configuring stuff by changing
> mythtv/libs/libmyth/audiooutputalsa.cpp

Actually, use this patch would work too.
Index: libs/libmyth/audiooutputalsa.cpp
===================================================================
--- libs/libmyth/audiooutputalsa.cpp	(revision 27227)
+++ libs/libmyth/audiooutputalsa.cpp	(working copy)
@@ -335,7 +335,7 @@

     QByteArray dev_ba = real_device.toAscii();
     if ((err = snd_pcm_open(&pcm_handle, dev_ba.constData(),
-                            SND_PCM_STREAM_PLAYBACK,
OPEN_FLAGS&FILTER_FLAGS)) < 0)
+                            SND_PCM_STREAM_PLAYBACK, 0)) < 0)
     {
         AERROR(QString("snd_pcm_open(%1)").arg(real_device));
         if (pcm_handle)

I think this is a good solution, we have retrieve all the info we need
by the time we get to that point, so we can let alsa do whatever is
required to open the audio device, including downmixing.

JY


More information about the mythtv-users mailing list