sof-rt5682: Add platform detection and set dmic pcm

common-codecs
WeirdTreeThing 2023-11-11 18:25:39 -05:00
parent 7b6a0cb608
commit 7c9f5fcbd0
No known key found for this signature in database
GPG Key ID: 1F56A4B52998B851
2 changed files with 69 additions and 20 deletions

View File

@ -106,26 +106,26 @@ Macro [
} }
] ]
#SectionDevice."Mic" { SectionDevice."Mic" {
# Comment "Internal Microphone" Comment "Internal Microphone"
#
# Value { Value {
# CapturePrioirty 100 CapturePrioirty 100
# CapturePCM "hw:${CardId},99" CapturePCM "hw:${CardId},99"
# CaptureChannels 4 CaptureChannels 4
# } }
# Macro.pcm_split.SplitPCMDevice { Macro.pcm_split.SplitPCMDevice {
# Name "dmic_stereo_in" Name "dmic_stereo_in"
# Direction Capture Direction Capture
# Device 99 Device ${var:dmicpcm}
# HWChannels 4 HWChannels 4
# Channels 2 Channels 2
# Channel0 2 Channel0 0
# Channel1 3 Channel1 1
# ChannelPos0 FL ChannelPos0 FL
# ChannelPos1 FR ChannelPos1 FR
# } }
#} }
# TODO: detect hdmi configuration # TODO: detect hdmi configuration

49
sof-rt5682/platform.conf Normal file
View File

@ -0,0 +1,49 @@
# platform detection
If.cml {
Condition {
Type String
String1 "${sys:class/dmi/id/product_family}"
String2 "Google_Hatch"
}
True [
Define.cml y
Define.dmicpcm 1
]
}
If.tgl {
Condition {
Type String
String1 "${sys:class/dmi/id/product_family}"
String2 "Google_Volteer"
}
True [
Define.tgl y
Define.dmicpcm 99
]
}
If.jsl {
Condition {
Type String
String1 "${sys:class/dmi/id/product_family}"
String2 "Google_Dedede"
}
True [
Define.jsl y
Define.dmicpcm 5
]
}
If.adl {
Condition {
Type RegexMatch
Regex "^Google_(Brya|Brask|Nissa)$"
String "${sys:class/dmi/id/product_family}"
}
True [
Define.adl y
Define.dmicpcm 99
]
}