multi-mono-channel sound card

Ruslan Bukin br at bsdpad.com
Sun Jan 22 16:38:31 UTC 2012


Hi,

On Sat, Jan 21, 2012 at 05:46:16PM +0200, Alexander Motin wrote:
> On 01/21/12 16:12, Ruslan Bukin wrote:
> >My multichannel sound card (RME HDSPe AIO) is support
> >SND_FORMAT(AFMT_S32_LE, 1, 0) only.
> >
> >I call pcm_addchan(..), which triggers chan_init(..,*snd_dbuf,..)
> >Addr of snd_dbuf I write to card in slot N.
> >In result I have /dev/dsp0.pN devices (one device per each mono channel)
> >
> >Works perfectly, sounds great, but in mono mode.
> >
> >I'm interested, what is the right way to implement
> >stereo pair of channels per one device file like in OSS?
> 
> pcm_addchan() registers set of equal playback/record channels that
> are supposed to be mixed into the same signal. It is hardware
> equivalent of vchans. It has nothing common with multiple speakers.
> 
> Multichannel audio is always multiplexed and AFAIk there is no
> demultiplexing in sound(4). Sound(4) can upmix/downmix channels,
> change their order, format, rate, but not demultiplex.
> 
> I see only two ways:
>  - implement demultiplexing in driver -- that is not easy, but I
> believe it should be possible;
>  - export each input/output connector as separate PCM device and let
> some user level software to do demultiplexing -- that is easy and
> that is what snd_emu10kx does. snd_emu10kx(4) recommends to use
> pulseaudio for demultiplexing.

Thanks. I have implemented demultiplexing. Works great.
I will release the driver soon.

-Ruslan

> 
> -- 
> Alexander Motin


More information about the freebsd-multimedia mailing list