diff --git a/ucm2/conf.d/mt8183_da7219_r/HiFi.conf b/ucm2/conf.d/mt8183_da7219_r/HiFi.conf index 1cb40838..0f418377 100644 --- a/ucm2/conf.d/mt8183_da7219_r/HiFi.conf +++ b/ucm2/conf.d/mt8183_da7219_r/HiFi.conf @@ -1,27 +1,7 @@ -SectionVerb { - EnableSequence [ - # Speaker - cset "name='I2S3_CH1 DL1_CH1' 1" - cset "name='I2S3_CH2 DL1_CH2' 1" - cset "name='Speakers Switch' 1" - - # Internal Mic - cset "name='MTKAIF_DMIC' 1" - cset "name='Mt6358 Mic Type Mux' 2" - cset "name='UL3_CH1 ADDA_UL_CH1' 1" - cset "name='UL3_CH2 ADDA_UL_CH2' 1" - - cset "name='Headphone Volume' 56" - cset "name='Capture Digital Volume' 113" - cset "name='Mic Volume' 3" - ] -} - SectionDevice."Speaker" { Comment "Speaker" Value { - PlaybackPriority 100 PlaybackPCM "hw:${CardId},0" } EnableSequence [ @@ -40,7 +20,6 @@ SectionDevice."Headphones" { Comment "Headphones" Value { - PlaybackPriority 200 PlaybackPCM "hw:${CardId},0" } EnableSequence [ @@ -71,7 +50,6 @@ SectionDevice."Mic" { Comment "Internal Microphone" Value { - CapturePriority 100 CapturePCM "hw:${CardId},5" } EnableSequence [ diff --git a/ucm2/conf.d/mt8183_da7219_r/mt8183_da7219_rt1015p.conf b/ucm2/conf.d/mt8183_da7219_r/mt8183_da7219_rt1015p.conf index a29fd75e..e5fcd782 100644 --- a/ucm2/conf.d/mt8183_da7219_r/mt8183_da7219_rt1015p.conf +++ b/ucm2/conf.d/mt8183_da7219_r/mt8183_da7219_rt1015p.conf @@ -1,8 +1,24 @@ Syntax 6 -Comment "Fennel14 internal card" - SectionUseCase."HiFi" { File "HiFi.conf" Comment "Default" } + +BootSequence [ + # Speaker + cset "name='I2S3_CH1 DL1_CH1' 1" + cset "name='I2S3_CH2 DL1_CH2' 1" + cset "name='Speakers Switch' 1" + + # Internal Mic + cset "name='MTKAIF_DMIC' 1" + cset "name='Mt6358 Mic Type Mux' 2" + cset "name='UL3_CH1 ADDA_UL_CH1' 1" + cset "name='UL3_CH2 ADDA_UL_CH2' 1" + + # Headset + cset "name='Headphone Volume' 56" + cset "name='Capture Digital Volume' 113" + cset "name='Mic Volume' 3" +] diff --git a/ucm2/conf.d/mt8183_mt6358_t/HiFi.conf b/ucm2/conf.d/mt8183_mt6358_t/HiFi.conf index fceec7db..5bea0574 100644 --- a/ucm2/conf.d/mt8183_mt6358_t/HiFi.conf +++ b/ucm2/conf.d/mt8183_mt6358_t/HiFi.conf @@ -1,15 +1,3 @@ -SectionVerb { - EnableSequence [ - cset "name='Headphone Volume' 0" - cset "name='I2S3_CH1 DL1_CH1' 1" - cset "name='I2S3_CH2 DL1_CH2' 1" - cset "name='MTKAIF_DMIC' 1" - cset "name='Mic Type Mux' 2" - cset "name='UL3_CH1 ADDA_UL_CH1' 1" - cset "name='UL3_CH2 ADDA_UL_CH2' 1" - ] -} - SectionDevice."Speaker" { Comment "Speaker" @@ -44,3 +32,55 @@ SectionDevice."Mic" { cset "name='UL3_CH2 ADDA_UL_CH2' 0" ] } + +If.krane { + Condition { + Type String + Haystack "${sys:firmware/devicetree/base/compatible}" + Needle "google,krane" + } + False { + SectionDevice."Headphones" { + Comment "Headphones" + + Value { + PlaybackPCM "hw:${CardId},0" + } + EnableSequence [ + cset "name='ADDA_DL_CH1 DL1_CH1' 1" + cset "name='ADDA_DL_CH2 DL1_CH2' 1" + cset "name='HPL Mux' 2" + cset "name='HPR Mux' 2" + ] + DisableSequence [ + cset "name='ADDA_DL_CH1 DL1_CH1' 0" + cset "name='ADDA_DL_CH2 DL1_CH2' 0" + cset "name='HPL Mux' 0" + cset "name='HPR Mux' 0" + ] + } + + SectionDevice."Headset" { + Comment "Headset Microphone" + + Value { + CapturePCM "hw:${CardId},5" + } + EnableSequence [ + cset "name='PGA L Mux' 2" + cset "name='ADC L Mux' 2" + cset "name='Mic Type Mux' 1" + cset "name='PGA Volume' 4" + cset "name='UL3_CH1 ADDA_UL_CH1' 1" + ] + DisableSequence [ + cset "name='PGA L Mux' 0" + cset "name='ADC L Mux' 0" + cset "name='Mic Type Mux' 0" + cset "name='PGA Volume' 0" + cset "name='UL3_CH1 ADDA_UL_CH1' 0" + + ] + } + } +} diff --git a/ucm2/conf.d/mt8183_mt6358_t/mt8183_mt6358_ts3a227_max98357.conf b/ucm2/conf.d/mt8183_mt6358_t/mt8183_mt6358_ts3a227_max98357.conf index ce8f48d5..40dc0b3b 100644 --- a/ucm2/conf.d/mt8183_mt6358_t/mt8183_mt6358_ts3a227_max98357.conf +++ b/ucm2/conf.d/mt8183_mt6358_t/mt8183_mt6358_ts3a227_max98357.conf @@ -1,8 +1,31 @@ -Comment "Krane internal card" - Syntax 6 SectionUseCase."HiFi" { File "HiFi.conf" Comment "Default" } + +BootSequence [ + # Speakers + cset "name='I2S3_CH1 DL1_CH1' 1" + cset "name='I2S3_CH2 DL1_CH2' 1" + + # Headphones + cset "name='Headphone Volume' 17" + cset "name='ADDA_DL_CH1 DL1_CH1' 0" + cset "name='ADDA_DL_CH2 DL1_CH2' 0" + cset "name='HPL Mux' 0" + cset "name='HPR Mux' 0" + + # Internal Mic + cset "name='MTKAIF_DMIC' 1" + cset "name='Mic Type Mux' 2" + cset "name='UL3_CH1 ADDA_UL_CH1' 1" + cset "name='UL3_CH2 ADDA_UL_CH2' 1" + + # Headset Mic + cset "name='PGA L Mux' 0" + cset "name='ADC L Mux' 0" + cset "name='PGA Volume' 0" + cset "name='UL3_CH1 ADDA_UL_CH1' 0" +]