Re: [linux-audio-user] OSS Emulation and .asoundrc files

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] OSS Emulation and .asoundrc files
From: Clemens Ladisch (clemens_AT_ladisch.de)
Date: Thu Oct 16 2003 - 13:39:09 EEST


Mark Knecht wrote:
> What would be great, if it can be done, is to create a sort of
> 'virtual OSS' device in .asoundrc that only drove specific Alsa playback
> channels, so that Mozilla, for instance, talked to a specific entry in
> .asoundrc and ended up only driving two specific playback channels, like
> playback_22 and playback_23.

        pcm_slave.hdsp {
                pcm "hw:0" # or whatever number it is
                channels 26
        }

        pcm.playback_22_23 {
                type dshare
                slave hdsp
                ipc_key 314159265 # some unique number
                ipc_key_add_uid yes # "no" to let multiple users share it
                bindings {
                        0 22
                        1 23
                }
        }

Now you have a stereo device for channels 22+23, use it like
"aplay -Dplayback_22_23 something.wav". Define some other pcms to be
able to use the other channels at the same time.

To access this from OSS programs, define a pcm named "dsp0":

        pcm.dsp0 {
                type plug
                slave.pcm playback_22_23
        }

and start your OSS program with the aoss script from the alsa-oss
package.

HTH
Clemens


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Oct 16 2003 - 13:40:26 EEST