]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-essx8336: use the right mixers for speaker/headphone
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 2 Apr 2022 10:03:06 +0000 (07:03 -0300)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2022 13:07:46 +0000 (15:07 +0200)
On es8316 and es8336, both speaker and headphone share the same
mixer. Adjust the controls to reflect the actual control names,
at the same way as bytcht-es8316.

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/144
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Intel/sof-essx8336/HiFi.conf

index 1a57a2ba302eb927dcca9bf58c3fce43368e16c8..fc155f82f36d9c384458ea71d526aacc7fd10361 100644 (file)
@@ -21,18 +21,21 @@ If.amic {
                        "Headset"
                ]
 
-               Value {
-                       CapturePriority 100
-                       CapturePCM "hw:${CardId}"
-               }
-
                EnableSequence [
+                       cset "name='Differential Mux' lin1-rin1"
                        cset "name='Internal Mic Switch' on"
                ]
 
                DisableSequence [
                        cset "name='Internal Mic Switch' off"
                ]
+
+               Value {
+                       CapturePriority 100
+                       CapturePCM "hw:${CardId}"
+                       CaptureMixerElem "ADC PGA Gain"
+                       CaptureMasterElem "ADC"
+               }
        }
 }
 
@@ -65,7 +68,7 @@ If.dmic {
 }
 
 SectionDevice."Speaker" {
-       Comment "Speaker"
+       Comment "Speakers"
 
        ConflictingDevice [
                "Headphones"
@@ -81,10 +84,10 @@ SectionDevice."Speaker" {
        Value {
                PlaybackPriority 100
                PlaybackPCM "hw:${CardId}"
-               PlaybackMixerElem "Speaker"
-               PlaybackMasterElem "Master"
-               PlaybackVolume "Speaker Volume"
-               PlaybackSwitch "Speaker Switch"
+               # The es8316 only has a HP-amp which is muxed to the speaker
+               # or to the headpones output
+               PlaybackMixerElem "Headphone Mixer"
+               PlaybackMasterElem "DAC"
        }
 }
 
@@ -95,21 +98,11 @@ SectionDevice."Headphones" {
                "Speaker"
        ]
 
-       EnableSequence [
-               cset "name='Headphone Switch' on"
-       ]
-
-       DisableSequence [
-               cset "name='Headphone Switch' off"
-       ]
-
        Value {
                PlaybackPriority 300
                PlaybackPCM "hw:${CardId}"
-               PlaybackMixerElem "Headphone"
-               PlaybackMasterElem "Master"
-               PlaybackVolume "Headphone Volume"
-               PlaybackSwitch "Headphone Switch"
+               PlaybackMixerElem "Headphone Mixer"
+               PlaybackMasterElem "DAC"
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -129,16 +122,19 @@ SectionDevice."Headset" {
        }
 
        EnableSequence [
-               cset "name='Headset Mic Switch' on"
+               cset "name='Headset Switch' on"
+               cset "name='Digital Mic Mux' 'dmic disable'"
        ]
 
        DisableSequence [
-               cset "name='Headset Mic Switch' off"
+               cset "name='Headset Switch' on"
        ]
 
        Value {
                CapturePriority 300
                CapturePCM "hw:${CardId}"
+               CaptureMixerElem "ADC PGA Gain"
+               CaptureMasterElem "ADC"
                JackControl "Headset Mic Jack"
        }
 }