[alsa-devel] dmix problems with analog out (HDMI out works fine with dmix)
rob.krakora at messagenetsystems.com
Thu Sep 29 14:25:21 CEST 2011
On Thu, Sep 29, 2011 at 8:22 AM, Robert Krakora <
rob.krakora at messagenetsystems.com> wrote:
> On Thu, Sep 29, 2011 at 2:36 AM, Takashi Iwai <tiwai at suse.de> wrote:
>> At Wed, 28 Sep 2011 12:29:05 -0400,
>> Robert Krakora wrote:
>> > Hi All,
>> > I am using ALSA 1.0.24 with the attached asound.conf. I am attempting
>> > share (mix) the analog output between Asterisk and aplay. However, when
>> > Asterisk is running, my application throws an error when attempting to
>> > a wave file via aplay. If I stop Asterisk, aplay plays the wave file
>> > fine. If I remove the asound.conf file, Asterisk and aplay are both
>> > and share the analog output just find with the default ALSA dmix
>> > implementation. However, we need this asound.conf to work for us for
>> > reasons. What is wrong with it. I have even tried replacing dmix with
>> > dshare and get the same bad behavior. We are running CentOS 6.0. As a
>> > caveat, I am attempting to use dmix with analog audio. If I use it with
>> > HDMI audio, it works flawlessly (same asound.conf with tweek to specify
>> > HDMI). Thanks in advance for your help.
>> > [root at devkrakorar snd]# su silentm -c "aplay -Dplug:dmixer
>> > /usr/share/sounds/alsa/Front_
>> > Center.wav"
>> > ALSA lib pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed
>> > (-22): Invalid argument
>> > ALSA lib pcm_dmix.c:1068:(snd_pcm_dmix_open) unable to open slave
>> > aplay: main:660: audio open error: Invalid argument
>> > [root at devkrakorar snd]#
>> Looks like the open of HD-audio stream failed by some reason.
>> When you open via aplay, is the corresponding stream already opened
>> by another? Take a look at /proc/asound/card0/pcm0p/sub0/* files.
>> Also, try the latest alsa-driver snapshot in
> Hi Takashi,
> Thanks for the quick response. Yes, the HD-audio stream open fails because
> Asterisk has previously opened it. aplay cannot open it (error -22).
> However, dmix should remedy the situation. It should provide software
> mixing for Asterisk and aplay so that the output of both is mixed and output
> to the analog audio channel. I will try your latest drivers.
> Best Regards,
> Rob Krakora
> MessageNet Systems
> 101 East Carmel Dr. Suite 105
> Carmel, IN 46032
> (317)566-1677 Ext 212
> (317)663-0808 Fax
This same scenario works flawlessly with HDMI channel. Asterisk and aplay
out put is mixed and send to the HDMI channel.
101 East Carmel Dr. Suite 105
Carmel, IN 46032
(317)566-1677 Ext 212
More information about the Alsa-devel