diff mbox series

[alsa-ucm-conf,2/2] codecs/rt5640: Rename DAPM PIN switches to avoid having 2 Speaker and Headphones switches

Message ID 20210718175750.12353-2-hdegoede@redhat.com
State New
Headers show
Series [alsa-ucm-conf,1/2] bytcr-rt5640: Fix 'Headphone Switch' / 'Headset Mic Switch' no longer getting set | expand

Commit Message

Hans de Goede July 18, 2021, 5:57 p.m. UTC
Now that we rename the mutes from their weird 'Channel Switch' postfix
to the standard 'Playback Switch' postfix we end up having 2 Switches
for the 'Speaker' resp. 'Headphones' volume controls, with 1 of the two
getting ignored by the alsa-lib mixer code because it is duplicate.

This is caused by the bytcr-rt5640 machine driver adding DAPM PIN
Switches which are named 'Headphone Switch' resp. 'Speaker Switch',
rename these to 'Headphone Output Switch' / 'Speaker Output Switch'
so that they get seen as separate controls by the alsa-lib mixer code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/codecs/rt5640/init.conf | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/ucm2/codecs/rt5640/init.conf b/ucm2/codecs/rt5640/init.conf
index 38baee4..0756b4a 100644
--- a/ucm2/codecs/rt5640/init.conf
+++ b/ucm2/codecs/rt5640/init.conf
@@ -5,8 +5,13 @@  LibraryConfig.remap.Config {
 		"name='IN1 Boost'" "name='IN1 Boost Capture Volume'"
 		"name='IN2 Boost'" "name='IN2 Boost Capture Volume'"
 		"name='IN3 Boost'" "name='IN3 Boost Capture Volume'"
+		# Rename the 'Headphone Switch' DAPM PIN switch to avoid it getting
+		# grouped with 'Headphone Playback Volume'
+		"name='Headphone Switch'" "name='Headphone Output Switch'"
 		"name='HP Playback Volume'" "name='Headphone Playback Volume'"
 		"name='HP Channel Switch'" "name='Headphone Playback Switch'"
+		# Idem for the 'Speaker Switch'
+		"name='Speaker Switch'" "name='Speaker Output Switch'"
 		"name='Speaker Channel Switch'" "name='Speaker Playback Switch'"
 	}