[alsa-devel] How to define card specific pcm devices?

Raymond Yau superquad.vortex2 at gmail.com
Sat Aug 18 03:26:29 CEST 2012


2012-8-17 下午10:51 於 "Tanu Kaskinen" <tanu.kaskinen at digia.com> 寫道:
>
> Ping?
>
> If card specific pcm definitions are not possible, would it be
> acceptable to have a generic "front_left:CARD" or "first_channel:CARD"
> pcm, which would transform "front:CARD" or "hw:CARD" into a mono device?

As pulseaudio server use SND_PCM_NO_AUTO_CHANNEL which diable channel
conversion, this left channel device only work with other alsa applications
except pulseaudio when your sound card does not support mono.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=ff4af902cf4ac07c5f1da3b6dacbb3195c7c222d

the solution is to change the mixing in pulseaudio by using left channel
for this mic and those stereo mic with inverted phase , and average for
mono playback device . stereo mic and line-in

how about the 4 channel mic?

>
> -- Tanu
>
>
> On Fri, 2012-08-10 at 14:25 +0300, Tanu Kaskinen wrote:
> > Hi,
> >
> > I'm writing UCM configuration for RX-51 (Nokia N900), and I have a
> > problem: "hw:RX51" can't be opened in mono mode, but there's only one
> > integrated mono microphone, and its audio is routed to the left input
> > channel. Applications will get only silence in the right channel when
> > they use "hw:RX51".
> >
> > The best solution that I have come up is to define a pcm that converts
> > "hw:RX51" into a mono device. The problem is that I don't know how
> > exactly to do that. I guess the route plugin can be used for that:
> >
> > pcm.rx51_mono_from_left {
> >         type route
> >         slave.pcm hw:RX51
> >         slave.channels 2
> >         ttable.0.0 1
> > }
> >
> > I tried putting that definition in /usr/share/alsa/cards/RX-51.conf (and
> > also RX51.conf, since it's not entirely clear to me when the dash should
> > be omitted). I have this in the UCM configuration:
> >
> > Value {
> >         CapturePCM "rx51_mono_from_left"
> >         CaptureChannels "1"
> > }
> >
> > This is printed to the PulseAudio log:
> >
> > (alsa-lib)pcm.c: Unknown PCM rx51_mono_from_left
> >
> > So the rx51_mono_from_left definition is not loaded. I'm not terribly
> > surprised: I guess the card configuration files are loaded only when
> > necessary, and when PulseAudio tries to open "rx51_mono_from_left",
> > alsa-lib can't really know that it's somehow related to the RX-51 card.
> >
> > How should I solve this?
> >
>
>


More information about the Alsa-devel mailing list