]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm config files cleanups and name hint extension
authorJaroslav Kysela <perex@perex.cz>
Thu, 12 Oct 2006 14:27:23 +0000 (16:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 12 Oct 2006 14:27:23 +0000 (16:27 +0200)
- remove device 0/subdevice 0 from configuration files (it's default)
- name_hint
  - fixed parsing slaves
  - obtain device numbers directly from 'type hw' configurations to
    avoid poluting of configurations scripts with hint.device lines

57 files changed:
src/conf/cards/AACI.conf
src/conf/cards/ATIIXP-MODEM.conf
src/conf/cards/ATIIXP-SPDMA.conf
src/conf/cards/ATIIXP.conf
src/conf/cards/AU8810.conf
src/conf/cards/AU8820.conf
src/conf/cards/AU8830.conf
src/conf/cards/Audigy.conf
src/conf/cards/Audigy2.conf
src/conf/cards/Aureon51.conf
src/conf/cards/Aureon71.conf
src/conf/cards/CA0106.conf
src/conf/cards/CMI8338-SWIEC.conf
src/conf/cards/CMI8338.conf
src/conf/cards/CMI8738-MC6.conf
src/conf/cards/CMI8738-MC8.conf
src/conf/cards/CS46xx.conf
src/conf/cards/EMU10K1.conf
src/conf/cards/EMU10K1X.conf
src/conf/cards/ENS1370.conf
src/conf/cards/ENS1371.conf
src/conf/cards/ES1968.conf
src/conf/cards/FM801.conf
src/conf/cards/HDA-Intel.conf
src/conf/cards/ICE1724.conf
src/conf/cards/ICH-MODEM.conf
src/conf/cards/ICH.conf
src/conf/cards/ICH4.conf
src/conf/cards/Maestro3.conf
src/conf/cards/NFORCE.conf
src/conf/cards/PC-Speaker.conf
src/conf/cards/PMac.conf
src/conf/cards/PMacToonie.conf
src/conf/cards/RME9636.conf
src/conf/cards/RME9652.conf
src/conf/cards/SI7018.conf
src/conf/cards/TRID4DWAVENX.conf
src/conf/cards/VIA686A.conf
src/conf/cards/VIA8233.conf
src/conf/cards/VIA8233A.conf
src/conf/cards/VIA8237.conf
src/conf/cards/VX222.conf
src/conf/cards/VXPocket.conf
src/conf/cards/VXPocket440.conf
src/conf/cards/YMF744.conf
src/conf/pcm/center_lfe.conf
src/conf/pcm/default.conf
src/conf/pcm/front.conf
src/conf/pcm/iec958.conf
src/conf/pcm/rear.conf
src/conf/pcm/side.conf
src/conf/pcm/surround40.conf
src/conf/pcm/surround41.conf
src/conf/pcm/surround50.conf
src/conf/pcm/surround51.conf
src/conf/pcm/surround71.conf
src/control/namehint.c

index 2ebec2a7a813e0a341619e469841d79b7f3ed928..748586a0726cbd873af79914e197c98d29c9e2aa 100644 (file)
@@ -11,7 +11,6 @@ AACI.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }       
 
 <confdir:pcm/surround40.conf>
index 0fff603b261662db144716b28b986f5b0c26177f..6e52af053cc8c57d47e26ef18bcc3dc4ac81f3dd 100644 (file)
@@ -13,11 +13,10 @@ ATIIXP-MODEM.pcm.modem.0 {
        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
 }
index e8899e92559a3824f8a8788c4ca31aef98a7140c..5c80815ddaf6e64ff8836a40a7a9ba2ed55ee74e 100644 (file)
@@ -11,7 +11,6 @@ ATIIXP-SPDMA.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -48,7 +47,6 @@ ATIIXP-SPDMA.pcm.surround40.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 4
        }
        hooks.0 {
@@ -92,7 +90,6 @@ ATIIXP-SPDMA.pcm.surround51.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 6
        }
        hooks.0 {
index 911eb5de9de80af1c88012cac9731a46863fda3f..38d802345bfb716e8fa108c7a666127b9b3b8553 100644 (file)
@@ -11,7 +11,6 @@ ATIIXP.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -48,7 +47,6 @@ ATIIXP.pcm.surround40.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 4
        }
        hooks.0 {
@@ -92,7 +90,6 @@ ATIIXP.pcm.surround51.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 6
        }
        hooks.0 {
@@ -166,21 +163,18 @@ ATIIXP.pcm.iec958.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
index b5b8386dcfbef9c8c142c8fa8bdf024d3c66c500..24d46c3447804a7c4c2d62b00f5343b7b8cb6919 100644 (file)
@@ -11,7 +11,6 @@ AU8810.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/iec958.conf>
index 1aa8c8547220fa58b3e1850d53355b49bd252aaf..07890254112b4e039ea4ae152e70f1d3c5bdf572 100644 (file)
@@ -11,5 +11,4 @@ AU8820.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
index 976f870c2b148bef3cbc11bc695b481b89bdaa13..39e66d50b0aca6f1d8a482d4106975438defd63c 100644 (file)
@@ -11,7 +11,6 @@ AU8830.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/surround40.conf>
index e43610aeb1cd3a88b3d02fcff550b6680858653e..ea1e53dae4cfa087704d66b7a6aa8bc3a4bbee41 100644 (file)
@@ -13,14 +13,12 @@ Audigy.pcm.front.0 {
        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
@@ -37,7 +35,6 @@ Audigy.pcm.front.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -55,7 +52,6 @@ Audigy.pcm.front.0 {
 
                ]
        }
-
 }      
 
 <confdir:pcm/rear.conf>
@@ -69,14 +65,12 @@ Audigy.pcm.rear.0 {
        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
@@ -106,14 +100,12 @@ Audigy.pcm.center_lfe.0 {
        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
@@ -130,7 +122,6 @@ Audigy.pcm.center_lfe.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -257,7 +248,6 @@ Audigy.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
 
        hooks.0 {
@@ -266,7 +256,6 @@ Audigy.pcm.iec958.0 {
                        {
                                interface PCM
                                name "IEC958 Playback Default"
-                               device 0
                                lock true
                                preserve true
                                optional true
@@ -288,7 +277,6 @@ Audigy.pcm.iec958.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Volume"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -305,7 +293,6 @@ Audigy.pcm.iec958.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
index d8bfa0fccc3b64bd8edc20959893d9ad21fbdd8a..0290f6f8c23d7ae8cd282e28e366aa297df6357a 100644 (file)
@@ -13,14 +13,12 @@ Audigy2.pcm.front.0 {
        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
@@ -37,7 +35,6 @@ Audigy2.pcm.front.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -55,7 +52,6 @@ Audigy2.pcm.front.0 {
 
                ]
        }
-
 }      
 
 <confdir:pcm/rear.conf>
@@ -69,14 +65,12 @@ Audigy2.pcm.rear.0 {
        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
@@ -106,14 +100,12 @@ Audigy2.pcm.center_lfe.0 {
        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
@@ -130,7 +122,6 @@ Audigy2.pcm.center_lfe.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -160,14 +151,12 @@ Audigy2.pcm.side.0 {
        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
@@ -184,7 +173,6 @@ Audigy2.pcm.side.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -369,7 +357,6 @@ Audigy2.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
 
        hooks.0 {
@@ -378,7 +365,6 @@ Audigy2.pcm.iec958.0 {
                        {
                                interface PCM
                                name "IEC958 Playback Default"
-                               device 0
                                preserve true
                                optional true
                                value [ $AES0 $AES1 $AES2 $AES3 ]
@@ -398,7 +384,6 @@ Audigy2.pcm.iec958.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Volume"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -415,7 +400,6 @@ Audigy2.pcm.iec958.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
index 996beda565c571d6960d476d91ecd7a1cda0c630..1b8ee8550176a093cce144143cd4a7d928c81bb1 100644 (file)
@@ -59,7 +59,6 @@ Aureon51.pcm.center_lfe.0 {
        type hw
        card $CARD
        device 2
-       subdevice 0
 }      
 
 <confdir:pcm/side.conf>
index 38d47202ce8c10ad092d78c45849e0cfc88ad78c..8a88cce4ca57b58a541b089d47cc4c300078ee78 100644 (file)
@@ -46,7 +46,6 @@ Aureon71.pcm.rear.0 {
        type hw
        card $CARD
        device 2
-       subdevice 0
 }      
 
 <confdir:pcm/center_lfe.conf>
index 46adb31903e9cfc90a42a9406f091a368ea1199d..9d21770f84ad42bbbf35f85e47ea953ca56dd645 100644 (file)
@@ -34,7 +34,6 @@ CA0106.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
@@ -241,7 +240,6 @@ CA0106.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index 98eda2c9c5943e400812a6ee2d5be46a2ce96f6f..af3a579f9e84b1ef18c7e4614002ac4f83f9064c 100644 (file)
@@ -12,7 +12,6 @@ CMI8338-SWIEC.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
index de087d6c8ef8894ced7f20572024fdb6a6eed589..144fc9b0d75c95b838e3970b646820ce6c9c2a6b 100644 (file)
@@ -11,7 +11,6 @@ CMI8338.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
index f38488ecbcd45a00e493349b90833661d6d80dec..171c772809ab6788f17c329cbfbb58f2abf644fe 100644 (file)
@@ -11,7 +11,6 @@ CMI8738-MC6.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
index d33a61a37ec8ae953eacd7a40ca520a0d2a53a67..a5bf6cb4889aebb1ebe386206d5289508ca631c5 100644 (file)
@@ -13,7 +13,6 @@ CMI8738-MC8.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
index 36b616b53830e5eab3535de9e77f03063cea0626..7b957c95a0b379cdaa9b39bfaf02e4adeae0bea7 100644 (file)
@@ -11,7 +11,6 @@ CS46xx.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with plughw/dsnoop
@@ -209,7 +208,6 @@ CS46xx.pcm.iec958.0 {
                                # for compatibility with older drivers
                                interface PCM
                                name "IEC958 Playback PCM Stream"
-                               device 0
                                lock true
                                preserve true
                                optional true
index 589c5d4a1176723d86129434044c0a37594af67f..7a7ebf54c139e74519bf39cf130b3773a6f21cad 100644 (file)
@@ -13,14 +13,12 @@ EMU10K1.pcm.front.0 {
        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
@@ -37,7 +35,6 @@ EMU10K1.pcm.front.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -67,14 +64,12 @@ EMU10K1.pcm.rear.0 {
        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
@@ -104,7 +99,6 @@ EMU10K1.pcm.center_lfe.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
@@ -135,7 +129,6 @@ EMU10K1.pcm.center_lfe.0 {
 #                      }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Volume"
                                index { @func private_pcm_subdevice }
                                lock true
@@ -152,7 +145,6 @@ EMU10K1.pcm.center_lfe.0 {
                        }
                        {
                                interface PCM
-                               device 0
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
index 9a72b529ab4e22b1e3d41961508ad4ffb71cc81d..b5fc708c4cb2f7d6ff0b0dc55829e093b7501210 100644 (file)
@@ -34,7 +34,6 @@ EMU10K1X.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
@@ -169,7 +168,6 @@ EMU10K1X.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index ec28d2e0c89f673e956a99e6b204b6893831df6d..32e4782e8dbc54c94e9b2e6c73ac14e35c707cf6 100644 (file)
@@ -48,7 +48,6 @@ ENS1370.pcm.rear.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index 0348f4e8367b3d99a0af5d195cc5099175db6d94..a6df42513f5a39552169029f5a0b77c5dfb550fa 100644 (file)
@@ -11,7 +11,6 @@ ENS1371.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -119,7 +118,6 @@ ENS1371.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index 6c95383c82da2ec27f2870e15731fd2b9666299e..a6ee11925e9524b8a7cceda56faecfe2fa7a2106 100644 (file)
@@ -9,5 +9,4 @@ ES1968.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
index 5a0adae77876c4c41c45f804777ce49ba95948d8..997b2184f38c2a7a0eb7f65d35ce746b120ab85d 100644 (file)
@@ -11,7 +11,6 @@ FM801.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -70,7 +69,6 @@ FM801.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index a5fafdf362420417850480db64b49ef8b642aee9..229f664eb6cb25a3195731c5836927cde4513ae6 100644 (file)
@@ -13,13 +13,11 @@ HDA-Intel.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
                card $CARD
        }
-       hint.device 0
 }      
 
 # default with dmix+softvol & dsnoop
@@ -50,16 +48,6 @@ HDA-Intel.pcm.default {
                        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>
index 41b16ffeb9903adac765ec76b941c05730f136dc..7f15332093ac4c9e8f4efbfb306458fbeb41de06 100644 (file)
@@ -59,7 +59,6 @@ ICE1724.pcm.center_lfe.0 {
        type hw
        card $CARD
        device 2
-       subdevice 0
 }      
 
 <confdir:pcm/side.conf>
index 9f6c76f10e93ce0f3dc271d956d55abab0210069..b96b5aaf1ad06492992f1f07b002b4e5a5b10c21 100644 (file)
@@ -11,6 +11,5 @@ ICH-MODEM.pcm.modem.0 {
        }
        type hw
        card $CARD
-       device 0
-       hint 0
+       hint.show off
 }
index d21638b469e703a567e6336d127dee80f1b70985..47ffef96531ca36be55d4719a89b8a4ca61d0d8b 100644 (file)
@@ -13,7 +13,6 @@ ICH.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
@@ -64,7 +63,6 @@ ICH.pcm.surround40.0 {
                slave.pcm {
                        type hw
                        card $CARD
-                       device 0
                        channels 4
                }
                hooks.0 {
@@ -123,7 +121,6 @@ ICH.pcm.surround51.0 {
                        slave.pcm {
                                type hw
                                card $CARD
-                               device 0
                                channels 6
                        }
                        hooks.0 {
@@ -197,7 +194,6 @@ ICH.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index e867ea7178dd877365f2541641bc8a0b31fd2f82..1bf5605bfd7f0d6fb02a033ebb8b81879cf6a071 100644 (file)
@@ -13,7 +13,6 @@ ICH4.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
@@ -64,7 +63,6 @@ ICH4.pcm.surround40.0 {
                slave.pcm {
                        type hw
                        card $CARD
-                       device 0
                        channels 4
                }
                hooks.0 {
@@ -115,7 +113,6 @@ ICH4.pcm.surround51.0 {
                slave.pcm {
                        type hw
                        card $CARD
-                       device 0
                        channels 6
                }
                hooks.0 {
@@ -194,7 +191,6 @@ ICH4.pcm.iec958.0 {
                hook_args [
                        {
                                name "IEC958 Playback AC97-SPSA"
-                               device 0
                                lock true
                                preserve true
                                value 3
@@ -202,14 +198,12 @@ ICH4.pcm.iec958.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
index b5f2bcbfe744c6421d465ad2b29cc108cf992cae..2916cf4954c3ba0492989112933de16f2fc88d5d 100644 (file)
@@ -9,7 +9,6 @@ Maestro3.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
index 0e051aefb1559dd71c9684470fb8d09def6b6cbb..a60407978cbdc4e7a4903fab20bd6a535b444631 100644 (file)
@@ -13,7 +13,6 @@ NFORCE.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
@@ -64,7 +63,6 @@ NFORCE.pcm.surround40.0 {
                slave.pcm {
                        type hw
                        card $CARD
-                       device 0
                        channels 4
                }
                hooks.0 {
@@ -123,7 +121,6 @@ NFORCE.pcm.surround51.0 {
                        slave.pcm {
                                type hw
                                card $CARD
-                               device 0
                                channels 6
                        }
                        hooks.0 {
@@ -204,21 +201,18 @@ NFORCE.pcm.iec958.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
index 37c23d0724a942a22c7042c7d3c9908c2ea8f506..892ef3a9fd1a600ae748a821a079ad359c843847 100644 (file)
@@ -11,7 +11,6 @@ PC-Speaker.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix & null
index 15ba699d6a33c3b1029c69fde81ce50553e55728..920a2093d4848943902387f6ae933a53f55f5c06 100644 (file)
@@ -11,7 +11,6 @@ PMac.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
index 498b140f20759eb39c5fe9490382b34f714adf03..772c7c948b1c51300d98b27593123b8372e40cee 100644 (file)
@@ -13,7 +13,6 @@ PMacToonie.pcm.front.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        control {
                name "PCM Playback Volume"
index d45c1b2868216506f775f9891bd00d20519008ff..e8dc5fadbaa23513872c94b2c442a135ecc053e5 100644 (file)
@@ -11,7 +11,6 @@ RME9636.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # FIXME: This configuration is not valid for double-speed rates.
@@ -42,7 +41,6 @@ RME9636.pcm.iec958.0 {
                        pcm {
                                type hw
                                card $CARD
-                               device 0
                        }
                        channels 18
                }
index 20d640c4ec1c6064f393ccc90de1eeaf6704ed48..1147d81065aa06fe210d812fed4fb156932aae46 100644 (file)
@@ -11,7 +11,6 @@ RME9652.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # FIXME: This configuration is not valid for double-speed rates.
@@ -42,7 +41,6 @@ RME9652.pcm.iec958.0 {
                        pcm {
                                type hw
                                card $CARD
-                               device 0
                        }
                        channels 26
                }
index ace72d0f5c05851e0cfdaaddcdd0fa3bdae05172..15972a46aca8aa1f2bafe5de5fa9d8375c40d70d 100644 (file)
@@ -13,7 +13,6 @@ SI7018.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
@@ -27,7 +26,6 @@ SI7018.pcm.rear.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index e17e07f19b0c517a9e9481a4630ad6b93c0e57bb..bbf6b7cb82b007eb977ad4643acea13db2463f90 100644 (file)
@@ -11,7 +11,6 @@ TRID4DWAVENX.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
@@ -25,7 +24,6 @@ TRID4DWAVENX.pcm.rear.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index f15b62d9c956f45d6051fdc4b8eab60c947cff38..e4a06f236591f19c92ef11ecfac1be9fcff6aff0 100644 (file)
@@ -14,7 +14,6 @@ VIA686A.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -63,28 +62,24 @@ VIA686A.pcm.iec958.0 {
        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
index b2ec9452ea39b3b58d7112bb9b88cfc6d853abf9..668bfd9e421b38bd05688d7f4f53112b973d9d3e 100644 (file)
@@ -11,7 +11,6 @@ VIA8233.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with softvol/dsnoop
@@ -29,7 +28,6 @@ VIA8233.pcm.default {
                        slave.pcm {
                                type hw
                                card $CARD
-                               device 0
                        }
                        control {
                                name "PCM Playback Volume"
@@ -65,7 +63,6 @@ VIA8233.pcm.surround40.0 {
                hook_args [
                        {
                                name "Channel Mode"
-                               device 0
                                preserve true
                                value "4ch"
                                lock true
@@ -80,7 +77,6 @@ VIA8233.pcm.surround40.0 {
                        }
                        {
                                name "Surround Down Mix"
-                               device 0
                                preserve true
                                value off
                                lock true
@@ -111,7 +107,6 @@ VIA8233.pcm.surround51.0 {
                hook_args [
                        {
                                name "Channel Mode"
-                               device 0
                                preserve true
                                value "6ch"
                                lock true
@@ -132,7 +127,6 @@ VIA8233.pcm.surround51.0 {
                        }
                        {
                                name "Surround Down Mix"
-                               device 0
                                preserve true
                                value off
                                lock true
@@ -140,7 +134,6 @@ VIA8233.pcm.surround51.0 {
                        }
                        {
                                name "Center/LFE Down Mix"
-                               device 0
                                preserve true
                                value off
                                lock true
@@ -173,7 +166,6 @@ VIA8233.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                subdevice 3
        }
        hooks.0 {
index 637fee9ce5d0c742943a7c7e0e027d4f0cad614b..97d2a7daf33535de779f86cc3758ef32062402b5 100644 (file)
@@ -11,7 +11,6 @@ VIA8233A.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with dmix/dsnoop
@@ -48,7 +47,6 @@ VIA8233A.pcm.surround40.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 4
        }
        hooks.0 {
@@ -56,7 +54,6 @@ VIA8233A.pcm.surround40.0 {
                hook_args [
                        {
                                name "Swap Surround Slot"
-                               device 0
                                lock true
                                preserve true
                                value false
@@ -100,7 +97,6 @@ VIA8233A.pcm.surround51.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                channels 6
        }
        hooks.0 {
@@ -108,7 +104,6 @@ VIA8233A.pcm.surround51.0 {
                hook_args [
                        {
                                name "Swap Surround Slot"
-                               device 0
                                lock true
                                preserve true
                                value true
@@ -182,28 +177,24 @@ VIA8233A.pcm.iec958.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
                        }
                        {
                                name "IEC958 Output Switch"
-                               device 0
                                lock true
                                preserve true
                                value true
index a0985b0d07efb5f4069e0ec1f4184141782b96f5..404e19075cbdd55bdb59e767b5508af5064f8c5a 100644 (file)
@@ -11,7 +11,6 @@ VIA8237.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 # default with softvol/dsnoop
@@ -29,7 +28,6 @@ VIA8237.pcm.default {
                        slave.pcm {
                                type hw
                                card $CARD
-                               device 0
                        }
                        control {
                                name "PCM Playback Volume"
@@ -65,7 +63,6 @@ VIA8237.pcm.surround40.0 {
                hook_args [
                        {
                                name "Channel Mode"
-                               device 0
                                preserve true
                                value "4ch"
                                lock true
@@ -73,7 +70,6 @@ VIA8237.pcm.surround40.0 {
                        }
                        {
                                name "Surround Down Mix"
-                               device 0
                                preserve true
                                value off
                                lock true
@@ -112,7 +108,6 @@ VIA8237.pcm.surround51.0 {
                        hook_args [
                                {
                                        name "Channel Mode"
-                                       device 0
                                        preserve true
                                        value "6ch"
                                        lock true
@@ -120,7 +115,6 @@ VIA8237.pcm.surround51.0 {
                                }
                                {
                                        name "Surround Down Mix"
-                                       device 0
                                        preserve true
                                        value off
                                        lock true
@@ -128,7 +122,6 @@ VIA8237.pcm.surround51.0 {
                                }
                                {
                                        name "Center/LFE Down Mix"
-                                       device 0
                                        preserve true
                                        value off
                                        lock true
@@ -163,7 +156,6 @@ VIA8237.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
                subdevice 3
        }
        hooks.0 {
index 11cb4cdaa314deb911212c72b580f2fc6bf2393c..3385f25bde98ff39a165a476479f5d97361de474 100644 (file)
@@ -11,7 +11,6 @@ VX222.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/iec958.conf>
@@ -37,7 +36,6 @@ VX222.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index bdce137615d463fe8ad4b58f827db492c4052104..fe44ff53a83d3430c7617cc9e6ce8b6686934398 100644 (file)
@@ -11,7 +11,6 @@ VXPocket.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/iec958.conf>
@@ -37,7 +36,6 @@ VXPocket.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index 2aa96f8bb4b4f35c67083d834eae4ba733fe61a7..197c2d6c5efd0716379d692161d352208ae8df85 100644 (file)
@@ -11,7 +11,6 @@ VXPocket440.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
@@ -86,7 +85,6 @@ VXPocket440.pcm.iec958.0 {
        slave.pcm {
                type hw
                card $CARD
-               device 0
        }
        hooks.0 {
                type ctl_elems
index 6243a09ae82a2cb191eed8eb9d1aa1d6aa0b92a3..84dbcbec3e8aa62706007795eec872a86a183006 100644 (file)
@@ -11,7 +11,6 @@ YMF744.pcm.front.0 {
        }
        type hw
        card $CARD
-       device 0
 }      
 
 <confdir:pcm/rear.conf>
index 228c619503c42931239b2018d48869533f5e3e1c..4ef6f49768b25cf7ecca14de7e0b55f01aab363e 100644 (file)
@@ -53,5 +53,6 @@ pcm.!center_lfe {
                        name defaults.namehint.basic
                }
                description "Center and Subwoofer speakers"
+               device $DEV
        }
 }
index fcee2989f0b2fd19e7571034fb368d605bdb15be..98db3e0d67db71af02c6b93eecfc9ae3163f4a55 100644 (file)
@@ -18,25 +18,40 @@ pcm.!default {
                        }
                }
        }
-       # 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
                }
        }
 }
index ba92848148a93a39136a6b073a103ab5b4a0378c..7aff0cbf007d9780a3fcd611d4571fe3ecea5459 100644 (file)
@@ -53,5 +53,6 @@ pcm.!front {
                        name defaults.namehint.basic
                }
                description "Front speakers"
+               device $DEV
        }
 }
index 9be622e964e18c9043625f5073733a169c7c94af..ac139b5e402790fb24ce1eb6ef9d1de3d1859cfc 100644 (file)
@@ -78,5 +78,6 @@ pcm.!iec958 {
                        name defaults.namehint.basic
                }
                description "IEC958 (S/PDIF) Digital Audio Output"
+               device $DEV
        }
 }
index 952a1d65a06ac8335c43ac415376201090945d9b..85c70aab180fe911203873a5da640a4406ca4105 100644 (file)
@@ -53,5 +53,6 @@ pcm.!rear {
                        name defaults.namehint.basic
                }
                description "Rear speakers"
+               device $DEV
        }
 }
index 2d86c7fe283bf35637d4317d65b21082c6635646..4a81af09c8a684975501e6099522fad390810565 100644 (file)
@@ -53,5 +53,6 @@ pcm.!side {
                        name defaults.namehint.basic
                }
                description "Side speakers"
+               device $DEV
        }
 }
index 8733f8f73746fe2d6bd3325a23734f1c91329dc2..361ccaa1e3291b89de3e5df657ba5076b3f0f9cc 100644 (file)
@@ -52,5 +52,8 @@ pcm.!surround40 {
                        ]
                }
        }
-       hint.description "4.0 Surround output to Front and Rear speakers"
+       hint {
+               description "4.0 Surround output to Front and Rear speakers"
+               device $DEV
+       }
 }
index 69facf102b5eefc0e97c8e6c4a1e5dfbfb82358c..10e486e21528abd5413e35e9f45e217810011ec6 100644 (file)
@@ -59,5 +59,8 @@ pcm.!surround41 {
        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
+       }
 }
index c033fe355c0c5e4b2d356228a825cd2d3eaa8ab5..7b7b17e10246edd94603c1168dfad55f65f0d291 100644 (file)
@@ -59,5 +59,8 @@ pcm.!surround50 {
        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
+       }
 }
index 3cd079094b1814ebb31748189c140f88f94058cb..3a7543f9fb8aa0f9b482b8fe73f8866470a231c6 100644 (file)
@@ -54,5 +54,8 @@ pcm.!surround51 {
                        ]
                }
        }
-       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
+       }
 }
index 41a636540b461eafdec43720804f39a1ffd9b715..eb2360b14cb928337a6e55e426e0ebe3bd01e733 100644 (file)
@@ -56,5 +56,8 @@ pcm.!surround71 {
                        ]
                }
        }
-       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
+       }
 }
index 23ae7396aecfa69f2f56c8b3d6c253e3a374b494..01dcf2d5b94e70efb366d4c88fd290d90fe93c8d 100644 (file)
@@ -185,7 +185,7 @@ static char *get_dev_name(struct hint_list *list)
                        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;
@@ -205,7 +205,7 @@ static int try_config(struct hint_list *list,
                      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;
@@ -253,11 +253,26 @@ static int try_config(struct hint_list *list,
                }
 #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;
@@ -302,8 +317,8 @@ static int try_config(struct hint_list *list,
                }
        } 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;