From 9309430ae806484a78c3bd8a97bd677148122522 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 27 Jan 2005 15:45:05 +0000 Subject: [PATCH] Make dsnoop card-specific Make dsnoop card-specific. Its definition is moved to pcm/dsnoop.conf. --- src/conf/alsa.conf | 25 +---------- src/conf/cards/aliases.conf | 1 + src/conf/pcm/Makefile.am | 2 +- src/conf/pcm/dsnoop.conf | 85 +++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 src/conf/pcm/dsnoop.conf diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf index b6294d96..9f67d3c8 100644 --- a/src/conf/alsa.conf +++ b/src/conf/alsa.conf @@ -186,30 +186,6 @@ pcm.plug { slave.pcm $SLAVE } -pcm.dsnoop { - @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 dsnoop - ipc_key 5778293 - ipc_key_add_uid yes - slave { - pcm $SLAVE - format $FORMAT - rate $RATE - } -} - pcm.shm { @args [ SOCKET PCM ] @args.SOCKET { @@ -278,6 +254,7 @@ pcm.modem cards.pcm.modem pcm.default cards.pcm.default pcm.dmix cards.pcm.dmix +pcm.dsnoop cards.pcm.dsnoop # # Control interface diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf index 2ebffcc3..42c7add0 100644 --- a/src/conf/cards/aliases.conf +++ b/src/conf/cards/aliases.conf @@ -46,3 +46,4 @@ Canyon3D-2 cards.Maestro3 + diff --git a/src/conf/pcm/Makefile.am b/src/conf/pcm/Makefile.am index d0d43a59..de5959fe 100644 --- a/src/conf/pcm/Makefile.am +++ b/src/conf/pcm/Makefile.am @@ -2,7 +2,7 @@ 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 \ - dmix.conf + dmix.conf dsnoop.conf EXTRA_DIST = $(cfg_files) diff --git a/src/conf/pcm/dsnoop.conf b/src/conf/pcm/dsnoop.conf new file mode 100644 index 00000000..d34e6f30 --- /dev/null +++ b/src/conf/pcm/dsnoop.conf @@ -0,0 +1,85 @@ +# +# dsnoop +# + +pcm.!dsnoop { + @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 dsnoop + ipc_key 5778293 + 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.dsnoop.period_size" + ] + } + default 1024 + } + period_time { + @func refer + name { + @func concat + strings [ + "cards." + { + @func card_driver + card $CARD + } + ".pcm.dsnoop.period_time" + ] + } + default -1 + } + periods { + @func refer + name { + @func concat + strings [ + "cards." + { + @func card_driver + card $CARD + } + ".pcm.dsnoop.periods" + ] + } + default 16 + } + } +} -- 2.47.1