From 5579c3abcb76bfc6c33d232562983a73f201ab29 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 8 Aug 2018 11:05:40 +0200 Subject: [PATCH] conf/ucm: bytcr-rt5651: Add mono speaker output profile 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 Signed-off-by: Hans de Goede Signed-off-by: Jaroslav Kysela --- ucm/bytcr-rt5651/HiFi.conf | 2 +- ucm/rt5651/EnableSeq.conf | 2 ++ ucm/rt5651/HeadPhones.conf | 1 + ucm/rt5651/MonoSpeaker.conf | 36 ++++++++++++++++++++++++++++++++++++ ucm/rt5651/Speaker.conf | 1 + 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 ucm/rt5651/MonoSpeaker.conf diff --git a/ucm/bytcr-rt5651/HiFi.conf b/ucm/bytcr-rt5651/HiFi.conf index 961b260..8733403 100644 --- a/ucm/bytcr-rt5651/HiFi.conf +++ b/ucm/bytcr-rt5651/HiFi.conf @@ -21,9 +21,9 @@ SectionVerb { } + - diff --git a/ucm/rt5651/EnableSeq.conf b/ucm/rt5651/EnableSeq.conf index 37bffec..6fb3c1f 100644 --- a/ucm/rt5651/EnableSeq.conf +++ b/ucm/rt5651/EnableSeq.conf @@ -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" diff --git a/ucm/rt5651/HeadPhones.conf b/ucm/rt5651/HeadPhones.conf index b9323a3..eaf5fdf 100644 --- a/ucm/rt5651/HeadPhones.conf +++ b/ucm/rt5651/HeadPhones.conf @@ -3,6 +3,7 @@ SectionDevice."Headphones" { ConflictingDevice [ "Speaker" + "MonoSpeaker" ] EnableSequence [ diff --git a/ucm/rt5651/MonoSpeaker.conf b/ucm/rt5651/MonoSpeaker.conf new file mode 100644 index 0000000..0c3492f --- /dev/null +++ b/ucm/rt5651/MonoSpeaker.conf @@ -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" + } +} diff --git a/ucm/rt5651/Speaker.conf b/ucm/rt5651/Speaker.conf index 44168cc..c109152 100644 --- a/ucm/rt5651/Speaker.conf +++ b/ucm/rt5651/Speaker.conf @@ -2,6 +2,7 @@ SectionDevice."Speaker" { Comment "Speakers" ConflictingDevice [ + "MonoSpeaker" "Headphones" ] -- 2.47.1