2

On a Beagleboard, I need it to play sound from several processes.

The default /etc/asound.conf is empty, so I put this dmix example in.

Now sund mixes fine, but when I'm trying to run a process that uses a microphone, I'm getting "(snd_pcm_dmix_open) The dmix plugin supports only playback stream".

What do I fix in the configuration to make software mixing and microphone work?

2 Answers2

1

The CL answer (while not being too verbose and not providing example) is right; if you want to also use microphone while using dmix, you need to use asym too.

Example configuration allowing both dmix and microphone access might look like this:

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

    bindings {
        0 0
        1 1
    }
}

pcm.asymed {
        type asym
        playback.pcm "dmixer"
        capture.pcm "hw:0,0"
}



pcm.dsp0 {
    type plug
    slave.pcm "asymed"
}

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

pcm.default {
   type plug
   slave.pcm "asymed"
}

ctl.mixer0 {
    type hw
    card 0
}

or whatever your configuration is, you want your default not be to dmixer but asym (and have that pcm.asymed block with defines separate playback [your old dmixer and capture devices)

Matija Nalis
  • 2,721
1

The dmix plugin works only for playback devices.

To be able to have a device that uses dmix for playback and does something else for capturing, you have to use the asym plugin to define different plugins for playback/capture.

CL.
  • 1,673