sof-rt5682: Support cml being speical

common-codecs
WeirdTreeThing 2023-11-17 11:45:35 -05:00
parent c90948fe88
commit 20cd1b1d63
No known key found for this signature in database
GPG Key ID: 1F56A4B52998B851
4 changed files with 22 additions and 8 deletions

View File

@ -1,9 +1,18 @@
If.custompcm {
Condition {
Type String
Empty "$${var:max98357apcm}"
}
False.Define.pcm ${var:max98357apcm}
True.Define.pcm 0
}
SectionDevice."Speaker" { SectionDevice."Speaker" {
Comment "Speaker" Comment "Speaker"
Value { Value {
PlaybackPriority 100 PlaybackPriority 100
PlaybackPCM "hw:${CardId},0" PlaybackPCM "hw:${CardId},${var:pcm}"
} }
EnableSequence [ EnableSequence [
cset "name='Spk Switch' on" cset "name='Spk Switch' on"

View File

@ -1,5 +1,3 @@
# TODO: deal with the pcm numbers on cml being different
# headset codecs # headset codecs
If.rt5682 { If.rt5682 {

View File

@ -7,7 +7,8 @@ If.cml {
String2 "Google_Hatch" String2 "Google_Hatch"
} }
True { True {
Define.cml y Define.max98357apcm 5
Define.rt5682pcm 0
Define.dmicpcm 1 Define.dmicpcm 1
Define.hdmi hdmi234 Define.hdmi hdmi234
} }
@ -20,7 +21,6 @@ If.tgl {
String2 "Google_Volteer" String2 "Google_Volteer"
} }
True { True {
Define.tgl y
Define.dmicpcm 99 Define.dmicpcm 99
Define.hdmi hdmi2345 Define.hdmi hdmi2345
} }
@ -34,7 +34,6 @@ If.jsl {
String "$${sys:class/dmi/id/product_name}" String "$${sys:class/dmi/id/product_name}"
} }
True { True {
Define.jsl y
Define.dmicpcm 5 Define.dmicpcm 5
Define.hdmi hdmi234 Define.hdmi hdmi234
} }
@ -47,7 +46,6 @@ If.adl {
String "$${sys:class/dmi/id/product_family}" String "$${sys:class/dmi/id/product_family}"
} }
True { True {
Define.adl y
Define.dmicpcm 99 Define.dmicpcm 99
Define.hdmi hdmi2345 Define.hdmi hdmi2345
} }

View File

@ -1,9 +1,18 @@
If.custompcm {
Condition {
Type String
Empty "$${var:rt5682pcm}"
}
False.Define.pcm ${var:rt5682pcm}
True.Define.pcm 1
}
SectionDevice."Headphones" { SectionDevice."Headphones" {
Comment "Headphones" Comment "Headphones"
Value { Value {
PlaybackPriority 200 PlaybackPriority 200
PlaybackPCM "hw:${CardId},1" PlaybackPCM "hw:${CardId},${var:pcm}"
PlaybackMixerElem "DAC1" PlaybackMixerElem "DAC1"
JackControl "Headphone Jack" JackControl "Headphone Jack"
} }