]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Make dmix card-specific
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Jan 2005 15:45:42 +0000 (15:45 +0000)
committerTakashi Iwai <tiwai@suse.de>
Thu, 13 Jan 2005 15:45:42 +0000 (15:45 +0000)
The parameters of dmix PCM definition are now card-specific.
As default, period_size = 1024 and periods = 8 are used.

src/conf/alsa.conf
src/conf/cards/aliases.conf
src/conf/pcm/Makefile.am
src/conf/pcm/dmix.conf [new file with mode: 0644]

index 040a74975afb36f472d5d47d2822c3b2db2a3096..b6294d96202f6ac79f73da0387b3b5830e050cf9 100644 (file)
@@ -186,30 +186,6 @@ pcm.plug {
        slave.pcm $SLAVE
 }
 
-pcm.dmix {
-       @args [ SLAVE FORMAT RATE ]
-       @args.SLAVE {
-               type string
-               default "hw:0,0"
-       }
-       @args.FORMAT {
-               type string
-               default S16_LE
-       }
-       @args.RATE {
-               type integer
-               default 48000
-       }
-       type dmix
-       ipc_key 5678293
-       ipc_key_add_uid yes
-       slave {
-               pcm $SLAVE
-               format $FORMAT
-               rate $RATE
-       }
-}
-
 pcm.dsnoop {
        @args [ SLAVE FORMAT RATE ]
        @args.SLAVE {
@@ -299,7 +275,9 @@ pcm.surround71 cards.pcm.surround71
 pcm.iec958 cards.pcm.iec958
 pcm.spdif cards.pcm.iec958
 pcm.modem cards.pcm.modem
+
 pcm.default cards.pcm.default
+pcm.dmix cards.pcm.dmix
 
 #
 #  Control interface
index dc60acf449f539081684bf52deac49d5283ac5ea..2ebffcc3bbcf36c589e2b35970cbcf08889c0101 100644 (file)
@@ -45,3 +45,4 @@ Allegro cards.Maestro3
 Canyon3D-2 cards.Maestro3
 
 <confdir:pcm/default.conf>
+<confdir:pcm/dmix.conf>
index 0c4ec6dbf0736023d008ba7691bd20c48e7abe68..d0d43a59ae4c3a55d14b8dce70c2fa09363f2eb3 100644 (file)
@@ -1,7 +1,8 @@
 cfg_files = default.conf front.conf rear.conf center_lfe.conf side.conf\
            surround40.conf surround41.conf \
            surround50.conf surround51.conf \
-           surround71.conf iec958.conf modem.conf
+           surround71.conf iec958.conf modem.conf \
+           dmix.conf
 
 EXTRA_DIST = $(cfg_files)
 
diff --git a/src/conf/pcm/dmix.conf b/src/conf/pcm/dmix.conf
new file mode 100644 (file)
index 0000000..d387f95
--- /dev/null
@@ -0,0 +1,85 @@
+#
+# dmix output
+#
+
+pcm.!dmix {
+       @args [ CARD DEV SUBDEV FORMAT RATE ]
+       @args.CARD {
+               type string
+               default 0
+       }
+       @args.DEV {
+               type string
+               default 0
+       }
+       @args.SUBDEV {
+               type string
+               default -1
+       }
+       @args.FORMAT {
+               type string
+               default S16_LE
+       }
+       @args.RATE {
+               type integer
+               default 48000
+       }
+       type dmix
+       ipc_key 5678293
+       ipc_key_add_uid yes
+       slave {
+               pcm {
+                       type hw
+                       card $CARD
+                       device $DEV
+                       subdevice $SUBDEV
+               }
+               format $FORMAT
+               rate $RATE
+               period_size {
+                       @func refer
+                       name {
+                               @func concat
+                               strings [
+                                       "cards."
+                                       {
+                                               @func card_driver
+                                               card $CARD
+                                       }
+                                       ".pcm.dmix.period_size"
+                               ]
+                       }
+                       default 1048
+               }               
+               period_time {
+                       @func refer
+                       name {
+                               @func concat
+                               strings [
+                                       "cards."
+                                       {
+                                               @func card_driver
+                                               card $CARD
+                                       }
+                                       ".pcm.dmix.period_time"
+                               ]
+                       }
+                       default -1
+               }               
+               periods {
+                       @func refer
+                       name {
+                               @func concat
+                               strings [
+                                       "cards."
+                                       {
+                                               @func card_driver
+                                               card $CARD
+                                       }
+                                       ".pcm.dmix.periods"
+                               ]
+                       }
+                       default 8
+               }
+       }
+}