# Android ALSA configuration file for RK29 reference platform using the WM8994 ASoC audio.
# asound.conf for phonepad



##
## Mixer Devices
##
ctl.AndroidOut{
	type hw
	card 0
}
ctl.AndroidIn{
	type hw
	card 0
}
ctl.AndroidPlayback {
	type hw
	card 0
}
ctl.AndroidRecord {
	type hw
	card 0
}

##
## # Speaker
##
pcm.AndroidPlayback_Speaker_normal {
    type hooks
    slave.pcm{
		type hw
		card 0
		device 0
	}
    hooks.0 {
        type ctl_elems
        hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set path
			#AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
			{ name 'Speaker Mode'				value 'Class AB'}
        ]
    }
}
pcm.AndroidPlayback_Speaker_voip {
    type hooks
    slave.pcm{
		type hw
		card 0
		device 0
	}
    hooks.0 {
        type ctl_elems
        hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set path
			#AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
			{ name 'Speaker Mode'				value 'Class AB'}
        ]
    }
}
pcm.AndroidPlayback_Speaker_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			{ name 'Earpiece Switch'						value false}
			#close Speaker_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch'		value false}
			#{ name 'SPKL Output Switch'					value false}
			#{ name 'SPKR Output Switch' 					value false}
			#{ name 'LINEOUT1 Mixer IN1R Switch'			value false}
			#close Speaker_normal	ͬʱҪ�򿪰�����
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
			{ name 'Headphone Switch'						value[false false]}
		##Main_MIC(IN1R N_P) to BB_out(LINEOUT1 N_P)
			{ name 'IN1R PGA IN1RN Switch'					value true}
			{ name 'IN1R PGA IN1RP Switch'					value true}
			{ name 'IN1R Switch'							value true}
			{ name 'IN1R Volume'							value 31  }
			{ name 'LINEOUT1 Mixer IN1R Switch'				value true}
			{ name 'LINEOUT1 Volume'						value 1	}
			{ name 'LINEOUT1N Switch' 						value true}
			{ name 'LINEOUT1P Switch'						value true}
		##BB_in(IN2R_L P) to MIXOUTL_R to SPK
			{ name 'Left Output Mixer IN2LP Switch'			value true}
			{ name 'Left Output Mixer IN2LP Volume'			value 7	}
			{ name 'Right Output Mixer IN2RP Switch'		value true}
			{ name 'Right Output Mixer IN2RP Volume'		value 7 }
			{ name 'SPKL Output Switch'						value true}
			{ name 'SPKL Output Volume'						value 1	}
			{ name 'SPKR Output Switch' 					value true}
			{ name 'SPKR Output Volume' 					value 1	}
			{ name 'Output Switch'							value[true true]}
			{ name 'Output Volume'							value[63 63]}
			{ name 'Speaker Mixer Volume'					value[3 3]}
			{ name 'Speaker Volume'							value[63 63]}
			{ name 'Speaker Switch'							value[true true]}
			#{ name 'Speaker Boost Volume'					value[7 7]}
		## Ap to spk
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
		]
	}
}
pcm.AndroidPlayback_Speaker_ringtone {
##the same to Spk_normal
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
        ]
    }
}

##
## # Earpiece
##
# phonepad has not Earpiece,so Earpiece same to Speaker
pcm.AndroidPlayback_Earpiece_normal {
##the same to Spk_normal
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}

			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			#AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
		]
	}
}
pcm.AndroidPlayback_Earpiece_voip {
##the same to Spk_normal
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}

			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			#AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
		]
	}
}
pcm.AndroidPlayback_Earpiece_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			{ name 'Earpiece Switch'						value false}
			#close Speaker_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch'		value false}
			#{ name 'SPKL Output Switch'					value false}
			#{ name 'SPKR Output Switch' 					value false}
			#{ name 'LINEOUT1 Mixer IN1R Switch'			value false}
			#close Speaker_normal	ͬʱҪ�򿪰�����
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
			{ name 'Headphone Switch'						value[false false]}
		##Main_MIC(IN1R N_P) to BB_out(LINEOUT1 N_P)
			{ name 'IN1R PGA IN1RN Switch'					value true}
			{ name 'IN1R PGA IN1RP Switch'					value true}
			{ name 'IN1R Switch'							value true}
			{ name 'IN1R Volume'							value 31  }
			{ name 'LINEOUT1 Mixer IN1R Switch'				value true}
			{ name 'LINEOUT1 Volume'						value 1	}
			{ name 'LINEOUT1N Switch' 						value true}
			{ name 'LINEOUT1P Switch'						value true}
		##BB_in(IN2R_L P) to MIXOUTL_R to SPK
			{ name 'Left Output Mixer IN2LP Switch'			value true}
			{ name 'Left Output Mixer IN2LP Volume'			value 7	}
			{ name 'Right Output Mixer IN2RP Switch'		value true}
			{ name 'Right Output Mixer IN2RP Volume'		value 7 }
			{ name 'SPKL Output Switch'						value true}
			{ name 'SPKL Output Volume'						value 1	}
			{ name 'SPKR Output Switch' 					value true}
			{ name 'SPKR Output Volume' 					value 1	}
			{ name 'Output Switch'							value[true true]}
			{ name 'Output Volume'							value[63 63]}
			{ name 'Speaker Mixer Volume'					value[3 3]}
			{ name 'Speaker Volume'							value[63 63]}
			{ name 'Speaker Switch'							value[true true]}
			#{ name 'Speaker Boost Volume'					value[7 7]}
		## Ap to spk
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
		]
	}
}
pcm.AndroidPlayback_Earpiece_ringtone {
##the same to Spk_normal
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			#AIF1_to_DAC
            { name 'AIF1DAC Mux'                value 'AIF1DACDAT'}
            { name 'AIF1DAC1 Volume'			value[96 96]}
			{ name 'DAC1R Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value true}
			{ name 'DAC1 Volume'				value[96 96]}
			{ name 'DAC1 Switch'				value[true true]}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
        ]
    }
}

##
## # Headphone
##
pcm.AndroidPlayback_Headphone_normal {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        ]
    }
}
pcm.AndroidPlayback_Headphone_voip {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        ]
    }
}
pcm.AndroidPlayback_Headphone_incall {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        ]
    }
}
pcm.AndroidPlayback_Speaker_Headphone_ringtone {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        ]
    }
}
pcm.AndroidPlayback_Speaker_Headphone_normal {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
        ]
    }
}

##
## # Headset
##
pcm.AndroidPlayback_Speaker_Headset_ringtone {
    type hooks
    slave.pcm {
        type hw
        card 0
        device 0
    }
    hooks.0 {
        type ctl_elems
        hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal	����ͬʱ�����ȳ���
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			#{ name 'Left Output Mixer DAC Switch'			value false}
			#{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			{ name 'DAC1R Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1L Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1 Volume'					value[96 96] }
			{ name 'DAC1 Switch'					value[true true] }
			{ name 'Left Headphone Mux'				value Mixer	}
			{ name 'Left Output Mixer DAC Switch'	value true	}
			{ name 'Left Output Mixer DAC Volume'	value 7		}
			{ name 'Right Headphone Mux'			value Mixer	}
			{ name 'Right Output Mixer DAC Switch'	value true	}
			{ name 'Right Output Mixer DAC Volume'	value 7		}
			{ name 'Output Switch'					value[true true]}
			{ name 'Output Volume'					value[63 63]}
			{ name 'Headphone Switch'				value[true true]}
			{ name 'Headphone Volume'				value[63 63]}
		## Ap to spk
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
        ]
    }
}
pcm.AndroidPlayback_Speaker_Headset_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal	����ͬʱ�����ȳ���
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			#{ name 'Left Output Mixer DAC Switch'			value false}
			#{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			{ name 'DAC1R Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1L Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1 Volume'					value[96 96] }
			{ name 'DAC1 Switch'					value[true true] }
			{ name 'Left Headphone Mux'				value Mixer	}
			{ name 'Left Output Mixer DAC Switch'	value true	}
			{ name 'Left Output Mixer DAC Volume'	value 7		}
			{ name 'Right Headphone Mux'			value Mixer	}
			{ name 'Right Output Mixer DAC Switch'	value true	}
			{ name 'Right Output Mixer DAC Volume'	value 7		}
			{ name 'Output Switch'					value[true true]}
			{ name 'Output Volume'					value[63 63]}
			{ name 'Headphone Switch'				value[true true]}
			{ name 'Headphone Volume'				value[63 63]}
		## Ap to spk
			{ name 'SPKL DAC1 Volume'			value 1}
			{ name 'SPKL DAC1 Switch'			value true}
			{ name 'SPKR DAC1 Volume'			value 1}
			{ name 'SPKR DAC1 Switch'			value true }
			{ name 'Speaker Mixer Volume'		value[3 3]}
			{ name 'Speaker Volume'				value[47 47]}
			{ name 'Speaker Switch'				value[true true]}
		]
	}
}
pcm.AndroidPlayback_Headset_normal {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			{ name 'SPKL DAC1 Switch'						value false}
			{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			#{ name 'Left Output Mixer DAC Switch'			value false}
			#{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			{ name 'DAC1R Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1L Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1 Volume'					value[96 96] }
			{ name 'DAC1 Switch'					value[true true] }
			{ name 'Left Headphone Mux'				value Mixer	}
			{ name 'Left Output Mixer DAC Switch'	value true	}
			{ name 'Left Output Mixer DAC Volume'	value 7		}
			{ name 'Right Headphone Mux'			value Mixer	}
			{ name 'Right Output Mixer DAC Switch'	value true	}
			{ name 'Right Output Mixer DAC Volume'	value 7		}
			{ name 'Output Switch'					value[true true]}
			{ name 'Output Volume'					value[63 63]}
			{ name 'Headphone Switch'				value[true true]}
			{ name 'Headphone Volume'				value[63 63]}
		]
	}
}
pcm.AndroidPlayback_Headset_voip {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'			value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			{ name 'SPKL DAC1 Switch'						value false}
			{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			#{ name 'Left Output Mixer DAC Switch'			value false}
			#{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		## set begin
			{ name 'DAC1R Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1L Mixer AIF1.1 Switch'		value true }
			{ name 'DAC1 Volume'					value[96 96] }
			{ name 'DAC1 Switch'					value[true true] }
			{ name 'Left Headphone Mux'				value Mixer	}
			{ name 'Left Output Mixer DAC Switch'	value true	}
			{ name 'Left Output Mixer DAC Volume'	value 7		}
			{ name 'Right Headphone Mux'			value Mixer	}
			{ name 'Right Output Mixer DAC Switch'	value true	}
			{ name 'Right Output Mixer DAC Volume'	value 7		}
			{ name 'Output Switch'					value[true true]}
			{ name 'Output Volume'					value[63 63]}
			{ name 'Headphone Switch'				value[true true]}
			{ name 'Headphone Volume'				value[63 63]}
		]
	}
}
pcm.AndroidPlayback_Headset_incall {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			{ name 'Earpiece Switch'						value false}
			#close Speaker_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'						value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'				value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			{ name 'SPKL DAC1 Switch'						value false}
			{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			#{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		##Headset MIC(IN1L N P) to BB_out��LINEOUT1 N P��
			{ name 'IN1L PGA IN1LN Switch'		value true}
			{ name 'IN1L PGA IN1LP Switch'		value true}
			{ name 'IN1L Switch'				value true}
			{ name 'IN1L Volume'				value 31}
			{ name 'LINEOUT1 Mixer IN1L Switch' value true}
			{ name 'LINEOUT1 Volume'			value 1	}
			{ name 'LINEOUT1N Switch'			value true}
			{ name 'LINEOUT1P Switch'			value true}
		##BB_in(IN2 R_L P) -->Mixout --> Headset(HP)
			{ name 'Left Output Mixer IN2LP Switch'		value true}
			{ name 'Left Output Mixer IN2LP Volume'		value 7	}
			{ name 'Right Output Mixer IN2RP Switch' 	value true}
			{ name 'Right Output Mixer IN2RP Volume' 	value 7	}
			{ name 'Output Switch'				value[true true]}
			{ name 'Output Volume'				value[63 63]}
			{ name 'Left Headphone Mux'			value Mixer}
			{ name 'Right Headphone Mux' 		value Mixer}
			{ name 'Headphone Switch'			value[true true]}
			{ name 'Headphone Volume'			value[63 63]}
		]
	}
}

##
## # AndroidCapture
##
pcm.AndroidCapture {
	type hooks
	slave.pcm default
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			#{ name 'Earpiece Mixer Direct Voice Switch'	value false}
			#{ name 'LINEOUT1N Switch' 						value false}
			#close Speaker_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch'		value false}
			#{ name 'SPKL Output Switch'					value false}
			#{ name 'SPKR Output Switch' 					value false}
			#{ name 'LINEOUT1 Mixer IN1R Switch'			value false}
			#{ name 'Speaker Boost Volume'					value [0 0]}
			#close Speaker_normal
			#{ name 'SPKL DAC1 Switch'						value false}
			#{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			#{ name 'Left Output Mixer DAC Switch'			value false}
			#{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			#{ name 'Left Output Mixer IN2LP Switch'		value false}
			#{ name 'Right Output Mixer IN2RP Switch' 		value false}
			#{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
		##IN1R N_P to MIXIN_Rto ADC to AIF1 ADCDAT1
			{ name 'IN1R PGA IN1RN Switch'					value true}
			{ name 'IN1R PGA IN1RP Switch'					value true}
			{ name 'IN1R Switch'							value true}
			{ name 'IN1R Volume'							value 31}
			{ name 'MIXINR IN1R Switch'						value true}
			{ name 'MIXINR IN1R Volume'						value 0}
			{ name 'ADCR Mux'								value 0}
			{ name 'AIF1ADC1L Mixer ADC/DMIC Switch'		value true}
			{ name 'AIF1ADC1R Mixer ADC/DMIC Switch'		value true}
		]
	}
}
##
## # BT
##
pcm.AndroidPlayback_Bluetooth_incall {
	type hooks
	slave.pcm "hw:0,1"
	hooks.0 {
		type ctl_elems
		hook_args [
		## off other path
			#close Earpiece_incall
			{ name 'Earpiece Mixer Direct Voice Switch'		value false}
			{ name 'LINEOUT1N Switch' 						value false}
			{ name 'Earpiece Switch'						value false}
			#close Speaker_incall
			{ name 'Left Output Mixer IN2LP Switch'		    value false}
			{ name 'Right Output Mixer IN2RP Switch'		value false}
			{ name 'SPKL Output Switch'					    value false}
			{ name 'SPKR Output Switch' 					value false}
			{ name 'LINEOUT1 Mixer IN1R Switch'			    value false}
			#close Speaker_normal	ͬʱҪ�򿪰�����
			{ name 'SPKL DAC1 Switch'						value false}
			{ name 'SPKR DAC1 Switch'						value false}
			#close Headset_normal
			{ name 'Left Output Mixer DAC Switch'			value false}
			{ name 'Right Output Mixer DAC Switch'			value false}
			#close Headset_incall
			{ name 'Left Output Mixer IN2LP Switch'		    value false}
			{ name 'Right Output Mixer IN2RP Switch' 		value false}
			{ name 'LINEOUT1 Mixer IN1L Switch' 			value false}
			{ name 'Headphone Switch'						value[false false]}	
			#AIF1_to_DAC
			{ name 'DAC1R Mixer AIF1.1 Switch'	value false}
			{ name 'DAC1L Mixer AIF1.1 Switch'	value false}
			#DAC_to_SPK
			{ name 'SPKL DAC1 Switch'			value false}
			{ name 'SPKR DAC1 Switch'			value false}
			{ name 'Speaker Switch'				value[false false]}			
		##IN2RP/IN2LP to MIXIN to ADC to DAC2 to AIF2
			{ name 'IN2L PGA IN2LP Switch'				    value true}
			{ name 'IN2L PGA IN2LN Switch'				    value true}	
			{ name 'IN2L Switch'							value true}
			{ name 'IN2L Volume'							value 31  }
			{ name 'IN2R PGA IN2RP Switch'					value true }
			{ name 'IN2R Switch'							value true}
			{ name 'IN2R Volume'							value 31  }
			{ name 'MIXINL IN2L Switch'						value true}
			{ name 'MIXINL IN2L Volume' 					value 0  }
			{ name 'MIXINR IN2R Switch'						value true}
			{ name 'MIXINR IN2R Volume' 					value 0  }
			{ name 'ADCL Mux'					            value 0}
			{ name 'ADCR Mux'					            value 0}
			{ name 'Right Sidetone'				            value 0}
			{ name 'Left Sidetone'				            value 0}
			{ name 'AIF2DAC2L Mixer Left Sidetone Switch'	value 1}
			{ name 'AIF2DAC2R Mixer Left Sidetone Switch'	value 1}
			{ name 'AIF2DAC2R Mixer Right Sidetone Switch'	value 1}
			{ name 'AIF2DAC2L Mixer Right Sidetone Switch' 	value 1}
			{ name 'AIF3ADC Mux'				            value 'AIF2ADCDAT'}
			{ name 'AIF2DAC Mux'				            value 'AIF3DACDAT'}
			{ name 'DAC2 Left Sidetone Volume'				value 12}
			{ name 'DAC2 Right Sidetone Volume'				value 12}
			{ name 'DAC2 Switch'							value[true true]}
			{ name 'DAC2 Volume'							value[96 96]}
		##AIF2DACL to DACL to MIXOUTL to LINEOUT
			{ name 'DAC1L Mixer AIF2 Switch'			    value true}
			{ name 'DAC1 Switch'							value[true true]}
			{ name 'DAC1 Volume'							value[63 63]}
			{ name 'Left Output Mixer DAC Switch'			value true}
			{ name 'Left Output Mixer DAC Volume'		    value 7 }
			{ name 'LINEOUT1 Mixer Output Switch'		    value true}
			{ name 'LINEOUT1P Switch'					    value true}
			{ name 'LINEOUT1N Switch'					    value true}
			{ name 'LINEOUT1 Volume'					    value 1}
			{ name 'Output Switch'							value[true true]}
			{ name 'Output Volume'							value[63 63]}
			{ name 'AIF2ADC Volume'						    value[63 0]}
			{ name 'ADC OSR'				                value 0}
		]
	}
}
pcm.AndroidPlayback_Bluetooth_normal {
	type hooks
    slave {
		pcm{
			type hw
			card 0
			device 0
		}
	#	rate 48000
    }
	hooks.0 {
		type ctl_elems
		hook_args [
			{

			}
		]
	}
}
##
## # HDMI
##
pcm.AndroidPlayback_Speaker_HDMI_normal{
    type hooks
    slave.pcm{
		type hw
		card 0
		device 0
	}
    hooks.0 {
        type ctl_elems
        hook_args [
			{ name 'Speaker Switch'				value[false false]}
			{ name 'Headphone Switch'				value[false false]}
		]
	}
}
pcm.AndroidPlayback_HDMI_normal{
    type hooks
    slave.pcm{
		type hw
		card 0
		device 0
	}
    hooks.0 {
        type ctl_elems
        hook_args [
			{ name 'Speaker Switch'				value[false false]}
			{ name 'Headphone Switch'				value[false false]}
		]
	}
}

