diff --git a/spec_files/steamdeck-dsp/0001-acp-fixups.patch b/spec_files/steamdeck-dsp/0001-acp-fixups.patch new file mode 100644 index 00000000..14ede1c6 --- /dev/null +++ b/spec_files/steamdeck-dsp/0001-acp-fixups.patch @@ -0,0 +1,151 @@ +From 8f0b08dc22b436ab63d0ee65ecdf4bc916d1f48f Mon Sep 17 00:00:00 2001 +From: Thomas Crider +Date: Thu, 7 Dec 2023 05:30:26 -0500 +Subject: [PATCH] acp fixups + +--- + ucm2/conf.d/acp5x/HiFi-upstream.conf | 4 +- + ucm2/conf.d/acp5x/HiFi.conf | 4 +- + ucm2/conf.d/acp5x/acp5x.conf | 95 +++++++++++++++++++++++++--- + 3 files changed, 90 insertions(+), 13 deletions(-) + +diff --git a/ucm2/conf.d/acp5x/HiFi-upstream.conf b/ucm2/conf.d/acp5x/HiFi-upstream.conf +index e7cecda..e58ca73 100644 +--- a/ucm2/conf.d/acp5x/HiFi-upstream.conf ++++ b/ucm2/conf.d/acp5x/HiFi-upstream.conf +@@ -16,8 +16,8 @@ SectionVerb { + 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 Analog PCM Volume' 17" + cset "name='Right Analog PCM Volume' 17" +- cset "name='Left Digital PCM Volume' 817" +- cset "name='Right Digital PCM Volume' 817" ++ cset "name='Left Digital PCM Volume' 913" ++ cset "name='Right Digital PCM Volume' 913" + cset "name='Left DSP RX1 Source' ASPRX1" + cset "name='Left DSP RX2 Source' ASPRX1" + cset "name='Right DSP RX1 Source' ASPRX2" +diff --git a/ucm2/conf.d/acp5x/HiFi.conf b/ucm2/conf.d/acp5x/HiFi.conf +index fd78ecb..35d037b 100644 +--- a/ucm2/conf.d/acp5x/HiFi.conf ++++ b/ucm2/conf.d/acp5x/HiFi.conf +@@ -18,8 +18,8 @@ SectionVerb { + 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 AMP PCM Gain' 17" + cset "name='Right AMP PCM Gain' 17" +- cset "name='Left Digital PCM Volume' 817" +- cset "name='Right Digital PCM Volume' 817" ++ cset "name='Left Digital PCM Volume' 913" ++ cset "name='Right Digital PCM Volume' 913" + cset "name='Left ASPRX1 Slot Position' 0" + cset "name='Left ASPRX2 Slot Position' 1" + cset "name='Left DSP RX1 Source' ASPRX1" +diff --git a/ucm2/conf.d/acp5x/acp5x.conf b/ucm2/conf.d/acp5x/acp5x.conf +index c73bcce..ba802ba 100644 +--- a/ucm2/conf.d/acp5x/acp5x.conf ++++ b/ucm2/conf.d/acp5x/acp5x.conf +@@ -1,16 +1,93 @@ +-Syntax 2 ++Syntax 6 + + Comment "Vangogh internal card" + +-SectionUseCase."HiFi" { +- If.upstream { +- Condition { +- Type ControlExists +- Control "name='Left Analog PCM Volume'" ++# ++# 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 + } +- True.File "HiFi-upstream.conf" +- False.File "HiFi.conf" + } ++} ++ ++# ++# 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 "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" ++ } ++} ++ ++# ++# Currently restricted to Steam Deck OLED hardware. ++# ++If.galileo { ++ Condition { ++ Type String ++ String1 "Galileo" ++ String2 "${sys:devices/virtual/dmi/id/product_name}" ++ } ++ True { ++ SectionUseCase."HiFi" { ++ If.upstream { ++ Condition { ++ Type ControlExists ++ Control "name='Left Analog PCM Volume'" ++ } ++ True.File "HiFi-upstream.conf" ++ False.File "HiFi.conf" ++ } ++ Comment "Default" ++ } + +- 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" ++ } + } ++ +-- +2.43.0 + diff --git a/spec_files/steamdeck-dsp/steamdeck-dsp.spec b/spec_files/steamdeck-dsp/steamdeck-dsp.spec index 8f66bc2e..3a13ebc2 100644 --- a/spec_files/steamdeck-dsp/steamdeck-dsp.spec +++ b/spec_files/steamdeck-dsp/steamdeck-dsp.spec @@ -7,6 +7,7 @@ URL: https://github.com/ublue-os/bazzite Source: https://gitlab.com/evlaV/valve-hardware-audio-processing/-/archive/main/valve-hardware-audio-processing-main.tar.gz Patch0: fedora.patch +Patch1: 0001-acp-fixups.patch Requires: pipewire-module-filter-chain-lv2 Requires: ladspa-noise-suppression-for-voice