diff options
author | Jaroslav Kysela <perex@perex.cz> | 2019-11-28 17:01:50 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2019-11-28 17:45:03 +0100 |
commit | f6e9eef803585793ba815e610d1f747df4f8d98c (patch) | |
tree | c2206e91e97e5e9b9ab545637cb387fcbe57dbbb | |
parent | 980c3ae825a149ec1dbadcec2410a8c275233834 (diff) |
sof-hda-dsp: remove standalone Bass Speaker, fix mixer values
Use the mixer values MixerElem and MasterElem by the latest use-case.h.
Merge the Bass Speaker to Speaker. The standalone Speaker is unusable
on Lenovo Carbon X1 7th gen.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | ucm2/sof-hda-dsp/HiFi.conf | 103 |
1 files changed, 45 insertions, 58 deletions
diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf index 372fd02..f1cfa0b 100644 --- a/ucm2/sof-hda-dsp/HiFi.conf +++ b/ucm2/sof-hda-dsp/HiFi.conf @@ -2,7 +2,6 @@ SectionVerb { EnableSequence [ - cset "name='Master Playback Switch' on" cset "name='Capture Switch' on" ] } @@ -20,23 +19,13 @@ SectionDevice."Headphone" { Value { PlaybackPCM "hw:${CardId},0" - PlaybackMixerID "Headphone" + PlaybackMixerElem "Headphone" + PlaybackMixerMaster "Master" PlaybackVolume "Headphone Playback Volume" PlaybackSwitch "Headphone Playback Switch" PlaybackChannels "2" - If.1 { - Condition { - Type ControlExists - Control "name='Bass Speaker Playback Switch'" - } - True { - JackHWMute "Speaker BassSpeaker" - } - False { - JackHWMute "Speaker" - } - } - If.2 { + JackHWMute "Speaker" + If.jack { Condition { Type ControlExists Control "iface=CARD,name='Headphone Mic Jack'" @@ -54,56 +43,41 @@ SectionDevice."Headphone" { SectionDevice."Speaker" { Comment "Speaker" - EnableSequence [ - cset "name='Speaker Playback Switch' on" - ] - - DisableSequence [ - cset "name='Speaker Playback Switch' off" - ] - - Value { - PlaybackPCM "hw:${CardId},0" - PlaybackMixerID "Speaker" - PlaybackVolume "Speaker Playback Volume" - PlaybackSwitch "Speaker Playback Switch" - PlaybackChannels "2" - } -} - -If.1 { - After.SectionDevice "Speaker" - Condition { - Type ControlExists - Control "name='Bass Speaker Playback Switch'" - } - True { - SectionDevice."BassSpeaker" { - Comment "Bass Speaker" - - ConflictingDevice [ - "Speaker" - ] - + If.seq { + Condition { + Type ControlExists + Control "name='Bass Speaker Playback Switch'" + } + True { EnableSequence [ - cset "name='Bass Speaker Playback Switch' on" cset "name='Speaker Playback Switch' on" + cset "name='Bass Speaker Playback Switch' on" ] DisableSequence [ cset "name='Speaker Playback Switch' off" cset "name='Bass Speaker Playback Switch' off" ] + } + False { + EnableSequence [ + cset "name='Speaker Playback Switch' on" + ] - Value { - PlaybackPCM "hw:${CardId},0" - PlaybackMixerID "Speaker" - PlaybackVolume "Speaker Playback Volume" - PlaybackSwitch "Speaker Playback Switch" - PlaybackChannels "2" - } + DisableSequence [ + cset "name='Speaker Playback Switch' off" + ] } } + + Value { + PlaybackPCM "hw:${CardId},0" + PlaybackMixerElem "Speaker" + PlaybackMasterElem "Master" + PlaybackVolume "Speaker Playback Volume" + PlaybackSwitch "Speaker Playback Switch" + PlaybackChannels "2" + } } SectionDevice."HeadsetMic" { @@ -111,7 +85,7 @@ SectionDevice."HeadsetMic" { Value { CapturePCM "hw:${CardId},0" - CaptureMixerID "Capture" + CaptureMixerElem "Capture" CaptureVolume "Capture Volume" CaptureSwitch "Capture Switch" CaptureChannels "2" @@ -128,9 +102,22 @@ SectionDevice."DigitalMic" { Value { CapturePCM "hw:${CardId},6" - CaptureMixerID "Dmic0 Capture" - CaptureVolume "Dmic0 Capture Volume" - CaptureSwitch "Dmic0 Capture Switch" CaptureChannels "2" + If.vol { + Condition { + Type ControlExists + Control "name='Dmic0 Capture Switch'" + } + True { + CaptureMixerElem "Dmic0 Capture" + CaptureVolume "Dmic0 Capture Volume" + CaptureSwitch "Dmic0 Capture Switch" + } + False { + # v1.3 SOF firmware + CaptureMixerElem "PGA10.0 10 Master" + CaptureVolume "PGA10.0 10 Master Capture Volume" + } + } } } |