Skip to content

Commit

Permalink
Pull in changes from main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
WeirdTreeThing committed Nov 24, 2024
1 parent f7be751 commit fd175b2
Show file tree
Hide file tree
Showing 16 changed files with 223 additions and 124 deletions.
7 changes: 7 additions & 0 deletions ucm2/codecs/nau8825/init.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NAU8825 specific volume control settings

BootSequence [
cset "name='Mic Volume' 230"
cset "name='Frontend PGA Volume' 24"
]

57 changes: 14 additions & 43 deletions ucm2/conf.d/avs_dmic/HiFi.conf
Original file line number Diff line number Diff line change
@@ -1,54 +1,25 @@
SectionVerb {
}
# Stock firmware exposes a 4ch dmic while MrChromebox firmware exposes a 2ch dmic for windows support
# Stock firmware version string includes "Google_<board>" while MrChromebox firmware string is "MrChromebox-<version>"

If.4ch {
Condition {
Type String
Haystack "${sys:devices/virtual/dmi/id/bios_version}"
Needle "Google"
}
True {
SectionDevice."Internal Mic" {
Comment "Internal Microphone"
True.Define.DmicChannels 4
False.Define.DmicChannels 2
}

Value {
CapturePriority 100
CapturePCM "hw:${CardId},2"
CaptureChannels 4
}
If.dspvol {
Condition {
Type ControlExists
Control "name='DMIC FE DMIC Volume'"
}
True {
EnableSequence [
cset "name='DMIC FE DMIC Volume' 2147483647"
]
}
}
}
}
False {
SectionDevice."Internal Mic" {
Comment "Internal Microphone"
SectionDevice."Internal Mic" {
Comment "Internal Microphone"

Value {
CapturePriority 100
CapturePCM "hw:${CardId},2"
CaptureChannels 2
}
If.dspvol {
Condition {
Type ControlExists
Control "name='DMIC FE DMIC Volume'"
}
True {
EnableSequence [
cset "name='DMIC FE DMIC Volume' 2147483647"
]
}
}
}
Value {
CapturePriority 100
CapturePCM "hw:${CardId},2"
CaptureChannels "${var:DmicChannels}"
}
EnableSequence [
cset "name='DMIC Volume' 2147483647"
]
}
2 changes: 1 addition & 1 deletion ucm2/conf.d/avs_max98373/HiFi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SectionVerb {
cset "name='Right Digital Vol Sel Switch' 1"
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
cset "name='ssp0p_fe DSP Volume' 1073741823"
cset "name='DSP Volume' 1073741823"
]
}
SectionDevice."Speaker" {
Expand Down
2 changes: 1 addition & 1 deletion ucm2/conf.d/avs_max98927/HiFi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SectionVerb {
cset "name='Right Digital Volume' 56"
cset "name='Left Current Limit' 3.00A"
cset "name='Right Current Limit' 3.00A"
cset "name='ssp0p_fe DSP Volume' 1073741823"
cset "name='DSP Volume' 1073741823"
]
}
SectionDevice."Speaker" {
Expand Down
2 changes: 1 addition & 1 deletion ucm2/conf.d/avs_nau8825/HiFi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SectionDevice."Mic" {
CapturePriority 200
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackControl "Headphone Jack"
JackControl "Headset Mic Jack"
}

EnableSequence [
Expand Down
21 changes: 21 additions & 0 deletions ucm2/conf.d/avs_rt5514/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SectionDevice."Mic" {
Comment "Internal Microphone"

Value {
CapturePCM "hw:${CardId},1"
CaptureChannels 4
}
EnableSequence [
cset "name='Sto1 ADC MIXL DMIC Switch' on"
cset "name='Sto1 ADC MIXR DMIC Switch' on"
cset "name='Sto2 ADC MIXL DMIC Switch' on"
cset "name='Sto2 ADC MIXR DMIC Switch' on"
]
DisableSequence [
cset "name='Sto1 ADC MIXL DMIC Switch' off"
cset "name='Sto1 ADC MIXR DMIC Switch' off"
cset "name='Sto2 ADC MIXL DMIC Switch' off"
cset "name='Sto2 ADC MIXR DMIC Switch' off"
]
}

10 changes: 10 additions & 0 deletions ucm2/conf.d/avs_rt5514/avs_rt5514.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Syntax 6

SectionUseCase."HiFi" {
File "HiFi.conf"
}

BootSequence [
cset "name='ADC1 Capture Volume' 55"
cset "name='ADC2 Capture Volume' 55"
]
2 changes: 1 addition & 1 deletion ucm2/conf.d/avs_ssm4567-adi/HiFi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SectionVerb {
cset "name='Right DAC Low Power Mode Switch' on"
cset "name='Left Master Playback Volume' 219"
cset "name='Right Master Playback Volume' 219"
cset "name='ssp0p_fe DSP Volume' 858993480"
cset "name='DSP Volume' 858993480"
]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
SectionVerb {
EnableSequence [
cset "name='Mic Volume' 230"
cset "name='Frontend PGA Volume' 24"
]
}

# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/common/pcm/split.conf"

Macro [
{
SplitPCM {
Name "adl_stereo_in"
Name "glk_stereo_in"
Direction Capture
Format S32_LE
Format S16_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
Expand Down Expand Up @@ -45,26 +38,29 @@ SectionDevice."Headphones" {
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "Headphone"
JackControl "Headphone Jack"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='Headphone Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='Headphone Switch' 0"
]
}

SectionDevice."Mic" {
Comment "Internal Microphone"

Value {
Value {
CapturePriority 100
CapturePCM "hw:${CardId},99"
CapturePCM "hw:${CardId},99"
CaptureChannels 4
}
}
Macro.pcm_split.SplitPCMDevice {
Name "adl_stereo_in"
Name "glk_stereo_in"
Direction Capture
Device 99
HWChannels 4
Expand All @@ -87,10 +83,12 @@ SectionDevice."Headset" {
}
EnableSequence [
cset "name='Headset Mic Switch' on"
cset "name='Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
cset "name='Mic Switch' off"
]
}

Include.hdmi.File "/codecs/hda/hdmi2345.conf"
Include.hdmi.File "/codecs/hda/hdmi567.conf"
8 changes: 8 additions & 0 deletions ucm2/conf.d/sof-glkda7219ma/sof-glkda7219ma.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Syntax 6

SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Default"
}

Include.codec-init.File "/codecs/da7219/init.conf"
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
SectionVerb {
EnableSequence [
cset "name='Frontend PGA Volume' 12"
cset "name='Mic Volume' 255"
cset "name='Left DAI Sel Mux' Right"
cset "name='Right DAI Sel Mux' Left"
cset "name='Left Digital Volume' 127"
cset "name='Right Digital Volume' 127"
cset "name='Left FS Max Volume' 6"
cset "name='Right FS Max Volume' 6"
]
}

# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/common/pcm/split.conf"

Expand All @@ -30,28 +17,21 @@ Macro [
}
]

SectionDevice."Speaker" {
Comment "Internal Speakers"
If.max98360a {
Condition {
Type String
Empty "$${var:max98360a}"
}
False.Include.speaker.File "/codecs/max98357a/speaker.conf"
}

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
EchoReferenceDev "Echo Reference"

If.max98373 {
Condition {
Type String
Empty "$${var:max98373}"
}
EnableSequence [
cset "name='Spk Switch' on"
cset "name='Left Spk Switch' on"
cset "name='Right Spk Switch' on"
cset "name='Left VI Sense Switch' on"
cset "name='Right VI Sense Switch' on"
]
DisableSequence [
cset "name='Spk Switch' off"
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
cset "name='Left VI Sense Switch' off"
cset "name='Right VI Sense Switch' off"
]
False.Include.speaker.File "/codecs/max98373/speaker.conf"
}

SectionDevice."Headphones" {
Expand All @@ -70,24 +50,18 @@ SectionDevice."Headphones" {
]
}

SectionDevice."Echo Reference" {
Value {
CapturePCM "hw:${CardId},0"
}
}

SectionDevice."Mic" {
Comment "Internal Microphone"

Value {
CapturePriority 100
CapturePCM "hw:${CardId},99"
CapturePCM "hw:${CardId},${var:dmicpcm}"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "adl_stereo_in"
Direction Capture
Device 99
Device "${var:dmicpcm}"
HWChannels 4
Channels 2
Channel0 0
Expand All @@ -114,4 +88,4 @@ SectionDevice."Headset" {
]
}

Include.hdmi.File "/codecs/hda/hdmi2345.conf"
Include.hdmi.File "/codecs/hda/${var:hdmi}.conf"
27 changes: 10 additions & 17 deletions ucm2/conf.d/sof-nau8825/sof-nau8825.conf
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
Syntax 6

If.osiris {
Condition {
Type String
Haystack "${sys:devices/virtual/dmi/id/product_name}"
Needle "Osiris"
}
True.SectionUseCase."HiFi" {
File "HiFi.osiris.conf"
Comment "Default"
}
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Default"
}

If.kano {
Include.platform.File "/platforms/intel-sof/platform.conf"
Include.codec.File "/platforms/intel-sof/codecs.conf"
Include.codec-init.File "/codecs/nau8825/init.conf"

If.max98373 {
Condition {
Type String
Haystack "${sys:devices/virtual/dmi/id/product_name}"
Needle "Kano"
}
True.SectionUseCase."HiFi" {
File "HiFi.kano.conf"
Comment "Default"
Empty "$${var:max98373}"
}
False.Include.max98373-init.File "/codecs/max98373/init.conf"
}
17 changes: 17 additions & 0 deletions ucm2/conf.d/sof-rt5682/rt5682-headset.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,20 @@ SectionDevice."Headphones" {

]
}

SectionDevice."Headset" {
Comment "Headset Microphone"

Value {
CapturePriority 200
CapturePCM "hw:${CardId},${var:pcm}"
CaptureMixerElem "Headset Mic"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
11 changes: 8 additions & 3 deletions ucm2/conf.d/sof-rt5682/rt5682-init.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ BootSequence [
cset "name='HPOR Playback Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
cset "name='RECMIX1L CBJ Switch' 0"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='Stereo1 ADC L Mux' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
cset "name='CBJ Boost Volume' 3"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='STO1 ADC Capture Switch' 1"
]
2 changes: 1 addition & 1 deletion ucm2/conf.d/sof-rt5682/sof-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SectionUseCase."HiFi" {
}

Include.platform.File "/platforms/intel-sof/platform.conf"
Include.codec.File "codecs.conf"
Include.codec.File "/platforms/intel-sof/codecs.conf"

# headphone codecs

Expand Down
Loading

0 comments on commit fd175b2

Please sign in to comment.