]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
conf/ucm: bytcr-rt5651: Add bytcr-rt5651-mono-spk-in2-mic-hp-swapped config
authorHans de Goede <hdegoede@redhat.com>
Wed, 8 Aug 2018 09:05:42 +0000 (11:05 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 24 Sep 2019 10:52:12 +0000 (12:52 +0200)
Add a longname profile for devices with a mono speaker, the Internal Mic
hooked up to IN2 and the left and right channels of their headphones
output swapped.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/HiFi.conf [new file with mode: 0644]
ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/bytcr-rt5651-mono-spk-in2-mic-hp-swapped.conf [new file with mode: 0644]
ucm/rt5651/HeadPhones-swapped.conf [new file with mode: 0644]

diff --git a/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/HiFi.conf b/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/HiFi.conf
new file mode 100644 (file)
index 0000000..777ed78
--- /dev/null
@@ -0,0 +1,27 @@
+# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
+
+<searchdir:ucm>
+
+SectionVerb {
+       EnableSequence [
+               cdev "hw:bytcrrt5651"
+               <bytcr/PlatformEnableSeq.conf>
+               <rt5651/EnableSeq.conf>
+       ]
+
+       DisableSequence [
+               cdev "hw:bytcrrt5651"
+               <bytcr/PlatformDisableSeq.conf>
+       ]
+
+       Value {
+               PlaybackPCM "hw:bytcrrt5651"
+               CapturePCM "hw:bytcrrt5651"
+       }
+}
+
+<rt5651/MonoSpeaker.conf>
+<rt5651/HeadPhones-swapped.conf>
+
+<rt5651/IN2-InternalMic.conf>
+<rt5651/IN3-HeadsetMic.conf>
diff --git a/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/bytcr-rt5651-mono-spk-in2-mic-hp-swapped.conf b/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/bytcr-rt5651-mono-spk-in2-mic-hp-swapped.conf
new file mode 100644 (file)
index 0000000..916fbc1
--- /dev/null
@@ -0,0 +1,10 @@
+# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651
+
+SectionUseCase."HiFi" {
+       File "../bytcr-rt5651-mono-spk-in2-mic-hp-swapped/HiFi.conf"
+       Comment "Play HiFi quality Music"
+}
+
+SectionDefaults [
+       cdev "hw:bytcrrt5651"
+]
diff --git a/ucm/rt5651/HeadPhones-swapped.conf b/ucm/rt5651/HeadPhones-swapped.conf
new file mode 100644 (file)
index 0000000..e79b40a
--- /dev/null
@@ -0,0 +1,42 @@
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Speaker"
+               "MonoSpeaker"
+       ]
+
+       EnableSequence [
+               cdev "hw:bytcrrt5651"
+
+               # Swap left and right
+               cset "name='Stereo DAC MIXL DAC R1 Switch' on"
+               cset "name='Stereo DAC MIXL DAC L1 Switch' off"
+               cset "name='Stereo DAC MIXR DAC L1 Switch' on"
+               cset "name='Stereo DAC MIXR DAC R1 Switch' off"
+
+               cset "name='Headphone Switch' on"
+               cset "name='HPO L Playback Switch' on"
+               cset "name='HPO R Playback Switch' on"
+               # Done after turning the HP on to keep the bias and clk on
+               cset "name='Speaker Switch' off"
+               cset "name='LOUT L Playback Switch' off"
+               cset "name='LOUT R Playback Switch' off"
+       ]
+
+       DisableSequence [
+               cdev "hw:bytcrrt5651"
+               # Disabling the HP switches is done by the Speaker EnableSeq
+
+               # Unswap left and right
+               cset "name='Stereo DAC MIXL DAC L1 Switch' on"
+               cset "name='Stereo DAC MIXL DAC R1 Switch' off"
+               cset "name='Stereo DAC MIXR DAC R1 Switch' on"
+               cset "name='Stereo DAC MIXR DAC L1 Switch' off"
+       ]
+
+       Value {
+               PlaybackChannels "2"
+               JackControl "Headphone Jack"
+       }
+}