From 6cb9bf12d53b9e361fc833d181b2750443e7ad82 Mon Sep 17 00:00:00 2001 From: qaqland Date: Tue, 26 May 2026 17:16:54 +0800 Subject: [PATCH] feat: add ALSA card configuration for Phytium PMDK-I2S HDMI audio Signed-off-by: qaqland --- debian/changelog | 6 + debian/patches/deepin-phytium-PMDKI2S.patch | 140 ++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 147 insertions(+) create mode 100644 debian/patches/deepin-phytium-PMDKI2S.patch diff --git a/debian/changelog b/debian/changelog index d144803..d2264a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +alsa-lib (1.2.15.3-1deepin4) unstable; urgency=medium + + * Add support for phytium-PMDKI2S. + + -- qaqland Tue, 26 May 2026 17:11:41 +0800 + alsa-lib (1.2.15.3-1deepin3) unstable; urgency=medium * Add sw support. diff --git a/debian/patches/deepin-phytium-PMDKI2S.patch b/debian/patches/deepin-phytium-PMDKI2S.patch new file mode 100644 index 0000000..6c1a2f4 --- /dev/null +++ b/debian/patches/deepin-phytium-PMDKI2S.patch @@ -0,0 +1,140 @@ +--- /dev/null ++++ b/src/conf/cards/PMDKI2S.conf +@@ -0,0 +1,116 @@ ++# ++# Configuration for PMDK-I2S HDMI audio ++# ++ ++PMDKI2S.pcm.hdmi.!0 { ++ @args [ CARD AES0 AES1 AES2 AES3 ] ++ @args.CARD { ++ type string ++ } ++ @args.AES0 { ++ type integer ++ } ++ @args.AES1 { ++ type integer ++ } ++ @args.AES2 { ++ type integer ++ } ++ @args.AES3 { ++ type integer ++ } ++ type hooks ++ slave.pcm { ++ type hw ++ card $CARD ++ } ++ hooks.0 { ++ type ctl_elems ++ hook_args [ ++ { ++ interface PCM ++ name "IEC958 Playback Default" ++ device 0 ++ lock true ++ preserve true ++ value [ $AES0 $AES1 $AES2 $AES3 ] ++ } ++ ] ++ } ++} ++ ++PMDKI2S.pcm.hdmi.!1 { ++ @args [ CARD AES0 AES1 AES2 AES3 ] ++ @args.CARD { ++ type string ++ } ++ @args.AES0 { ++ type integer ++ } ++ @args.AES1 { ++ type integer ++ } ++ @args.AES2 { ++ type integer ++ } ++ @args.AES3 { ++ type integer ++ } ++ type hooks ++ slave.pcm { ++ type hw ++ card $CARD ++ device 1 ++ } ++ hooks.0 { ++ type ctl_elems ++ hook_args [ ++ { ++ interface PCM ++ name "IEC958 Playback Default" ++ device 1 ++ lock true ++ preserve true ++ value [ $AES0 $AES1 $AES2 $AES3 ] ++ } ++ ] ++ } ++} ++ ++PMDKI2S.pcm.hdmi.!2 { ++ @args [ CARD AES0 AES1 AES2 AES3 ] ++ @args.CARD { ++ type string ++ } ++ @args.AES0 { ++ type integer ++ } ++ @args.AES1 { ++ type integer ++ } ++ @args.AES2 { ++ type integer ++ } ++ @args.AES3 { ++ type integer ++ } ++ type hooks ++ slave.pcm { ++ type hw ++ card $CARD ++ device 2 ++ } ++ hooks.0 { ++ type ctl_elems ++ hook_args [ ++ { ++ interface PCM ++ name "IEC958 Playback Default" ++ device 2 ++ lock true ++ preserve true ++ value [ $AES0 $AES1 $AES2 $AES3 ] ++ } ++ ] ++ } ++} +--- a/src/conf/cards/aliases.conf ++++ b/src/conf/cards/aliases.conf +@@ -59,6 +59,8 @@ + VC4-HDMI cards.vc4-hdmi + hda-acpi cards.HDA-Intel + ++PMDK-I2S cards.PMDKI2S ++ + + + +--- a/src/conf/cards/Makefile.am ++++ b/src/conf/cards/Makefile.am +@@ -41,6 +41,7 @@ + NFORCE.conf \ + PC-Speaker.conf \ + pistachio-card.conf \ ++ PMDKI2S.conf \ + PMac.conf \ + PMacToonie.conf \ + PS3.conf \ diff --git a/debian/patches/series b/debian/patches/series index 5189341..89e98f3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Enabled-extended-namehints-in-alsa.conf.patch 0001-deepin-sw_64-support.patch +deepin-phytium-PMDKI2S.patch