From 1c0b031d175739a8277e99364ca10d55ffbf6a9f Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Wed, 30 Oct 2019 18:01:56 -0500 Subject: [PATCH] sof-chtmax98090: initial import Tested a year ago... Signed-off-by: Pierre-Louis Bossart --- ucm/sof-chtmax98090/HiFi.conf | 188 +++++++++++++++++++++++ ucm/sof-chtmax98090/sof-chtmax98090.conf | 6 + 2 files changed, 194 insertions(+) create mode 100644 ucm/sof-chtmax98090/HiFi.conf create mode 100644 ucm/sof-chtmax98090/sof-chtmax98090.conf diff --git a/ucm/sof-chtmax98090/HiFi.conf b/ucm/sof-chtmax98090/HiFi.conf new file mode 100644 index 000000000..33ae49d3a --- /dev/null +++ b/ucm/sof-chtmax98090/HiFi.conf @@ -0,0 +1,188 @@ +# command-line sequence to switch playback/capture +# alsaucm -c sof-chtmax98090 set _verb HiFi set _enadev Headphone +# alsaucm -c sof-chtmax98090 set _verb HiFi set _enadev Speakers +# alsaucm -c sof-chtmax98090 set _verb HiFi set _enadev HeadsetMic +# alsaucm -c sof-chtmax98090 set _verb HiFi set _enadev InternalMic + + +SectionVerb { + + EnableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Left Speaker Mixer Left DAC Switch' on" + cset "name='Right Speaker Mixer Right DAC Switch' on" + cset "name='Digital EQ 3 Band Switch' off" + cset "name='Digital EQ 5 Band Switch' off" + cset "name='Digital EQ 7 Band Switch' off" + cset "name='Biquad Switch' off" + cset "name='Filter Mode' Music" + cset "name='ADC Oversampling Rate' 0" + + cset "name='DMIC Mux' DMIC" + cset "name='MIC2 Mux' IN34" + cset "name='MIC2 Volume' 10" + cset "name='MIC2 Boost Volume' 0" + + cset "name='ADCR Boost Volume' 4" + cset "name='ADCL Boost Volume' 4" + cset "name='ADCR Volume' 11" + cset "name='ADCL Volume' 11" + + cset "name='Headphone Volume' 10" + cset "name='Speaker Volume' 10" + + cset "name='Speaker Left Mixer Volume' 3" + cset "name='Speaker Right Mixer Volume' 3" + cset "name='Record Path DC Blocking' on" + cset "name='Playback Path DC Blocking' on" + + cset "name='Headphone Left Switch' off" + cset "name='Headphone Right Switch' off" + cset "name='Headphone Switch' off" + + cset "name='Speaker Left Switch' off" + cset "name='Speaker Right Switch' off" + cset "name='Ext Spk Switch' off" + + cset "name='Headset Mic Switch' off" + cset "name='Int Mic Switch' off" + ] + + DisableSequence [ + ] + + # ALSA PCM + Value { + # ALSA PCM device for HiFi + PlaybackPCM "hw:sofchtmax98090" + CapturePCM "hw:sofchtmax98090" + } +} + +SectionDevice."Headphone" { + Comment "Headphone" + + ConflictingDevice [ + "Speakers" + ] + + Value { + JackControl "Headphone Jack" + JackHWMute "Speakers" + } + + EnableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Headphone Left Switch' on" + cset "name='Headphone Right Switch' on" + cset "name='Headphone Switch' on" + + ] + DisableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Headphone Left Switch' off" + cset "name='Headphone Right Switch' off" + cset "name='Headphone Switch' off" + + ] + + Value { + PlaybackChannels 2 + } +} + +SectionDevice."Speakers" { + Comment "Speakers" + + ConflictingDevice [ + "Headphone" + ] + + EnableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Speaker Left Switch' on" + cset "name='Speaker Right Switch' on" + cset "name='Ext Spk Switch' on" + ] + DisableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Speaker Left Switch' off" + cset "name='Speaker Right Switch' off" + cset "name='Ext Spk Switch' off" + ] + + Value { + PlaybackChannels 2 + } +} + +SectionDevice."HeadsetMic" { + Comment "Headset Mic" + + Value { + JackControl "Headset Mic Jack" + #FIXME CaptureControl "MIC2" + } + + ConflictingDevice [ + "InternalMic" + ] + + EnableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Headset Mic Switch' on" + cset "name='DMIC Mux' ADC" + cset "name='Record Path DC Blocking' on" + + ] + + DisableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Headset Mic Switch' off" + cset "name='DMIC Mux' DMIC" + cset "name='Record Path DC Blocking' off" + ] + + Value { + CaptureChannels 2 + } +} + +SectionDevice."InternalMic" { + Comment "Internal Mic" + + Value { + #FIXME CaptureControl "MIC2" + } + + ConflictingDevice [ + "HeadsetMic" + ] + + EnableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Int Mic Switch' on" + cset "name='DMIC Mux' DMIC" + cset "name='Record Path DC Blocking' off" + ] + + DisableSequence [ + cdev "hw:sofchtmax98090" + + cset "name='Int Mic Switch' off" + cset "name='DMIC Mux' ADC" + cset "name='Record Path DC Blocking' on" + ] + + Value { + CaptureChannels 2 + } +} diff --git a/ucm/sof-chtmax98090/sof-chtmax98090.conf b/ucm/sof-chtmax98090/sof-chtmax98090.conf new file mode 100644 index 000000000..6f735332b --- /dev/null +++ b/ucm/sof-chtmax98090/sof-chtmax98090.conf @@ -0,0 +1,6 @@ +Comment "sof-chtmax98090 internal card" + +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Default" +}