Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ucm2: Add support for MT8186 Corsola Steelix Chromebook with SOF #368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ucm2/MediaTek/mt8186-sof/init.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# mt8186 specific boot sequence

BootSequence [
# AFE HW Gain enablement
cset "name='HW Gain 1 Volume' 524288"
cset "name='HW Gain 2 Volume' 524288"
]
86 changes: 86 additions & 0 deletions ucm2/MediaTek/mt8186-sof/mt6366-rt1019-rt5682s/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Use case configuration for mt8186-mt6366-rt1019-rt5682s

SectionVerb {
EnableSequence [
disdevall ""
]

Value.TQ "HiFi"
}

SectionDevice."Speaker" {
Comment "Speaker"

EnableSequence [
cset "name='Speakers Switch' on"
]

DisableSequence [
cset "name='Speakers Switch' off"
]

Value {
PlaybackChannels 2
PlaybackPCM "hw:${CardId},25"
PlaybackPriority 100
PlaybackMixerElem "Speaker"
PlaybackVolume "Speaker Playback Volume"
}
}

SectionDevice."Headphones" {
Comment "Headphones"

EnableSequence [
cset "name='Headphone Switch' on"
]

DisableSequence [
cset "name='Headphone Switch' off"
]

Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},26"
JackControl "Headphone Jack"
}
}

SectionDevice."Headset" {
Comment "Headset Microphone"

EnableSequence [
cset "name='Headset Mic Switch' on"
]

DisableSequence [
cset "name='Headset Mic Switch' off"
]

Value {
CapturePriority 200
CapturePCM "hw:${CardId},28"
JackControl "Headset Mic Jack"
}
}

SectionDevice."Mic" {
Comment "Internal Microphone"

EnableSequence [
cset "name='MTKAIF_DMIC Switch' on"
cset "name='UL1_CH1 ADDA_UL_CH1 Switch' on"
cset "name='UL1_CH2 ADDA_UL_CH2 Switch' on"
]

DisableSequence [
cset "name='MTKAIF_DMIC Switch' off"
cset "name='UL1_CH1 ADDA_UL_CH1 Switch' off"
cset "name='UL1_CH2 ADDA_UL_CH2 Switch' off"
]

Value {
CapturePCM "hw:${CardId},27"
CapturePriority 100
}
}
39 changes: 39 additions & 0 deletions ucm2/MediaTek/mt8186-sof/mt6366-rt1019-rt5682s/init.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# mt6366-rt1019-rt5682s specific boot sequence
BootSequence [
# Headset Microphone on RT5682s
cset "name='IF1 01 ADC Swap Mux' L/L"
cset "name='Stereo1 ADC L Mux' 'ADC1 L'"
cset "name='RECMIX1L CBJ Switch' on"
cset "name='STO1 ADC Capture Switch' on,off"
cset "name='CBJ Boost Volume' 28"

# Internal Microphone on MT6366
cset "name='Mt6366 Mic Type Mux' DMIC"
cset "name='Mt6366 PGA Volume' 4"
cset "name='Stereo1 ADC L1 Mux' ADC"
cset "name='Stereo1 ADC R1 Mux' ADC"
cset "name='Stereo1 ADC MIXL ADC2 Switch' off"
cset "name='Stereo1 ADC MIXR ADC2 Switch' off"
cset "name='Stereo1 ADC MIXL ADC1 Switch' on"
cset "name='Stereo1 ADC MIXR ADC1 Switch' on"

# I2S0 UL2: Headset Microphone
cset "name='UL2_CH1 I2S0_CH1 Switch' on"
cset "name='UL2_CH2 I2S0_CH2 Switch' on"
cset "name='I2S0_HD_Mux' Low_Jitter"

# I2S1 DL2: Headset Speaker
cset "name='I2S1_CH1 DL2_CH1 Switch' on"
cset "name='I2S1_CH2 DL2_CH2 Switch' on"
cset "name='I2S1_HD_Mux' Low_Jitter"

# I2S3 DL1: Internal Speakers
cset "name='I2S3_CH1 DL1_CH1 Switch' on"
cset "name='I2S3_CH2 DL1_CH2 Switch' on"
cset "name='I2S3_HD_Mux' Low_Jitter"

# Internal Speakers DAC
cset "name='Stereo1 DAC MIXL DAC L1 Switch' on"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' on"
cset "name='DAC1 Playback Volume' 120"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Comment "MT8186 MT6366 RT1019 RT5682s sound card"
Syntax 4

SectionUseCase."HiFi" {
File "/MediaTek/mt8186-sof/mt6366-rt1019-rt5682s/HiFi.conf"
Comment "Default"
}

Include.card-init.File "/lib/card-init.conf"
Include.ctl-remap.File "/lib/ctl-remap.conf"
Include.init.File "/MediaTek/mt8186-sof/init.conf"
Include.init-rt1019-rt5682s.File "/MediaTek/mt8186-sof/mt6366-rt1019-rt5682s/init.conf"
1 change: 1 addition & 0 deletions ucm2/conf.d/sof-mt8186_rt10/sof-mt8186_rt1019_rt5682s.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the cropped driver names like sof-mt8186_rt10. It's a driver fault to not set a correct name here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

....months after: I've put this on hold for now because I'm on to rather big changes in the audio drivers and that'll change the name for that one as well. Should be done for v6.10, then I'll update this PR.