Skip to content

Commit

Permalink
ucm2: Add initial support for AMD Vangogh (acp5x) on Steam Deck
Browse files Browse the repository at this point in the history
This has been tested on a Valve Steam Deck EV2 unit, using kernel
v6.1-rc1.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
  • Loading branch information
cristicc committed Nov 9, 2022
1 parent 88f232d commit 262dbcd
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
122 changes: 122 additions & 0 deletions ucm2/AMD/acp5x/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
SectionVerb {
EnableSequence [
cset "name='Left DSP1 Preload Switch' 0"
cset "name='Right DSP1 Preload Switch' 0"
cset "name='Digital Playback Volume' 252"
cset "name='Frontend PGA Volume' 27"
cset "name='ADC Phase Switch' 1"
cset "name='Left Analog PCM Volume' 17"
cset "name='Right Analog PCM Volume' 17"
cset "name='Left Digital PCM Volume' 900"
cset "name='Right Digital PCM Volume' 900"
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"
]

DisableSequence [
cset "name='Left DSP Booted' 0"
cset "name='Right DSP Booted' 0"
cset "name='Left DSP1 Preload Switch' 0"
cset "name='Right DSP1 Preload Switch' 0"
]

Value {
TQ "HiFi"
}
}

SectionDevice."Headphones".0 {
Comment "Headphones"

ConflictingDevice [
"Speaker"
]

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

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

Value {
PlaybackPriority 200
PlaybackPCM "hw:acp5x,0"
JackControl "Headphone Jack"
}
}

SectionDevice."Speaker".0 {
Comment "Speaker"

ConflictingDevice [
"Headphones"
]

EnableSequence [
cset "name='Left DSP1 Preload Switch' 1"
cset "name='Right DSP1 Preload Switch' 1"
cset "name='Left PCM Source' DSP"
cset "name='Right PCM Source' DSP"
]

DisableSequence [
cset "name='Left AMP Enable Switch' off"
cset "name='Right AMP Enable Switch' off"
]

Value {
PlaybackPriority 100
PlaybackPCM "hw:acp5x,1"
}
}

SectionDevice."Internal Mic".0 {
Comment "Internal Microphone"

ConflictingDevice [
"Headset"
]

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

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

Value {
CapturePriority 200
CapturePCM "hw:acp5x,0"
}
}

SectionDevice."Headset" {
Comment "Headset Microphone"

ConflictingDevice [
"Internal Mic"
]

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

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

Value {
CapturePriority 300
CapturePCM "hw:acp5x,0"
JackControl "Headset Mic Jack"
}
}
18 changes: 18 additions & 0 deletions ucm2/AMD/acp5x/acp5x.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Syntax 3

Comment "Vangogh internal card"

#
# 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"
}
}
1 change: 1 addition & 0 deletions ucm2/conf.d/acp5x/Valve-Jupiter-1.conf

0 comments on commit 262dbcd

Please sign in to comment.