Topic: dmix and Multiface II

Hello!

I have Multiface II installed on Centos5 distro and have been facing the following problem.

I cannot use the soundcard by two or more applications simulteneously.

For instance if I try to run aplay from two consoles such as
aplay test1.wav
aplay test2.wav

the second command will return
aplay: main:583: audio open error: Device or resource busy

I tried using dmix in /etc/asound.conf

pcm.hdsp {
    type hw
    card 0
    device 0
}

ctl.hdsp {
    type hw           
    card 0
}

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

pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        rate 44100
    }
    bindings {
        0 0
        1 1
    }


}


ctl.dmixer {
    type hw
    card 0
}

With the above asound.conf, when I run

aplay -Dplug:dmix test1.wav

I get the following error:

ALSA lib pcm_direct.c:975:(snd1_pcm_direct_initialize_slave) unable to install hw params
ALSA lib pcm_dmix.c:1020:(snd_pcm_dmix_open) unable to initialize slave
aplay: main:583: audio open error: Device or resource busy

BTW dmix used to work at some point, without blocking the soundcard, but apparently it does not work any longer.

Any help would be greatly appreciated.

Thanks a lot!
chrisoula

Re: dmix and Multiface II

As far as I know dmix usually works out of the box since several ALSA-versions. Did you try to delete (or move away to a backup place) any alsa-configuration-file? /etc/asound.conf is the global one, but you also might have one in your users-home-directory (~/.asoundrc).

However this might not work for your card. I myself do not own a RME-card. But as i am interested in how well their cards work under Linux, i might investigate some more into this topic. How are you connecting the MFII to your pc? HDSP or HDSPe (pci or pci-e or express-card)?

Something else you might want to consider: As far as i noticed with with my Maudio Audiophile 2496, the dmix-plugin of alsa always resamples (by default to 48kHz). Since i was experimenting with bit-perfect-output (because i wanted to know if I hear the difference, which i don't, which again might be because of the rest of my setup), I went for the opposite of what you try to achieve: Disable dmix for my second card. I still use dmix for my onboard-soundcard for everyday low-quality audio (like youtube-videos and systems-sounds). When i play music from my collection, i instead then configured my players to use the 2496 without dmix, as i never listen to more than one stream. wink Maybe such a setup is a solution for you?