]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
codecs/rt5672: Add hardware volume-control support
authorHans de Goede <hdegoede@redhat.com>
Wed, 17 Feb 2021 14:34:36 +0000 (15:34 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 13 Mar 2021 15:54:57 +0000 (16:54 +0100)
For the speaker and DMICs configs this uses "DAC1 Playback Volume"
resp. "ADC Capture Volume" as main mixer elements, since there are
no other volume-controls in their paths.

For the (analog) headset-mic and headphones this used the analog
"IN1 Boost" resp. "HP Playback Volume" controls as main mixer elements
while using the  "ADC Capture Volume" resp. "DAC1 Playback Volume"
(which have the mute switches) as master mixer elements.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/rt5672/DMIC1.conf
ucm2/codecs/rt5672/DMIC2.conf
ucm2/codecs/rt5672/HeadPhones.conf
ucm2/codecs/rt5672/HeadsetMic.conf
ucm2/codecs/rt5672/MonoSpeaker.conf
ucm2/codecs/rt5672/Speaker.conf

index 201828367dde78878d2646679896d51c931dd2ce..ca65d28ae52cdd3f1c42850a849cc459f7313b36 100644 (file)
@@ -23,5 +23,10 @@ SectionDevice."Mic1" {
        Value {
                CapturePriority 100
                CapturePCM "hw:${CardId}"
+               # The DMIC ofcourse has no analog volume controls
+               # Use the digital ADC master control as MixerElem
+               CaptureMixerElem "ADC"
+               CaptureVolume "ADC Capture Volume"
+               CaptureSwitch "ADC Capture Switch"
        }
 }
index 48e61705b5f61ccb18749d80097c39d004cba94f..2a2f9fe4a3fa43a259ec7f4a3a3c48332b069f2b 100644 (file)
@@ -23,5 +23,10 @@ SectionDevice."Mic2" {
        Value {
                CapturePriority 200
                CapturePCM "hw:${CardId}"
+               # The DMIC ofcourse has no analog volume controls
+               # Use the digital ADC master control as MixerElem
+               CaptureMixerElem "ADC"
+               CaptureVolume "ADC Capture Volume"
+               CaptureSwitch "ADC Capture Switch"
        }
 }
index 2c8d6e8372b309b319002aa3b8d7937b46a1259a..e22d4998294399f4b251f07edccda5934b1c532e 100644 (file)
@@ -18,5 +18,8 @@ SectionDevice."Headphones" {
                PlaybackPriority 300
                PlaybackPCM "hw:${CardId}"
                JackControl "Headphone Jack"
+               PlaybackMixerElem "HP"
+               PlaybackMasterElem "DAC1"
+               PlaybackVolume "HP Playback Volume"
        }
 }
index fc061b0b4346388a9457520417c7bea0ffa82578..103e93da134f870e93230de6008e4d06c3e81f8b 100644 (file)
@@ -26,5 +26,8 @@ SectionDevice."Headset" {
                CapturePriority 300
                CapturePCM "hw:${CardId}"
                JackControl "Headset Mic Jack"
+               CaptureMixerElem "IN1 Boost"
+               CaptureMasterElem "ADC"
+               CaptureVolume "IN1 Boost Volume"
        }
 }
index f08c9c6de12c3a2d534804d39c8a235f95b41da5..e4addf4f1bfb216e7faa8d56a883edd581668ee1 100644 (file)
@@ -21,5 +21,10 @@ SectionDevice."Speaker2" {
        Value {
                PlaybackPriority 100
                PlaybackPCM "hw:${CardId}"
+               # The speaker ampl. path on the 5672 has no speaker vol control
+               # Use the digital DAC1 master control as MixerElem
+               PlaybackMixerElem "DAC1"
+               PlaybackVolume "DAC1 Playback Volume"
+               PlaybackSwitch "DAC1 Playback Switch"
        }
 }
index 8b7bcf88e964e30278edf5e0d7628659688cfce2..9674c6be657e4e04c21eae7b0e4980907efa9327 100644 (file)
@@ -17,5 +17,10 @@ SectionDevice."Speaker1" {
        Value {
                PlaybackPriority 200
                PlaybackPCM "hw:${CardId}"
+               # The speaker ampl. path on the 5672 has no speaker vol control
+               # Use the digital DAC1 master control as MixerElem
+               PlaybackMixerElem "DAC1"
+               PlaybackVolume "DAC1 Playback Volume"
+               PlaybackSwitch "DAC1 Playback Switch"
        }
 }