From: AngeloGioacchino Del Regno Date: Tue, 26 Mar 2024 10:38:45 +0000 (+0100) Subject: ucm2: MediaTek: mt8195-sof: Add support for Tomato RT5682s X-Git-Tag: v1.2.12~19 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=7c5038feaa92fa20105d7a4e925b6d94183149bf;p=alsa-ucm-conf.git ucm2: MediaTek: mt8195-sof: Add support for Tomato RT5682s A later revision of the MT8195 Cherry Tomato Chromebook (Acer Chromebook Spin 513 CP513-2H, Revision 3 and 4) are using the RT5682s codec instead of RT5682i. The differences are only about a couple of missing switches, where the 'i' variant had a switch for the L/R Headphone output and a configurable DAC L/R Mux, while the 's' one misses the mux control and solely relies on the main Headphone Switch. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/406 Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/HiFi.conf b/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/HiFi.conf index 762c807..3339cde 100644 --- a/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/HiFi.conf +++ b/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/HiFi.conf @@ -33,13 +33,27 @@ SectionDevice."Headphones" { EnableSequence [ cset "name='Headphone Switch' on" - cset "name='HPOL Playback Switch' 1" - cset "name='HPOR Playback Switch' 1" ] + If.is_rt5682i_hp { + Condition { + Type ControlExists + Control "name='HPOL Playback Switch'" + } + True { + EnableSequence [ + cset "name='HPOL Playback Switch' 1" + cset "name='HPOR Playback Switch' 1" + ] + + DisableSequence [ + cset "name='HPOL Playback Switch' 0" + cset "name='HPOR Playback Switch' 0" + ] + } + } + DisableSequence [ - cset "name='HPOL Playback Switch' 0" - cset "name='HPOR Playback Switch' 0" cset "name='Headphone Switch' off" ] diff --git a/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/init.conf b/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/init.conf index 44605c3..173ef3f 100644 --- a/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/init.conf +++ b/ucm2/MediaTek/mt8195-sof/mt6359-rt1019-rt5682/init.conf @@ -1,9 +1,20 @@ -# rt1019-rt5682 specific boot sequence +# rt1019-rt5682i/s specific boot sequence + +If.is_rt5682i { + # We can safely assume that both L/R exist if L does. + Condition { + Type ControlExists + Control "name='DAC L Mux" + } + True.BootSequence [ + cset "name='DAC L Mux' IF1" + cset "name='DAC R Mux' IF1" + ] +} + BootSequence [ cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1" cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1" - cset "name='DAC L Mux' IF1" - cset "name='DAC R Mux' IF1" cset "name='IF1 01 ADC Swap Mux' 2" cset "name='CBJ Boost Volume' 3" cset "name='Stereo1 ADC L Mux' 'ADC1 L'" diff --git a/ucm2/conf.d/sof-m8195_r1019/sof-m8195_r1019_5682s.conf b/ucm2/conf.d/sof-m8195_r1019/sof-m8195_r1019_5682s.conf new file mode 120000 index 0000000..bc06786 --- /dev/null +++ b/ucm2/conf.d/sof-m8195_r1019/sof-m8195_r1019_5682s.conf @@ -0,0 +1 @@ +../../MediaTek/mt8195-sof/mt6359-rt1019-rt5682/sof-mt8195-mt6359-rt1019-rt5682.conf \ No newline at end of file