de94b2
# Use case Configuration for sof-hda-dsp
de94b2
de94b2
SectionVerb {
de94b2
	EnableSequence [
de94b2
		cset "name='Auto-Mute Mode' 'Disabled'"
de94b2
		cset "name='Master Playback Volume' 100"
de94b2
		cset "name='Speaker Playback Volume' 100"
de94b2
		cset "name='Headphone Playback Volume' 100"
de94b2
		cset "name='Capture Volume' 50"
de94b2
		cset "name='Mic Boost Volume' 100"
de94b2
		cset "name='Dmic0 Capture Volume' 100"
de94b2
	]
de94b2
}
de94b2
de94b2
SectionDevice."Headphones1" {
de94b2
	Comment "Headphones"
de94b2
de94b2
	EnableSequence [
de94b2
		cset "name='Headphone Playback Switch' on"
de94b2
	]
de94b2
de94b2
	DisableSequence [
de94b2
		cset "name='Headphone Playback Switch' off"
de94b2
	]
de94b2
de94b2
	Value {
de94b2
		PlaybackPriority 200
de94b2
		PlaybackPCM "hw:${CardId},0"
de94b2
		PlaybackMixerElem "Headphone"
de94b2
		PlaybackMixerMaster "Master"
de94b2
		PlaybackVolume "Headphone Playback Volume"
de94b2
		PlaybackSwitch "Headphone Playback Switch"
de94b2
		PlaybackChannels "2"
de94b2
		If.jack {
de94b2
			Condition {
de94b2
				Type ControlExists
de94b2
				Control "iface=CARD,name='Headphone Mic Jack'"
de94b2
			}
de94b2
			True {
de94b2
				JackControl "Headphone Mic Jack"
de94b2
			}
de94b2
			False {
de94b2
				JackControl "Headphone Jack"
de94b2
			}
de94b2
		}
de94b2
	}
de94b2
}
de94b2
de94b2
SectionDevice."Speaker" {
de94b2
	Comment "Speaker"
de94b2
de94b2
	If.seq {
de94b2
		Condition {
de94b2
			Type ControlExists
de94b2
			Control "name='Bass Speaker Playback Switch'"
de94b2
		}
de94b2
		True {
de94b2
			EnableSequence [
de94b2
				cset "name='Speaker Playback Switch' on"
de94b2
				cset "name='Bass Speaker Playback Switch' on"
de94b2
			]
de94b2
de94b2
			DisableSequence [
de94b2
				cset "name='Speaker Playback Switch' off"
de94b2
				cset "name='Bass Speaker Playback Switch' off"
de94b2
			]
de94b2
		}
de94b2
		False {
de94b2
			EnableSequence [
de94b2
				cset "name='Speaker Playback Switch' on"
de94b2
			]
de94b2
de94b2
			DisableSequence [
de94b2
				cset "name='Speaker Playback Switch' off"
de94b2
			]
de94b2
		}
de94b2
	}
de94b2
de94b2
	Value {
de94b2
		PlaybackPriority 100
de94b2
		PlaybackPCM "hw:${CardId},0"
de94b2
		PlaybackMixerElem "Speaker"
de94b2
		PlaybackMasterElem "Master"
de94b2
		PlaybackVolume "Speaker Playback Volume"
de94b2
		PlaybackSwitch "Speaker Playback Switch"
de94b2
		PlaybackChannels "2"
de94b2
	}
de94b2
}
de94b2
de94b2
If.monomic {
de94b2
	Condition {
de94b2
		Type ControlExists
de94b2
		Control "name='Input Source'"
de94b2
		ControlEnum "Headphone Mic"
de94b2
	}
de94b2
	After.SectionDevice "Mic"
de94b2
	True {
de94b2
		SectionDevice."Headphones2" {
de94b2
			Comment "Headphones Stereo Microphone"
de94b2
de94b2
			ConflictingDevice [
de94b2
				"HeadsetMic"
de94b2
			]
de94b2
de94b2
			EnableSequence [
de94b2
				cset "name='Input Source' 'Headphone Mic'"
de94b2
			]
de94b2
de94b2
			Value {
de94b2
				CapturePriority 200
de94b2
				<sof-hda-dsp/HDA-Capture-value.conf>
de94b2
				JackControl "Headphone Mic Jack"
de94b2
			}
de94b2
		}
de94b2
de94b2
		SectionDevice."Headset" {
de94b2
			Comment "Headset Mono Microphone"
de94b2
de94b2
			EnableSequence [
de94b2
				cset "name='Input Source' Headset Mic"
de94b2
			]
de94b2
de94b2
			Value {
de94b2
				CapturePriority 300
de94b2
				<sof-hda-dsp/HDA-Capture-value.conf>
de94b2
				JackControl "Headphone Mic Jack"
de94b2
			}
de94b2
		}
de94b2
	}
de94b2
	False {
de94b2
		SectionDevice."Headphones2" {
de94b2
			Comment "Headphones Stereo Microphone"
de94b2
de94b2
			Value {
de94b2
				CapturePriority 200
de94b2
				<sof-hda-dsp/HDA-Capture-value.conf>
de94b2
				JackControl "Mic Jack"
de94b2
			}
de94b2
		}
de94b2
	}
de94b2
}
de94b2
de94b2
SectionDevice."Mic" {
de94b2
	Comment "Digital Microphone"
de94b2
de94b2
	Value {
de94b2
		CapturePriority 100
de94b2
		CapturePCM "hw:${CardId},6"
de94b2
		CaptureChannels 4
de94b2
		If.vol {
de94b2
			Condition {
de94b2
				Type ControlExists
de94b2
				Control "name='Dmic0 Capture Switch'"
de94b2
			}
de94b2
			True {
de94b2
				CaptureMixerElem "Dmic0"
de94b2
				CaptureVolume "Dmic0 Capture Volume"
de94b2
				CaptureSwitch "Dmic0 Capture Switch"
de94b2
			}
de94b2
			False {
de94b2
				# v1.3 SOF firmware
de94b2
				CaptureMixerElem "PGA10.0 10 Master"
de94b2
				CaptureVolume "PGA10.0 10 Master Capture Volume"
de94b2
			}
de94b2
		}
de94b2
	}
de94b2
}
de94b2
de94b2
<sof-hda-dsp/Hdmi.conf>