Hi there,

I'm trying to get a multi device working with dmix. Specifically, I'm trying to 
do the following:

My laptop's soundcard (driver: SND_INTEL8X0, compiled into the kernel, version 
2.6.17) has an analogue (hw:0,0) and a digital (hw:0,4) device that use the 
same physical output jack. What I want now is, when I unplug the optical wire, 
the built-in laptop speaker start to work. I successfully achieved this by 
adding:

pcm.multi {
    type multi
    slaves.a.pcm "hw:0,0"
    slaves.a.channels 2
    slaves.b.pcm "hw:0,4"
    slaves.b.channels 2
    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1
}

to /etc/asound.conf file and then play a file by doing:

aplay -D plug:multi some_audio_file.wav

That way, as far as I understand this, it simply plays on both devices 
simultaneously. The laptop mutes the built-in speakers, when something is 
plugged into the audio out jack. Hence, everything works as it should work ( 
i.e. playing audio over the digital device as long as the optical wire is 
connected and on unplugging, the built-in speakers are playing)

So now my question: I want to use the dmix plugin for this configuration, but I 
can only make it work for a single device:

pcm.!default {
        type plug
        slave.pcm "dmixer"
}

pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0,0"
            period_time 0
            period_size 1024
            buffer_size 4096
            rate 44100
        }
        bindings {
            0 0
            1 1
        }
    }

ctl.dmixer {
        type hw
        card 0
}

Unfortunately, I cannot add somthing like: "plug:multi" in the slave section of 
 "pcm.dmixer". When trying to do this, I get:

ALSA lib pcm_dmix.c:867:(snd_pcm_dmix_open) dmix plugin can be only connected 
to hw plugin

Thus, i does not seem to work, BUT: I read in a recent changelog for alsa-lib 
(1.0.10->1.0.11):

- Support multi-card/device for direct plugins

      
      - Support multi-card/device for dmix/dsnoop/dshare plugins
        The unique ipc key is calculated based on card/device/sub index
      
      - Clean up and share the code among all d* plugins

      
      - Refer the defaults.pcm.* configuration
        The base ipc_key number, ipc_gid and ipc_perm are referred.

I understand, that it is now possible to do this sort of thing I'm looking for, 
is that right? And if so, how? I tried hours to make it work, but no success so 
far. The documentation file for asound.rc shipped with alsa-lib is older than 
one year...

Thanks in advance

_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000071


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to