Hi,
Sorry for late reply, i'm busy all day.
I think the problem is you using the pcm multi to play wave file(aplay
shell command).
I think the correct is use a plug pcm to "fix" the channel count.
A plug pcm is very usefull as i mentioned in the previous email.
With the output of you aplay, you must make this in .asoundrc:
#################################################
## This is for software mixing
## This is not necessary, but cool for
## share sound resources at same time.
## This make more than one application
## output sound at same time
# First Sound Card
pcm.2asone_HDAIntel_dmix {
type dmix
# ipc_key is a unique number
# for every ALSA pcm
ipc_key 170300
# "hw:Sound-Card-Number,Device-Number"
# Sound Card Number of aplay -l
# Device-Number of aplay -l
# Note: "hw:0,0" Is for Analog HDA
# To DIGITAL(SPDIF or some other
# DIGITAL interface of you soundcard
# use this: "hw:0,1"
slave.pcm "hw:0,0"
}
# Second Sound Card
pcm.2asone_LifeChat_dmix {
type dmix
ipc_key 170310
slave.pcm "hw:1,0"
}
#################################################
#################################################
## This set the count of channels used
## of every card
pcm.both {
type multi
slaves.a.pcm "2asone_HDAIntel_dmix"
slaves.a.channels 2
slaves.b.pcm "2asone_LifeChat_dmix"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
#################################################
#################################################
# Create a pcm type route to copy every
# channel to channel of other sound card.
# This to make a stereo output for both
# sound card
pcm.2asone {
type route
slave.pcm "both"
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
}
#################################################
#################################################
# If you need converts channels, rate and
# format on request.
# Use he to applications like xmms and
# others that let to change alsa
# configurations.
pcm.2as1plug
{
type plug
slave.pcm "2asone"
# hint for KDE phonon
hint {
show on
description "Output to two sound cards"
}
}
#################################################
#################################################
# If you want to make he a default:
pcm.!default {
type plug
slave.pcm "2as1plug"
# Or
# slave.pcm "2asone"
# Without plug pcm features
}
#################################################
With this configuration above, use this shell command:
aplay -vD 2as1plug some-file.wav
You need to pass the plug pcm for every application to work the sound.
I don't know if this is a rule of ALSA, but the plug pcm is the end of a all
pcm work to make sound output of applications work.
If the system is under a heavy load, the sound maybe fail some seconds. The
preempt_rt kernels(too old for someone) make this happen less(in my tests, of
course).
If i not forgot anything, that's all.
Good Luck !!!
On 08-01-2011 05:56, Mark Goldstein wrote:
> Hi Leonardo,
>
> Thank you for explanation.
>
> It looks like your variant is very similar to what I did, just yours
> have separate definitions for "multi" pcm and "route" pcm, while mine
> used "nested" definitions.
> Anyway I tried your variant and got the same "Channels count non
> available" message.
>
> Somehow it does not like 2 channels for the slave devices.
>
> aplay -l on my machine produces:
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: Intel [HDA Intel], device 0: VT1708S Analog [VT1708S Analog]
> Subdevices: 2/2
> Subdevice #0: subdevice #0
> Subdevice #1: subdevice #1
> card 0: Intel [HDA Intel], device 1: VT1708S Digital [VT1708S Digital]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 1: default [Microsoft LifeChat LX-3000 ], device 0: USB Audio [USB Audio]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
>
> Does it mean that card 1 has only one "channel"? I think I tried
> removing "bindings 3" but it was not sufficient, I had to remove
> "bindings 1" as well, that is leave only one channel per slave.
>
> How should I proceed?
...
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user