[alsa-devel] open sound device from asound.conf

Peter Lukac p.lukac at emtest.sk
Fri Jul 23 11:12:24 CEST 2010

hello all
maybe trivial question...

I want open sound device from /etc/asound.conf with API
snd_pcm_open() but unsuccessfull. As name i'm used:

i'm try alternative name with "hw:X,Y"
but in this method i'm open only HW device.
I'm get follow error:
ALSA lib pcm_hw.c:1429:(_snd_pcm_hw_open) Invalid value for card 

how can i open my "virtual" device in asound.conf

here is asound.conf:

pcm.!default {
        type plug
        slave.pcm "output"

pcm.output {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        channels 2
        rate 44100
        format S16_LE

pcm.dsp0 {
    type plug
    slave.pcm "output"

...exists some universal method how can i open all HW device and "virtual" 


More information about the Alsa-devel mailing list