Dear
For our new audio platform, we are facing some problems to configure ALSA.
Our operating system will be installed on different devices containing
different codecs. By now we are able to detect the codec:
# aplay -l
card 0: onboardcodec1 [onboardcodec1], device 0: 2028000.sai-adau1372
adau1372.0-003c-0 [2028000.sai-adau1372 adau1372.0-003c-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: onboardcodec2 [onboardcodec2], device 0: 202c000.sai-adau1372
adau1372.0-003d-0 [202c000.sai-adau1372 adau1372.0-003d-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: externalaudio [externalaudio], device 0: 2030000.sai-snd-soc-dummy-dai
snd-soc-dummy-dai-0 [2030000.sai-snd-soc-dummy-dai snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
I was already able to configure our different audio playback and record
branches using /etc/asound.conf. However I noticed that all branches were shown
using aplay -L, even these related to codecs of different devices. A snippet of
our configuration:
pcm.amp_1 {
type plug
slave {
pcm "dmixer_0"
}
ttable {
0.0 1
0.1 0
}
hint {
show on
description "Amplifier branch 1"
}
}
pcm.dsnoop_0 {
type dsnoop
ipc_key 512
ipc_key_add_uid true
slave {
pcm "onboardcodec1"
period_time 5000
period_size 0
buffer_time 15000
buffer_size 0
rate 32000
format S24_LE
channels 4
}
}
pcm.dmixer_0 {
#dmix plugin can be only connected to hw plugin
type dmix
ipc_key 2048
ipc_key_add_uid true
slave {
pcm "onboardcodec1"
period_time 5000
period_size 0
buffer_time 15000
buffer_size 0
rate 32000
format S24_LE
channels 4
}
}
pcm.onboardcodec1 {
type hw
card onboardcodec1
}
As I only want to list the audio branches which are really available on the
hardware, I needed a configuration which is selected using the sound card.
I continued configuring using /usr/share/alsa/pcm/ and /usr/share/alsa/cards/
but until now I am not getting a clue on how this has to be done and I cannot
find any documentation on how this must be configured. It's quite complex.
My current state is included below. The default audio branches are shown using
aplay -L and contains a dmixer and dsnoop element. I am now trying to create an
amplifier branch using the front speaker type but I don't know how to link it
to the dmixer element.
TracsAmpliOnboard1.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
@func concat
strings [ "dmix:" $CARD ",DEV=0"]
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dsnoop:" $CARD ]
}
# to avoid possible phase inversions with digital mics
route_policy copy
}
hint.device $DEVICE
}
TracsAmpliOnboard1.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
pcm TracsAmpliOnboard1
subdevice 0
}
ttable {
0.0 1
0.1 0
0.2 0
0.3 0
}
}
hint.device $DEVICE
}
Is it possible to advice me how to handle these configurations?
Thanks
Pieter Cardoen
Embedded Linux Development Engineer
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user