[alsa-devel] [HELP] snd-aloop with dmix?

Santo Chow santo_chow at yahoo.com
Thu Jun 4 05:51:36 CEST 2009


HI all,

I'm trying to use snd-aloop as my default soundard. I have the .asoundrc that look like this.

pcm.sndcard{
    type hw
    card 1        #snd-aloop soundcard
    device 0
}

pcm.dmixer {
    type dmix
    ipc_key 1025
    ipc_perm 0660
    slave {
        pcm sndcard
        period_time 0
        period_size 881
        buffer_size 3524
        rate 44100
    }

    bindings {
               0 0
               1 1
       }
}

pcm.dsnooper {
    type dsnoop
    ipc_key 1026
    ipc_perm 0660
    slave {
        pcm sndcard
        period_time 0
        period_size 881
        buffer_size 3524
        rate 44100
    }

    bindings {
               0 0
               1 1
       }

}

pcm.duplexasym {
    type asym
    playback.pcm "dmixer"   # playback
    capture.pcm "dsnooper"  # capture
}

pcm.!default {
    type plug
    slave {
        pcm duplexasym
    }
}

ctl.duplex {
    type hw
    card 1
}

Right now my problem is, i can only get 1 sound from an application at a time. I can't run several applications at the same time and recorded all the sounds.

This is what I did :

My default sound card is indexed at 0, so the snd-aloop will be at index 1. To test this, I first run an MP3 player. Then I run this in terminal:

arecord -D hw:1,1 -f cd | aplay -D hw:0 -f cd

The sound come out good.

Then when I open a browser, go to youtube and play a song over there, the sound won't come out. I have to first close the browser and the currently playing MP3 player, then re-open a browser, go to youtube, and play a song, the sound will come out.

So, my question is.. is there something missing in my .asoundrc file? can the snd-aloop support multiple playbacks and captures at the same time? is there a way for me to achieve this?


      


More information about the Alsa-devel mailing list