OSDN Git Service

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 2018283..ca65d28 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 48e6170..2a2f9fe 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 2c8d6e8..e22d499 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 fc061b0..103e93d 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 f08c9c6..e4addf4 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 8b7bcf8..9674c6b 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"
        }
 }