avs_dmic: Simplify and update to use new volume control name

Shoutout to intel for breaking avs_dmic multiple times at this point
pull/6/head
WeirdTreeThing 2024-09-29 16:08:20 -04:00
parent cadc325194
commit 07e492f659
No known key found for this signature in database
GPG Key ID: 1F56A4B52998B851
1 changed files with 17 additions and 46 deletions

View File

@ -1,5 +1,5 @@
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 {
@ -7,48 +7,19 @@ If.4ch {
Haystack "${sys:devices/virtual/dmi/id/bios_version}"
Needle "Google"
}
True {
True.Define.DmicChannels 4
False.Define.DmicChannels 2
}
SectionDevice."Internal Mic" {
Comment "Internal Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},2"
CaptureChannels 4
CaptureChannels "${var:DmicChannels}"
}
If.dspvol {
Condition {
Type ControlExists
Control "name='DMIC FE DMIC Volume'"
}
True {
EnableSequence [
cset "name='DMIC FE DMIC Volume' 2147483647"
cset "name='DMIC Volume' 2147483647"
]
}
}
}
}
False {
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"
]
}
}
}
}
}