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" {
# Comment "Internal Microphone"
#
# Value {
# CapturePrioirty 100
# CapturePCM "hw:${CardId},99"
# CaptureChannels 4
# }
# Macro.pcm_split.SplitPCMDevice {
# Name "dmic_stereo_in"
# Direction Capture
# Device 99
# HWChannels 4
# Channels 2
# Channel0 2
# Channel1 3
# ChannelPos0 FL
# ChannelPos1 FR
# }
#}
SectionDevice."Mic" {
Comment "Internal Microphone"
Value {
CapturePrioirty 100
CapturePCM "hw:${CardId},99"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "dmic_stereo_in"
Direction Capture
Device ${var:dmicpcm}
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
# 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
]
}