}
type hw
card $CARD
- device 0
}
<confdir:pcm/surround40.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
slave.channels 2
slave.format S16_LE
ttable.0.1 1
ttable.1.0 0
- hint 0
+ hint.show off
}
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
hook_args [
{
name "IEC958 Playback AC97-SPSA"
- device 0
lock true
preserve true
value 3
}
{
name "IEC958 Playback Default"
- device 0
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Playback Switch"
- device 0
lock true
preserve true
value true
}
type hw
card $CARD
- device 0
}
<confdir:pcm/iec958.conf>
}
type hw
card $CARD
- device 0
}
}
type hw
card $CARD
- device 0
}
<confdir:pcm/surround40.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
]
}
-
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
{
interface PCM
name "IEC958 Playback Default"
- device 0
lock true
preserve true
optional true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
]
}
-
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
{
interface PCM
name "IEC958 Playback Default"
- device 0
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
type hw
card $CARD
device 2
- subdevice 0
}
<confdir:pcm/side.conf>
type hw
card $CARD
device 2
- subdevice 0
}
<confdir:pcm/center_lfe.conf>
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
}
type hw
card $CARD
- device 0
}
# default with plughw/dsnoop
# for compatibility with older drivers
interface PCM
name "IEC958 Playback PCM Stream"
- device 0
lock true
preserve true
optional true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
# }
{
interface PCM
- device 0
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
lock true
}
{
interface PCM
- device 0
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
lock true
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
- hint.device 0
}
# default with dmix+softvol & dsnoop
strings [ "dsnoop:" $CARD ]
}
}
- hint {
- device_output {
- @func refer
- name defaults.pcm.dmix.device
- }
- device_input {
- @func refer
- name defaults.pcm.dsnoop.device
- }
- }
}
<confdir:pcm/surround40.conf>
type hw
card $CARD
device 2
- subdevice 0
}
<confdir:pcm/side.conf>
}
type hw
card $CARD
- device 0
- hint 0
+ hint.show off
}
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
hook_args [
{
name "IEC958 Playback AC97-SPSA"
- device 0
lock true
preserve true
value 3
}
{
name "IEC958 Playback Default"
- device 0
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Playback Switch"
- device 0
lock true
preserve true
value true
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
hook_args [
{
name "IEC958 Playback AC97-SPSA"
- device 0
lock true
preserve true
value 0
}
{
name "IEC958 Playback Default"
- device 0
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Playback Switch"
- device 0
lock true
preserve true
value true
}
type hw
card $CARD
- device 0
}
# default with dmix & null
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
}
type hw
card $CARD
- device 0
}
# FIXME: This configuration is not valid for double-speed rates.
pcm {
type hw
card $CARD
- device 0
}
channels 18
}
}
type hw
card $CARD
- device 0
}
# FIXME: This configuration is not valid for double-speed rates.
pcm {
type hw
card $CARD
- device 0
}
channels 26
}
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "IEC958 Playback AC97-SPSA"
- device 0
lock true
preserve true
value 0
}
{
name "IEC958 Playback Default"
- device 0
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Playback Switch"
- device 0
lock true
preserve true
value true
}
type hw
card $CARD
- device 0
}
# default with softvol/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
hook_args [
{
name "Channel Mode"
- device 0
preserve true
value "4ch"
lock true
}
{
name "Surround Down Mix"
- device 0
preserve true
value off
lock true
hook_args [
{
name "Channel Mode"
- device 0
preserve true
value "6ch"
lock true
}
{
name "Surround Down Mix"
- device 0
preserve true
value off
lock true
}
{
name "Center/LFE Down Mix"
- device 0
preserve true
value off
lock true
slave.pcm {
type hw
card $CARD
- device 0
subdevice 3
}
hooks.0 {
}
type hw
card $CARD
- device 0
}
# default with dmix/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
channels 4
}
hooks.0 {
hook_args [
{
name "Swap Surround Slot"
- device 0
lock true
preserve true
value false
slave.pcm {
type hw
card $CARD
- device 0
channels 6
}
hooks.0 {
hook_args [
{
name "Swap Surround Slot"
- device 0
lock true
preserve true
value true
hook_args [
{
name "IEC958 Playback AC97-SPSA"
- device 0
lock true
preserve true
value 3
}
{
name "IEC958 Playback Default"
- device 0
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Playback Switch"
- device 0
lock true
preserve true
value true
}
{
name "IEC958 Output Switch"
- device 0
lock true
preserve true
value true
}
type hw
card $CARD
- device 0
}
# default with softvol/dsnoop
slave.pcm {
type hw
card $CARD
- device 0
}
control {
name "PCM Playback Volume"
hook_args [
{
name "Channel Mode"
- device 0
preserve true
value "4ch"
lock true
}
{
name "Surround Down Mix"
- device 0
preserve true
value off
lock true
hook_args [
{
name "Channel Mode"
- device 0
preserve true
value "6ch"
lock true
}
{
name "Surround Down Mix"
- device 0
preserve true
value off
lock true
}
{
name "Center/LFE Down Mix"
- device 0
preserve true
value off
lock true
slave.pcm {
type hw
card $CARD
- device 0
subdevice 3
}
hooks.0 {
}
type hw
card $CARD
- device 0
}
<confdir:pcm/iec958.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
<confdir:pcm/iec958.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
slave.pcm {
type hw
card $CARD
- device 0
}
hooks.0 {
type ctl_elems
}
type hw
card $CARD
- device 0
}
<confdir:pcm/rear.conf>
name defaults.namehint.basic
}
description "Center and Subwoofer speakers"
+ device $DEV
}
}
}
}
}
- # use card-specific definition if exists
- @func refer
- name {
- @func concat
- strings [
- "cards."
- {
- @func card_driver
+ type empty
+ slave.pcm {
+ # use card-specific definition if exists
+ @func refer
+ name {
+ @func concat
+ strings [
+ "cards."
+ {
+ @func card_driver
+ card $CARD
+ }
+ ".pcm.default1:CARD=" $CARD
+ ]
+ }
+ default {
+ # use plughw as default
+ type plug
+ slave.pcm {
+ type hw
card $CARD
}
- ".pcm.default:CARD=" $CARD
- ]
+ hint.device 0
+ }
}
- default {
- # use plughw as default
- type plug
- slave.pcm {
- type hw
- card $CARD
+ hint {
+ description "Default Audio Device"
+ device_output {
+ @func refer
+ name defaults.pcm.dmix.device
+ }
+ device_input {
+ @func refer
+ name defaults.pcm.dsnoop.device
}
}
}
name defaults.namehint.basic
}
description "Front speakers"
+ device $DEV
}
}
name defaults.namehint.basic
}
description "IEC958 (S/PDIF) Digital Audio Output"
+ device $DEV
}
}
name defaults.namehint.basic
}
description "Rear speakers"
+ device $DEV
}
}
name defaults.namehint.basic
}
description "Side speakers"
+ device $DEV
}
}
]
}
}
- hint.description "4.0 Surround output to Front and Rear speakers"
+ hint {
+ description "4.0 Surround output to Front and Rear speakers"
+ device $DEV
+ }
}
ttable.2.2 1
ttable.3.3 1
ttable.4.5 1
- hint.description "4.1 Surround output to Front, Rear and Subwoofer speakers"
+ hint {
+ description "4.1 Surround output to Front, Rear and Subwoofer speakers"
+ device $DEV
+ }
}
ttable.2.2 1
ttable.3.3 1
ttable.4.4 1
- hint.description "5.0 Surround output to Front, Center and Rear speakers"
+ hint {
+ description "5.0 Surround output to Front, Center and Rear speakers"
+ device $DEV
+ }
}
]
}
}
- hint.description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers"
+ hint {
+ description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers"
+ device $DEV
+ }
}
]
}
}
- hint.description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"
+ hint {
+ description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"
+ device $DEV
+ }
}
strcat(res, ", ");
strcat(res, str1);
strcat(res, " {");
- strcat(res, list->iface == SND_CTL_ELEM_IFACE_PCM ? "Capture" : "Input");
+ strcat(res, str2);
strcat(res, "}");
free(str1);
return res;
const char *name)
{
snd_lib_error_handler_t eh;
- snd_config_t *res = NULL, *cfg, *n;
+ snd_config_t *res = NULL, *cfg, *cfg1, *n;
snd_config_iterator_t i, next;
char *buf, *buf1 = NULL, *buf2;
const char *str;
}
#endif
- cfg = res;
+ cfg1 = res;
level = 0;
__hint:
level++;
- if (snd_config_search(cfg, "hint", &cfg) >= 0) {
+ if (snd_config_search(cfg1, "type", &cfg) >= 0 &&
+ snd_config_get_string(cfg, &str) >= 0 &&
+ strcmp(str, "hw") == 0) {
+ dev = 0;
+ list->device_input = -1;
+ list->device_output = -1;
+ if (snd_config_search(cfg1, "device", &cfg) >= 0) {
+ if (snd_config_get_integer(cfg, &dev) < 0) {
+ SNDERR("(%s) device must be an integer", buf);
+ err = -EINVAL;
+ goto __cleanup;
+ }
+ }
+ }
+
+ if (snd_config_search(cfg1, "hint", &cfg) >= 0) {
if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("hint (%s) must be a compound", buf);
err = -EINVAL;
}
} else if (level == 1 && !list->show_all)
goto __skip_add;
- if (snd_config_search(cfg, "slave", &cfg) >= 0 &&
- snd_config_search(cfg, base, &cfg) >= 0)
+ if (snd_config_search(cfg1, "slave", &cfg) >= 0 &&
+ snd_config_search(cfg, base, &cfg1) >= 0)
goto __hint;
snd_config_delete(res);
res = NULL;