普通文本  |  723行  |  14.17 KB

# Android ALSA configuration file for the WM8994 audio.


##################################################################################################################
#
#	{name "Playback Path"		value 2}		# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
#								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 9:R_SPK_HP
#	{name "Capture MIC Path"	value 1} 		# 0:Main Mic 1:Ear MIC 2:BT MIC
#	{name "Voice Call Path"		value 1}		# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
#
##################################################################################################################


##
## Mixer Devices
##

ctl.AndroidPlayback {
	type hw
	card 0
}

ctl.AndroidRecord {
	type hw
	card 0
}


##
## Playback Devices
##

pcm.AndroidPlayback {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
		]
	}
}

pcm.AndroidPlayback_Earpiece {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Speaker {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headset {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headphone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Bluetooth {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 5}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Earpiece_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headset_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headphone_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Bluetooth_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 5}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_Headset_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 6}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_Headphone_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 6}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Earpiece_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 7}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 7}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headset_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 8}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Headphone_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 9}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Bluetooth_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 5}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_Headset_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 10}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Speaker_Headphone_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Playback Path"	value 10}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidPlayback_Earpiece_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 1}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Speaker_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Headset_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Headphone_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Bluetooth_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 5}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Speaker_Headset_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidPlayback_Speaker_Headphone_incall {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio playback"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Voice Call Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}


##
## Capture  device
##

pcm.AndroidRecord {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Microphone {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Earpiece_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Headset_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 1} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Headphone_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Bluetooth_normal {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio capture"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 2} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_Headset_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_Headphone_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio capture"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Playback Path"	value 2}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidRecord_Headset_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio capture"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Playback Path"	value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidRecord_Headphone_ringtone {
	type hooks
	slave.pcm {
		type hw
		card 0
		device 0	# Must be of type "digital audio capture"
	}
	hooks.0 {
		type ctl_elems
		hook_args [
			{name "Playback Path"	value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
								# 6:SPK_HP 7:R_SPK 8:R_HP 9:R_HP_NO_MIC 10:R_SPK_HP
		]
	}
}

pcm.AndroidRecord_Earpiece_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Headset_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 1} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Headphone_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Bluetooth_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 2} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
		]
	}
}

pcm.AndroidRecord_Speaker_Headset_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 1} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
			{name "Voice Call Path"		value 3}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}

pcm.AndroidRecord_Speaker_Headphone_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
			# Enable audio output from the DSP
			{name "Capture MIC Path"	value 0} 	# 0:Main Mic 1:Ear MIC 2:BT MIC
			{name "Voice Call Path"		value 4}	# 0:OFF 1:RCV 2:SPK 3:HP 4:HP_NO_MIC 5:BT
		]
	}
}