Skip to contentSkip to conversation

dmix - unable to open slave

DISCUSSION Nenad Sljivic 2 participants 2 messages Oct 24, 2011 – Oct 26, 2011 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I posted the same questions on alsa-user group, but no one could help me, so I might have more luck here.

I am trying to enable a software mixer on an MIPS based embedded target board using alsa-lib v1.0.23.

When I try to play two audio files using these commands:

#aplay -vDplug:dmix song1.wav &
#aplay -vDplug:dmix song2.wav

mixing works fine.

For some strange reason when I try the same thing using the "nenad_dmix" device I am getting the following error:

ALSA lib pcm_dmix.c:1068:(snd_pcm_dmix_open) unable to open slave
aplay: main:654: audio open error: Invalid argument

The error occurs while trying to open device for the second time (song2.wav playback). At the same time, song1.wav plays fine.

The content of my .asoundrc is given bellow:

pcm.nenad_dmix {
type plug
slave.pcm "dmixer"
}

pcm.dmixer  {
        type dmix
        ipc_key 1024
        ipc_key_add_uid false
        ipc_perm 0666
        slave {
    pcm "hw:0,0"
    period_time 0
    period_size 3840
    buffer_size 15360
    rate 48000
    }
}

I narrowed down the problem using the strace tool and it showed me this:

open("/dev/snd/pcmC0D0p", O_RDWR|O_APPEND|O_NONBLOCK|O_CLOEXEC) = -1 EINVAL (Invalid argument)

What can be the difference between using the plug:dmix and some virtual device like nenad_dmix in this case ??

Could some of you help me to resolve this issue?

Thanks,
Nenad

A message that is not in the archive (sent off-list or not yet received): CAHG8p1C=-faa-nysrUoC45NnXQukaGdYk1oCe84aUb-sAUMr_w@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

2011/10/25 Nenad Sljivic <[email protected]>:

Quoted 10 lines

Hello Scott,

Thanks a lot for your reply. My project is totally blocked due to this issue. I would really appreciate your help.

Are you referring to this entry:
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-September/043393.h
tml
 ?

Quoted 5 lines

Could you elaborate your solution a little more ?

What do you mean by:
" I add driver_name in my snd_soc_card to solve this bug. "

Mark has committed a patch to fix this in asoc core.
you can cat /proc/asound/cards to find the card driver name, then you must modify your config file to match this.

Scott