I'm trying to create an asym default device that uses dmix and dsnoop. An application I'm using keeps on taking exclusive access to an USB microphone and audio-out. I'd also like to pipe my mic to audio-out at the same time, so I need to force the application to use a device that can service multiple processes by creating a default device that allows this (the application tries to open an input and output on the default device first).

Here's the .asoundrc I currently have:

pcm.inout {
  type plug

  slave.pcm {
    type asym

    playback.pcm {
      type dmix

      ipc_key 4323

      slave.pcm: "hw:0,1"

    capture.pcm {
      type dsnoop
      ipc_key 5432
      slave.pcm "hw:1,0"

ctl.inout {
  type hw
  card 0

pcm.!default "inout"
ctl.!defualt "inout"

But, when I run the application, or alsaloop -C default -P default -c 1 -t 50000 I get this:

ALSA lib pcm_direct.c:1524:(_snd_pcm_direct_get_slave_ipc_offset) Invalid type 'dmix' for slave PCM

Also, I see a dmix device is created automatically by ALSA when I run aplay -L, but don't know how to use it. alsaloop -C default -P dmix:0,1 -c 2 -t 50000 doesn't throw any errors, but I don't hear anything through the headphones.

  • 1
    The default default device already uses dmix and dsnoop. Is that application actually using default, or some other device name? – CL. Aug 29 '16 at 10:33
  • Hmm. Before I even started trying to get this to work, I set the default device to hw:0,1 because I wasn't getting any output on the the headphones. – user43704 Aug 29 '16 at 10:59
  • The application uses PyAudio, which seems to try to open the input and output on the default device first, then if that fails, it's starts going through the rest of the devices. But, in my case, I want it to use an input on a USB soundcard (card1, dev0), and output to an integrated headphone jack (card0, dev1). – user43704 Aug 29 '16 at 11:08
  • 2
    did you notice the typo in ctl.!defualt "inout" ? – Jonathan V Dec 5 '16 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.