#
# 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
	}
	@args.RATE {
		type integer
		default 48000
	}
	type dsnoop
	ipc_key 5778293
	ipc_gid audio
	ipc_perm 0660
	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
		}
	}
}
