#
# Default output
#

pcm.!default {
	@args [ CARD ]
	@args.CARD {
		type string
		default {
			@func getenv
			vars [
				ALSA_PCM_CARD
				ALSA_CARD
			]
			default {
				@func refer
				name defaults.pcm.card
			}
		}
	}
	# use card-specific definition if exists
	@func refer
	name {
		@func concat
		strings [
			"cards."
			{
				@func card_driver
				card $CARD
			}
			".pcm.default:CARD=" $CARD
		]
	}
	default {
		# use plughw as default
		type plug
		slave.pcm {
			type hw
			card $CARD
		}
	}
}
