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

Matt Taylor mwtaylor at gmail.com
Wed Nov 17 22:28:38 UTC 2010


Thanks for your help, I've tried the first solution you suggested:
#define FILTER_FLAGS ~(SND_PCM_NO_AUTO_FORMAT|SND_PCM_NO_AUTO_CHANNELS)

this works with no problems I can see.

I had a brief try with the second suggestion but didn't get it to work
(same error as before when starting to watch something). I was doing it
against the fixes branch, should I be trying against trunk? I can have
another go with this tomorrow and see if I can get a bit more time to do
it properly.

Cheers,
Matt

On Wed, 2010-11-17 at 22:52 +1100, Jean-Yves Avenard wrote:
> 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
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users




More information about the mythtv-users mailing list