diff mbox series

[alsa-ucm-conf,v2,6/7] codecs/rt5640: Add hardware volume-control support

Message ID 20210308220554.76111-7-hdegoede@redhat.com
State New
Headers show
Series codecs/rt5640: Cleanup + HW volume control support | expand

Commit Message

Hans de Goede March 8, 2021, 10:05 p.m. UTC
Add hardware volume-control support for the rt5640 codec.

Note this commit does not add support for the (digital) master
ADC/DAC Volume / Mute controls. There are 2 of each, and which
one should be used depends on which AIF is being used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/codecs/rt5640/HeadPhones.conf      | 2 ++
 ucm2/codecs/rt5640/HeadsetMic.conf      | 2 ++
 ucm2/codecs/rt5640/IN1-InternalMic.conf | 2 ++
 ucm2/codecs/rt5640/IN3-InternalMic.conf | 2 ++
 ucm2/codecs/rt5640/MonoSpeaker.conf     | 2 ++
 ucm2/codecs/rt5640/Speaker.conf         | 2 ++
 6 files changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/ucm2/codecs/rt5640/HeadPhones.conf b/ucm2/codecs/rt5640/HeadPhones.conf
index 1f4316d..5535111 100644
--- a/ucm2/codecs/rt5640/HeadPhones.conf
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
@@ -35,5 +35,7 @@  SectionDevice."Headphones" {
 		PlaybackPriority 300
 		PlaybackPCM "hw:${CardId}"
 		JackControl "Headphone Jack"
+		PlaybackMixerElem "HP"
+		PlaybackVolume "HP Playback Volume"
 	}
 }
diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf b/ucm2/codecs/rt5640/HeadsetMic.conf
index 829e4e6..8479672 100644
--- a/ucm2/codecs/rt5640/HeadsetMic.conf
+++ b/ucm2/codecs/rt5640/HeadsetMic.conf
@@ -41,5 +41,7 @@  SectionDevice."Headset" {
 		CapturePriority 200
 		CapturePCM "hw:${CardId}"
 		JackControl "Headset Mic Jack"
+		CaptureMixerElem "IN2 Boost"
+		CaptureVolume "IN2 Boost"
 	}
 }
diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf b/ucm2/codecs/rt5640/IN1-InternalMic.conf
index d7c419e..a317388 100644
--- a/ucm2/codecs/rt5640/IN1-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf
@@ -32,5 +32,7 @@  SectionDevice."Mic" {
 	Value {
 		CapturePriority 100
 		CapturePCM "hw:${CardId}"
+		CaptureMixerElem "IN1 Boost"
+		CaptureVolume "IN1 Boost"
 	}
 }
diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf b/ucm2/codecs/rt5640/IN3-InternalMic.conf
index 3e330e6..ef4eaba 100644
--- a/ucm2/codecs/rt5640/IN3-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf
@@ -32,5 +32,7 @@  SectionDevice."Mic" {
 	Value {
 		CapturePriority 100
 		CapturePCM "hw:${CardId}"
+		CaptureMixerElem "IN3 Boost"
+		CaptureVolume "IN3 Boost"
 	}
 }
diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf b/ucm2/codecs/rt5640/MonoSpeaker.conf
index 654edc3..3cbeafd 100644
--- a/ucm2/codecs/rt5640/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5640/MonoSpeaker.conf
@@ -29,5 +29,7 @@  SectionDevice."Speaker" {
 	Value {
 		PlaybackPriority 100
 		PlaybackPCM "hw:${CardId}"
+		PlaybackMixerElem "Speaker"
+		PlaybackVolume "Speaker Playback Volume"
 	}
 }
diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf
index 3264cc3..0924f9c 100644
--- a/ucm2/codecs/rt5640/Speaker.conf
+++ b/ucm2/codecs/rt5640/Speaker.conf
@@ -29,5 +29,7 @@  SectionDevice."Speaker" {
 	Value {
 		PlaybackPriority 100
 		PlaybackPCM "hw:${CardId}"
+		PlaybackMixerElem "Speaker"
+		PlaybackVolume "Speaker Playback Volume"
 	}
 }