Skip to content

Commit

Permalink
Changelog:
Browse files Browse the repository at this point in the history
- Review ucm configs
  • Loading branch information
sebanc committed Feb 3, 2024
1 parent 21e1c7e commit 078d8e4
Show file tree
Hide file tree
Showing 362 changed files with 13,647 additions and 1 deletion.
134 changes: 134 additions & 0 deletions alsa-ucm-conf/ucm2/AMD/acp3xalc5682m98/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
If.jelboz {
Condition {
Type RegexMatch
Regex "^(Jelboz|Jelboz360|Shuboz)$"
String "${sys:devices/virtual/dmi/id/product_name}"
}
True.Define.volume 3
False.Define.volume 2
}

SectionVerb {
EnableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' off"
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='Stereo1 ADC L Mux' 0"
cset "name='STO1 ADC Capture Switch' on"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='CBJ Boost Volume' ${var:volume}"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
]
}

SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPCM "hw:${CardId},1"
}
EnableSequence [
cset "name='Spk Switch' on"
]
DisableSequence [
cset "name='Spk Switch' off"
]
}

SectionDevice."Headphones" {
Comment "Headphones"
Value {
PlaybackPCM "hw:${CardId},0"
PlaybackMixerElem "DAC1"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='HPOL Playback Switch' 1"
cset "name='HPOR Playback Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' 0"
cset "name='HPOR Playback Switch' 0"
]
}

If.1mic {
Condition {
Type String
Empty "${var:1mic}"
}
True {
SectionDevice."Mic1" {
Comment "Front Microphone"
ConflictingDevice [
"Mic2"
]
Value {
CapturePCM "hw:${CardId},2"
}
EnableSequence [
cset "name='Dmic Mux' Front Mic"
]
}

SectionDevice."Mic2" {
Comment "Rear Microphone"
ConflictingDevice [
"Mic1"
]
Value {
CapturePCM "hw:${CardId},2"
}
EnableSequence [
cset "name='Dmic Mux' Rear Mic"
]
}

SectionDevice."Mic3" {
Comment "Microphone"
Value {
CapturePCM "hw:${CardId},0"
CaptureMixerElem "Headset Mic"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
}
False {
SectionDevice."Mic1" {
Comment "Internal Microphone"
Value {
CapturePCM "hw:${CardId},2"
}
EnableSequence [
cset "name='Dmic Mux' Front Mic"
]
}

SectionDevice."Mic2" {
Comment "Microphone"
Value {
CapturePCM "hw:${CardId},0"
CaptureMixerElem "Headset Mic"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
}
}
72 changes: 72 additions & 0 deletions alsa-ucm-conf/ucm2/AMD/acp3xalc5682m98/acp3xalc5682m98.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Based on:
# https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/ad560b208139b80e97a7c2d39c7bfea1dcc29da9/overlay-zork/chromeos-base/chromeos-bsp-zork/files/
# https://chromium.googlesource.com/chromiumos/project/+/f1387fd5f4effe236dd2a8e6e2b8e665eb2a6cfb/zork/

Syntax 4

Define { Found="" 1mic="" }

If.zork {
Condition {
Type String
String1 "Google_Zork"
String2 "${sys:devices/virtual/dmi/id/product_family}"
}
True {
If.1mic {
Condition {
Type RegexMatch
Regex "^(Berknip|Dirinboz|Gumboz|Jelboz|Trembyle|Woomax)$"
String "${sys:devices/virtual/dmi/id/product_name}"
}
True.Define { Found=y 1mic=y }
}

If.2mic {
Condition {
Type RegexMatch
Regex "^(Dalboz|Ezkinil|Jelboz360|Morphius)$"
String "${sys:devices/virtual/dmi/id/product_name}"
}
True.Define.Found y
}

If.shuboz {
Condition {
Type String
String1 "Shuboz"
String2 "${sys:devices/virtual/dmi/id/product_name}"
}
True {
If.shuboz_jelboz {
Condition {
Type RegexMatch
Regex "^sku(1518731265|1518731266|1518731267|1518731268|1518731269|1518731270|1518731271|1518731272|1518731273|1518731274|1518731275|1518731276|1518731277|1518731278|2147483647)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.Define { Found=y 1mic=y }
}

If.shuboz_jelboz360 {
Condition {
Type RegexMatch
Regex "^sku(1518862337|1518862338|1518862339|1518862340)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.Define.Found y
}
}
}
}
}

If.found {
Condition {
Type String
Empty "${var:Found}"
}
False.SectionUseCase."HiFi" {
File "/AMD/acp3xalc5682m98/HiFi.conf"
Comment "Default"
}
}
136 changes: 136 additions & 0 deletions alsa-ucm-conf/ucm2/AMD/acp5x/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
Macro.apcmremap.CtlRemapMonoToStereoVolSw {
Type Volume
Stereo "Analog PCM"
MonoL "Left Analog PCM"
MonoR "Right Analog PCM"
}

Macro.dpcmremap.CtlRemapMonoToStereoVolSw {
Type Volume
Stereo "Digital PCM"
MonoL "Left Digital PCM"
MonoR "Right Digital PCM"
}

SectionVerb {
EnableSequence [
disdevall ""
cset "name='ADC Phase Switch' 1"
cset "name='BIQ Coefficients' 0x03,0x5a,0x00,0x06,0xfc,0xac,0x00,0x00,0xfe,0x58,0x00,0x00,0x03,0x50,0x00,0x06,0xfe,0x58,0x00,0x08"
cset "name='Left PCM Source' DSP"
cset "name='Right PCM Source' DSP"
]

Value {
TQ "HiFi"
}
}

SectionDevice."Headphones" {
Comment "Headphones"

ConflictingDevice [
"Speaker"
]

EnableSequence [
cset "name='Headphone Switch' on"
]

DisableSequence [
cset "name='Headphone Switch' off"
]

Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},0"
JackControl "Headphone Jack"
PlaybackMixerElem "Headphone"
PlaybackMasterElem "Digital Playback"
}
}

SectionDevice."Speaker" {
Comment "Speaker"

ConflictingDevice [
"Headphones"
]

EnableSequence [
cset "name='Left DSP RX1 Source' ASPRX1"
cset "name='Right DSP RX1 Source' ASPRX2"
cset "name='Left DSP RX2 Source' ASPRX1"
cset "name='Right DSP RX2 Source' ASPRX2"
cset "name='Left DSP1 Preload Switch' 1"
cset "name='Right DSP1 Preload Switch' 1"
]

DisableSequence [
cset "name='Left DSP RX1 Source' Zero"
cset "name='Right DSP RX1 Source' Zero"
cset "name='Left DSP RX2 Source' Zero"
cset "name='Right DSP RX2 Source' Zero"
cset "name='Left DSP1 Preload Switch' 0"
cset "name='Right DSP1 Preload Switch' 0"
]

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "Digital PCM"
PlaybackMasterElem "Analog PCM"
PlaybackVolume "Digital PCM Volume"
}
}

SectionDevice."Mic" {
Comment "Internal Microphone"

ConflictingDevice [
"Headset"
]

EnableSequence [
cset "name='Int Mic Switch' on"
cset "name='DMIC Enable Switch' on"
]

DisableSequence [
cset "name='Int Mic Switch' off"
cset "name='DMIC Enable Switch' off"
]

Value {
CapturePriority 200
CapturePCM "hw:${CardId},0"
CaptureMixerElem "Int Mic"
CaptureVolume "Mic Volume"
CaptureSwitch "Int Mic Switch"
}
}

SectionDevice."Headset" {
Comment "Headset Microphone"

ConflictingDevice [
"Mic"
]

EnableSequence [
cset "name='Headset Mic Switch' on"
]

DisableSequence [
cset "name='Headset Mic Switch' off"
]

Value {
CapturePriority 300
CapturePCM "hw:${CardId},0"
CaptureMixerElem "Headset Mic"
CaptureVolume "Mic Volume"
CaptureSwitch "Headset Mic Switch"
JackControl "Headset Mic Jack"
}
}
53 changes: 53 additions & 0 deletions alsa-ucm-conf/ucm2/AMD/acp5x/acp5x.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Syntax 6

Comment "Vangogh internal card"

#
# Macro CtlRemapMonoToStereoVolSw - join two mono controls into one stereo
#
# Arguments:
# Type - Volume or Switch
# Stereo - Name of the stereo control to be created
# MonoL - Name of the mono control to be used as Left channel
# MonoR - Name of the mono control to be used as Right channel
#
DefineMacro.CtlRemapMonoToStereoVolSw {
LibraryConfig.remap.Config {
ctl.default.map."name='${var:__Stereo} ${var:__Type}'" {
"name='${var:__MonoL} ${var:__Type}'".vindex.0 0
"name='${var:__MonoR} ${var:__Type}'".vindex.1 0
}
}
}

#
# Currently restricted to Steam Deck hardware.
#
If.jupiter {
Condition {
Type String
String1 "Jupiter"
String2 "${sys:devices/virtual/dmi/id/product_name}"
}
True {
SectionUseCase."HiFi" {
File "/AMD/acp5x/HiFi.conf"
Comment "Default"
}

BootSequence [
cset "name='Digital Playback Volume' 252"
cset "name='Left Analog PCM Volume' 17"
cset "name='Right Analog PCM Volume' 17"
cset "name='Left Digital PCM Volume' 870"
cset "name='Right Digital PCM Volume' 870"
cset "name='Headphone Volume' 2"
cset "name='Digital Playback Volume' 192"
cset "name='Mic Volume' 252"
cset "name='Frontend PGA Volume' 27"
]

Include.card-init.File "/lib/card-init.conf"
Include.ctl-remap.File "/lib/ctl-remap.conf"
}
}
Loading

0 comments on commit 078d8e4

Please sign in to comment.