#
# Default control device
#

ctl.!default {
	@args [ CARD ]
	@args.CARD {
		type string
		default {
			@func getenv
			vars [
				ALSA_PCM_CARD
				ALSA_CARD
			]
			default {
				@func refer
				name defaults.ctl.card
			}
		}
	}
	type empty
	child {
		# use card-specific definition if exists
		@func refer
		name {
			@func concat
			strings [
				"cards."
				{
					@func card_inum
					card $CARD
				}
				".ctl.default:CARD=" $CARD
			]
		}
		default {
			type hw
			card $CARD
		}
	}
	hint.description "Default Control Device"
}
