[mythtv-users] 0.24RC1 and audio

Jean-Yves Avenard jyavenard at gmail.com
Sat Oct 23 10:16:46 UTC 2010


Hi

On 23 October 2010 20:56, Greg Oliver <oliver.greg at gmail.com> wrote:
> I was playing a bit more last night since this audio normalization was
> interesting to me as well.  Here is what I found on the net.  It works
> from all of the command line players I tried.  The simplest:

I found the origin of the problem.

By default, when you open an alsa audio device, alsa will resample,
convert audio format and automatically select the number of channels
required.

As we want myth to perform the audio processing, we asked alsa to no
resample, not convert the audio format automatically and to use the
number of channels requested.
That way we can later query alsa to find out precisely what audio
format the hardware support, how many channels and what sampling rate.

With this particular plug device, when you open the audio device that
way, it later fails when trying to retrieve the configuration , alsa
return the error "Invalid argument" in a function not taking any
arguments..

Quite frustrating...

Need to find a work-around...
Right now, you can do:
in mythtv/libs/libmyth/audiooutputalsa.cpp

change the line:

#define OPEN_FLAGS SND_PCM_NO_AUTO_RESAMPLE|SND_PCM_NO_AUTO_FORMAT|\
                   SND_PCM_NO_AUTO_CHANNELS

into:

#define OPEN_FLAGS SND_PCM_NO_AUTO_RESAMPLE|\
                   SND_PCM_NO_AUTO_CHANNELS


More information about the mythtv-users mailing list