]> git.alsa-project.org Git - alsa-lib.git/commitdiff
conf/ucm: bytcr-rt5651: Add mono speaker output profile
authorHans de Goede <hdegoede@redhat.com>
Wed, 8 Aug 2018 09:05:40 +0000 (11:05 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 8 Aug 2018 09:44:13 +0000 (11:44 +0200)
Many rt5651 devices only have a single speaker and even though there is
some external mixing done on the PCB, the quality of that mixing is quite
poor and various sounds come out garbled when relying on the on PCB mixing.

Using the codecs builtin mixer to mix left + right to the left output works
much better. This commits adds a new MonoSpeaker.conf output profile which
allows this.

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>
src/conf/ucm/bytcr-rt5651/HiFi.conf
src/conf/ucm/rt5651/EnableSeq.conf
src/conf/ucm/rt5651/HeadPhones.conf
src/conf/ucm/rt5651/Makefile.am
src/conf/ucm/rt5651/MonoSpeaker.conf [new file with mode: 0644]
src/conf/ucm/rt5651/Speaker.conf

index 961b26040744c451e3ab2f6950e8205da3d97f6a..8733403cf28d5d90e21ef2b7962275a932406605 100644 (file)
@@ -21,9 +21,9 @@ SectionVerb {
 }
 
 <rt5651/Speaker.conf>
+<rt5651/MonoSpeaker.conf>
 <rt5651/HeadPhones.conf>
 
-
 <rt5651/IN1-InternalMic.conf>
 <rt5651/IN2-InternalMic.conf>
 <rt5651/IN12-InternalMic.conf>
index 37bffecbcb3cf27de414417d09c1a5b21a9ee866..6fb3c1f28d8b6431afbdaee5c171f3df840c21f4 100644 (file)
@@ -11,6 +11,8 @@ cset "name='IF1 ASRC Switch' on"
 cset "name='LOUT L Playback Switch' off"
 cset "name='LOUT R Playback Switch' off"
 cset "name='Stereo DAC MIXL DAC L1 Switch' on"
+cset "name='Stereo DAC MIXL DAC R1 Switch' off"
+cset "name='Stereo DAC MIXR DAC L1 Switch' off"
 cset "name='Stereo DAC MIXR DAC R1 Switch' on"
 cset "name='Stereo1 ADC MIXR ADC1 Switch' on"
 cset "name='Stereo1 ADC MIXR ADC2 Switch' on"
index b9323a36c2f635310c0274de7d32f21b54e65ec4..eaf5fdfc4e7c8e05d4f373d1a40bb0c944fd0572 100644 (file)
@@ -3,6 +3,7 @@ SectionDevice."Headphones" {
 
        ConflictingDevice [
                "Speaker"
+               "MonoSpeaker"
        ]
 
        EnableSequence [
index abd45ad7b37091f129a39f0b6cb934df5c8fff9d..a9600ed6dce945e51a78bb230c4375b3bd86b799 100644 (file)
@@ -2,5 +2,5 @@ alsaconfigdir = @ALSA_CONFIG_DIR@
 ucmdir = $(alsaconfigdir)/ucm/rt5651
 ucm_DATA = EnableSeq.conf HeadPhones.conf IN1-InternalMic.conf \
           IN2-InternalMic.conf IN12-InternalMic.conf IN3-HeadsetMic.conf \
-          Speaker.conf
+          Speaker.conf MonoSpeaker.conf
 EXTRA_DIST = $(ucm_DATA)
diff --git a/src/conf/ucm/rt5651/MonoSpeaker.conf b/src/conf/ucm/rt5651/MonoSpeaker.conf
new file mode 100644 (file)
index 0000000..0c3492f
--- /dev/null
@@ -0,0 +1,36 @@
+SectionDevice."MonoSpeaker" {
+       Comment "Mono Speaker"
+
+       ConflictingDevice [
+               "Speaker"
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cdev "hw:bytcrrt5651"
+
+               # Map left and right input on left
+               cset "name='Stereo DAC MIXR DAC R1 Switch' off"
+               cset "name='Stereo DAC MIXL DAC R1 Switch' on"
+
+               cset "name='Speaker Switch' on"
+               cset "name='LOUT L Playback Switch' on"
+               # Done after turning the speaker on to keep the bias and clk on
+               cset "name='Headphone Switch' off"
+               cset "name='HPO L Playback Switch' off"
+               cset "name='HPO R Playback Switch' off"
+       ]
+
+       DisableSequence [
+               cdev "hw:bytcrrt5651"
+               # Disabling the  switches is done by the Speaker EnableSeq
+
+               # Undo mono mapping
+               cset "name='Stereo DAC MIXL DAC R1 Switch' off"
+               cset "name='Stereo DAC MIXR DAC R1 Switch' on"
+       ]
+
+       Value {
+               PlaybackChannels "2"
+       }
+}
index 44168cc5526acc6982f878f9c242b698cb8cf21f..c1091523700c95cd604f970067c2c46deb152c90 100644 (file)
@@ -2,6 +2,7 @@ SectionDevice."Speaker" {
        Comment "Speakers"
 
        ConflictingDevice [
+               "MonoSpeaker"
                "Headphones"
        ]