From c275bdad2e4ab25b384aba87e3c9bd2699da708b Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 22 May 2024 13:24:10 +0000 Subject: [PATCH] import UBI alsa-lib-1.2.10-2.el8 --- .alsa-lib.metadata | 4 +- .gitignore | 4 +- SOURCES/alsa-git.patch | 533 ++++++ SOURCES/alsa-lib-1.0.14-glibc-open.patch | 11 - SOURCES/alsa-lib-1.2.10-glibc-open.patch | 10 + SOURCES/alsa-ucm-conf.patch | 1984 ++++++++++++++++++++++ SOURCES/alsa-ucm-git.patch | 0 SPECS/alsa-lib.spec | 27 +- 8 files changed, 2546 insertions(+), 27 deletions(-) delete mode 100644 SOURCES/alsa-lib-1.0.14-glibc-open.patch create mode 100644 SOURCES/alsa-lib-1.2.10-glibc-open.patch create mode 100644 SOURCES/alsa-ucm-conf.patch delete mode 100644 SOURCES/alsa-ucm-git.patch diff --git a/.alsa-lib.metadata b/.alsa-lib.metadata index 4f3e0d6..0291b02 100644 --- a/.alsa-lib.metadata +++ b/.alsa-lib.metadata @@ -1,2 +1,2 @@ -d6ccb4b512d86786d8383c3394489ecc5d2bca66 SOURCES/alsa-lib-1.2.9.tar.bz2 -9ab0f8e33817122962ac3d6cf5e6e26b8f5cc9cb SOURCES/alsa-ucm-conf-1.2.9.tar.bz2 +4b3a804d873807f2e48ecf6278d71655651e1e9d SOURCES/alsa-lib-1.2.10.tar.bz2 +5f1ed71a3e30698b6467c2572896fda146f6f74b SOURCES/alsa-ucm-conf-1.2.10.tar.bz2 diff --git a/.gitignore b/.gitignore index 4039f32..df7bcfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/alsa-lib-1.2.9.tar.bz2 -SOURCES/alsa-ucm-conf-1.2.9.tar.bz2 +SOURCES/alsa-lib-1.2.10.tar.bz2 +SOURCES/alsa-ucm-conf-1.2.10.tar.bz2 diff --git a/SOURCES/alsa-git.patch b/SOURCES/alsa-git.patch index e69de29..29e58fd 100644 --- a/SOURCES/alsa-git.patch +++ b/SOURCES/alsa-git.patch @@ -0,0 +1,533 @@ +From 9685505bf438467d9b11919b332b066d3a1c94d0 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 4 Sep 2023 09:37:29 +0200 +Subject: [PATCH 1/6] gitcompile: Add static build + +Signed-off-by: Jaroslav Kysela +--- + gitcompile | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/gitcompile b/gitcompile +index 0fe092ce..c70448f7 100755 +--- a/gitcompile ++++ b/gitcompile +@@ -32,6 +32,10 @@ if [ $# -ne 0 ]; then + lto="-flto -flto-partition=none" + echo "Forced lto build..." + shift ;; ++ static) ++ static=yes ++ echo "Selected static build..." ++ shift ;; + *) + endloop=yes + ;; +@@ -75,6 +79,12 @@ if [ "$python2" = "yes" ]; then + args="$args --enable-python2" + fi + ++if [ "$static" = "yes" ]; then ++ #args="$args --enable-shared=no --enable-static=yes" ++ args="$args --disable-shared" ++fi ++ ++ + touch ltconfig + libtoolize --force --copy --automake + aclocal $ACLOCAL_FLAGS +-- +2.41.0 + + +From fcce13a6726c52882bd8b7131c61c4eba308792c Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 4 Sep 2023 09:38:26 +0200 +Subject: [PATCH 2/6] control.h: Fix ump header file detection +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Apparently, the control.h is used from apps separately (outside +asoundlib.h). Avoid errors like: + +/usr/include/alsa/control.h:417:47: error: ‘snd_ump_endpoint_info_t’ has not been declared + 417 | int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info); + | ^~~~~~~~~~~~~~~~~~~~~~~ +/usr/include/alsa/control.h:418:44: error: ‘snd_ump_block_info_t’ has not been declared + 418 | int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info); + | ^~~~~~~~~~~~~~~~~~~~ + +Fixes: https://github.com/alsa-project/alsa-lib/issues/348 +Signed-off-by: Jaroslav Kysela +--- + include/control.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/control.h b/include/control.h +index ab482ba4..e7541d56 100644 +--- a/include/control.h ++++ b/include/control.h +@@ -413,6 +413,8 @@ int snd_ctl_pcm_prefer_subdevice(snd_ctl_t *ctl, int subdev); + int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device); + int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info); + int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev); ++#endif ++#ifdef __ALSA_UMP_H + int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device); + int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info); + int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info); +-- +2.41.0 + + +From 10bd599970acc71c92f85eb08943eb8d3d702a9c Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 6 Sep 2023 15:16:44 +0200 +Subject: [PATCH 3/6] global.h: move __STRING() macro outside !PIC ifdef block + +It solves the musl libc compilation issue. + +control.c: In function 'snd_ctl_open_conf': +../../include/global.h:98:36: warning: implicit declaration of function '__STRING' [-Wimplicit-function-declaratio] + 98 | #define SND_DLSYM_VERSION(version) __STRING(version) + | ^~~~~~~~ + +Fixes: https://github.com/alsa-project/alsa-lib/issues/350 +Signed-off-by: Jaroslav Kysela +--- + include/global.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/include/global.h b/include/global.h +index dfe9bc2b..3ecaeee8 100644 +--- a/include/global.h ++++ b/include/global.h +@@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void); + #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) + #endif + ++#ifndef __STRING ++/** \brief Return 'x' argument as string */ ++#define __STRING(x) #x ++#endif ++ + #ifdef PIC /* dynamic build */ + + /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */ +@@ -71,11 +76,6 @@ struct snd_dlsym_link { + + extern struct snd_dlsym_link *snd_dlsym_start; + +-#ifndef __STRING +-/** \brief Return 'x' argument as string */ +-#define __STRING(x) #x +-#endif +- + /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */ + #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version + /** +-- +2.41.0 + + +From 0e3dfb9f705ca78be34cd70fd59d67c431e29cc7 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 9 Sep 2023 17:42:03 +0200 +Subject: [PATCH 4/6] pcm: Fix segfault with 32bit libs + +The recent rearrangement of header inclusion order caused a regression +showing segfaults on 32bit Arm. The primary reason is the +inconsistent compile condition depending on the inclusion of config.h; +while most of other code include pcm_local.h (that implicitly includes +config.h) at first, pcm_direct.c doesn't do it, hence the access with +direct plugins crashes. + +For fixing it, we need to include config.h at the beginning. But, +it's better to include pcm_local.h for all relevant code for +consistency. The patch does it, and also it adds the guard in +pcm_local.h for double inclusions. + +Fixes: ad3a8b8b314e ("reshuffle included files to include config.h as first") +Link: https://github.com/alsa-project/alsa-lib/issues/352 +Signed-off-by: Takashi Iwai +--- + src/pcm/pcm_direct.c | 1 + + src/pcm/pcm_dmix.c | 2 +- + src/pcm/pcm_dshare.c | 1 + + src/pcm/pcm_dsnoop.c | 1 + + src/pcm/pcm_local.h | 5 +++++ + src/pcm/pcm_shm.c | 1 + + 6 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c +index 040fc160..e53e5923 100644 +--- a/src/pcm/pcm_direct.c ++++ b/src/pcm/pcm_direct.c +@@ -19,6 +19,7 @@ + * + */ + ++#include "pcm_local.h" + #include + #include + #include +diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c +index 7cd3c508..55cae3e7 100644 +--- a/src/pcm/pcm_dmix.c ++++ b/src/pcm/pcm_dmix.c +@@ -26,7 +26,7 @@ + * + */ + +-#include "config.h" ++#include "pcm_local.h" + #include + #include + #include +diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c +index 454b39a9..c0329098 100644 +--- a/src/pcm/pcm_dshare.c ++++ b/src/pcm/pcm_dshare.c +@@ -26,6 +26,7 @@ + * + */ + ++#include "pcm_local.h" + #include + #include + #include +diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c +index d3ce300c..bf67c68a 100644 +--- a/src/pcm/pcm_dsnoop.c ++++ b/src/pcm/pcm_dsnoop.c +@@ -26,6 +26,7 @@ + * + */ + ++#include "pcm_local.h" + #include + #include + #include +diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h +index 6a0e71e7..152c92c3 100644 +--- a/src/pcm/pcm_local.h ++++ b/src/pcm/pcm_local.h +@@ -20,6 +20,9 @@ + * + */ + ++#ifndef __PCM_LOCAL_H ++#define __PCM_LOCAL_H ++ + #include "config.h" + + #include +@@ -1223,3 +1226,5 @@ static inline void snd_pcm_unlock(snd_pcm_t *pcm) + #define snd_pcm_lock(pcm) do {} while (0) + #define snd_pcm_unlock(pcm) do {} while (0) + #endif /* THREAD_SAFE_API */ ++ ++#endif /* __PCM_LOCAL_H */ +diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c +index f0bfd934..d9596547 100644 +--- a/src/pcm/pcm_shm.c ++++ b/src/pcm/pcm_shm.c +@@ -26,6 +26,7 @@ + * + */ + ++#include "pcm_local.h" + #include + #include + #include +-- +2.41.0 + + +From 81a7a93636d9472fcb0c2ff32d9bfdf6ed10763d Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 13 Sep 2023 12:27:21 +0200 +Subject: [PATCH 5/6] reshuffle included files to include config.h as first - + v2 + +config.h may contain defines like _FILE_OFFSET_BITS which influence +the system wide include files (off_t types, open -> open64 function +usage etc.). + +Fixes: ad3a8b8b ("reshuffle included files to include config.h as first") +Related: https://github.com/alsa-project/alsa-lib/pull/333 +Signed-off-by: Jaroslav Kysela +--- + src/control/setup.c | 2 +- + src/rawmidi/rawmidi.c | 2 +- + src/rawmidi/rawmidi_local.h | 2 +- + src/rawmidi/rawmidi_virt.c | 4 +--- + src/rawmidi/ump.c | 4 ---- + src/seq/seq.c | 2 +- + src/seq/seq_hw.c | 2 +- + src/seq/seq_local.h | 2 +- + src/seq/seq_midi_event.c | 2 +- + src/seq/seqmid.c | 4 +--- + src/userfile.c | 2 +- + 11 files changed, 10 insertions(+), 18 deletions(-) + +diff --git a/src/control/setup.c b/src/control/setup.c +index 88635e42..fb096117 100644 +--- a/src/control/setup.c ++++ b/src/control/setup.c +@@ -29,13 +29,13 @@ + * + */ + ++#include "local.h" + #include + #include + #include + #include + #include + #include +-#include "local.h" + + #ifndef DOC_HIDDEN + typedef struct { +diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c +index 316f524b..c4b45fa2 100644 +--- a/src/rawmidi/rawmidi.c ++++ b/src/rawmidi/rawmidi.c +@@ -144,12 +144,12 @@ This example shows open and read/write rawmidi operations. + * Shows open and read/write rawmidi operations. + */ + ++#include "rawmidi_local.h" + #include + #include + #include + #include + #include +-#include "rawmidi_local.h" + + /** + * \brief setup the default parameters +diff --git a/src/rawmidi/rawmidi_local.h b/src/rawmidi/rawmidi_local.h +index 19dbf725..f0bb06a7 100644 +--- a/src/rawmidi/rawmidi_local.h ++++ b/src/rawmidi/rawmidi_local.h +@@ -19,10 +19,10 @@ + * + */ + ++#include "local.h" + #include + #include + #include +-#include "local.h" + + typedef struct { + int (*close)(snd_rawmidi_t *rawmidi); +diff --git a/src/rawmidi/rawmidi_virt.c b/src/rawmidi/rawmidi_virt.c +index 884b8ff8..04c485d3 100644 +--- a/src/rawmidi/rawmidi_virt.c ++++ b/src/rawmidi/rawmidi_virt.c +@@ -19,13 +19,11 @@ + * + */ + +-#include +-#include ++#include "rawmidi_local.h" + #include + #include + #include + #include +-#include "rawmidi_local.h" + #include "seq.h" + #include "seq_midi_event.h" + +diff --git a/src/rawmidi/ump.c b/src/rawmidi/ump.c +index 25fbaff2..39c1c4a9 100644 +--- a/src/rawmidi/ump.c ++++ b/src/rawmidi/ump.c +@@ -4,10 +4,6 @@ + * \brief Universal MIDI Protocol (UMP) Interface + */ + +-#include +-#include +-#include +-#include "local.h" + #include "rawmidi_local.h" + #include "ump_local.h" + +diff --git a/src/seq/seq.c b/src/seq/seq.c +index 899dfe9f..fd8ca30e 100644 +--- a/src/seq/seq.c ++++ b/src/seq/seq.c +@@ -777,8 +777,8 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev) + + */ + +-#include + #include "seq_local.h" ++#include + + /**************************************************************************** + * * +diff --git a/src/seq/seq_hw.c b/src/seq/seq_hw.c +index a51ebfb6..b74948c8 100644 +--- a/src/seq/seq_hw.c ++++ b/src/seq/seq_hw.c +@@ -20,9 +20,9 @@ + * + */ + ++#include "seq_local.h" + #include + #include +-#include "seq_local.h" + + #ifndef PIC + /* entry for static linking */ +diff --git a/src/seq/seq_local.h b/src/seq/seq_local.h +index 9b4a6545..46824806 100644 +--- a/src/seq/seq_local.h ++++ b/src/seq/seq_local.h +@@ -23,10 +23,10 @@ + #ifndef __SEQ_LOCAL_H + #define __SEQ_LOCAL_H + ++#include "local.h" + #include + #include + #include +-#include "local.h" + + #define SND_SEQ_OBUF_SIZE (16*1024) /* default size */ + #define SND_SEQ_IBUF_SIZE 500 /* in event_size aligned */ +diff --git a/src/seq/seq_midi_event.c b/src/seq/seq_midi_event.c +index df09bde3..95a44e9b 100644 +--- a/src/seq/seq_midi_event.c ++++ b/src/seq/seq_midi_event.c +@@ -28,10 +28,10 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "local.h" + #if HAVE_MALLOC_H + #include + #endif +-#include "local.h" + + #ifndef DOC_HIDDEN + +diff --git a/src/seq/seqmid.c b/src/seq/seqmid.c +index 55651f38..9ec93ee8 100644 +--- a/src/seq/seqmid.c ++++ b/src/seq/seqmid.c +@@ -20,14 +20,12 @@ + * + */ + +-#include +-#include ++#include "seq_local.h" + #include + #include + #include + #include + #include +-#include "seq_local.h" + + /** + * \brief queue controls - start/stop/continue +diff --git a/src/userfile.c b/src/userfile.c +index 4a740834..492ea9cb 100644 +--- a/src/userfile.c ++++ b/src/userfile.c +@@ -18,7 +18,7 @@ + * + */ + +-#include ++#include "config.h" + #include + #include + #include +-- +2.41.0 + + +From 96f60d829f2c9dc9ad9eda46410adaa41b4b0da0 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 10 Oct 2023 08:20:15 +0200 +Subject: [PATCH 6/6] seq: Fix typos in symbol version definitions + +There were obvious typos in src/Versions.in that resulted in the +undefined symbols. Correct those entries. + +Fixes: 2aefb5c41cc0 ("seq: Add UMP support") +Closes: https://github.com/alsa-project/alsa-lib/issues/356 +Signed-off-by: Takashi Iwai +--- + src/Versions.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/Versions.in b/src/Versions.in +index c8ac1c82..c53a99fa 100644 +--- a/src/Versions.in ++++ b/src/Versions.in +@@ -158,13 +158,13 @@ ALSA_1.2.10 { + @SYMBOL_PREFIX@snd_ctl_ump_block_info; + @SYMBOL_PREFIX@snd_seq_ump_*; + @SYMBOL_PREFIX@snd_seq_client_info_get_midi_version; +- @SYMBOL_PREFIX@snd_seq_seq_client_info_get_ump_group_enabled; ++ @SYMBOL_PREFIX@snd_seq_client_info_get_ump_group_enabled; + @SYMBOL_PREFIX@snd_seq_client_info_get_ump_groupless_enabled; +- @SYMBOL_PREFIX@snd_seq_seq_client_get_ump_conversion; ++ @SYMBOL_PREFIX@snd_seq_client_info_get_ump_conversion; + @SYMBOL_PREFIX@snd_seq_client_info_set_midi_version; +- @SYMBOL_PREFIX@snd_seq_seq_client_info_set_ump_group_enabled; ++ @SYMBOL_PREFIX@snd_seq_client_info_set_ump_group_enabled; + @SYMBOL_PREFIX@snd_seq_client_info_set_ump_groupless_enabled; +- @SYMBOL_PREFIX@snd_seq_seq_client_set_ump_conversion; ++ @SYMBOL_PREFIX@snd_seq_client_info_set_ump_conversion; + @SYMBOL_PREFIX@snd_seq_get_ump_endpoint_info; + @SYMBOL_PREFIX@snd_seq_get_ump_block_info; + @SYMBOL_PREFIX@snd_seq_set_ump_endpoint_info; +-- +2.41.0 + +From 915a71a2cdf6361f0fc77fa367a67910dc0288db Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 4 Nov 2023 10:05:39 +0100 +Subject: [PATCH] seq: Fix invalid sanity-check in + snd_seq_set_input_buffer_size() + +snd_seq_set_input_buffer_size() has an assert() call with packet_size, +but it's still uninitialized at that point. Fix it with the real +packet size. + +Fixes: 2aefb5c41cc0 ("seq: Add UMP support") +Signed-off-by: Takashi Iwai +--- + src/seq/seq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/seq/seq.c b/src/seq/seq.c +index fd8ca30e..5ec737a7 100644 +--- a/src/seq/seq.c ++++ b/src/seq/seq.c +@@ -1269,9 +1269,9 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size) + size_t packet_size; + + assert(seq && seq->ibuf); ++ packet_size = get_packet_size(seq); + assert(size >= packet_size); + snd_seq_drop_input(seq); +- packet_size = get_packet_size(seq); + size = (size + packet_size - 1) / packet_size; + if (size != seq->ibufsize) { + char *newbuf; +-- +2.41.0 + diff --git a/SOURCES/alsa-lib-1.0.14-glibc-open.patch b/SOURCES/alsa-lib-1.0.14-glibc-open.patch deleted file mode 100644 index bc625bd..0000000 --- a/SOURCES/alsa-lib-1.0.14-glibc-open.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- alsa-lib-1.0.14/aserver/aserver.c 2007-05-31 10:05:13.000000000 +0200 -+++ alsa-lib-1.0.14.lennart/aserver/aserver.c 2007-08-15 15:53:32.000000000 +0200 -@@ -35,6 +35,8 @@ - - #include "aserver.h" - -+#undef open -+ - char *command; - - #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) diff --git a/SOURCES/alsa-lib-1.2.10-glibc-open.patch b/SOURCES/alsa-lib-1.2.10-glibc-open.patch new file mode 100644 index 0000000..2e53a92 --- /dev/null +++ b/SOURCES/alsa-lib-1.2.10-glibc-open.patch @@ -0,0 +1,10 @@ +--- alsa-lib-1.2.10/aserver/aserver.c~ 2023-09-01 17:35:48.000000000 +0200 ++++ alsa-lib-1.2.10/aserver/aserver.c 2023-09-01 18:13:11.339601685 +0200 +@@ -35,6 +35,7 @@ + #include + #include + ++#undef open + + char *command; + diff --git a/SOURCES/alsa-ucm-conf.patch b/SOURCES/alsa-ucm-conf.patch new file mode 100644 index 0000000..2ac06b5 --- /dev/null +++ b/SOURCES/alsa-ucm-conf.patch @@ -0,0 +1,1984 @@ +From b68aa52acdd2763fedad5eec0f435fbf43e5ccc6 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 4 Sep 2023 16:39:52 +0200 +Subject: [PATCH 01/23] SplitPCM: Device argument may not be set + +Link: https://github.com/alsa-project/alsa-ucm-conf/issues/346 +Fixes: 10967ea ("SplitPCM: Fix Device variable in SplitPCMDevice macro") +Signed-off-by: Jaroslav Kysela +--- + ucm2/common/pcm/split.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/common/pcm/split.conf b/ucm2/common/pcm/split.conf +index 80f23e6..9ed2f95 100644 +--- a/ucm2/common/pcm/split.conf ++++ b/ucm2/common/pcm/split.conf +@@ -326,7 +326,7 @@ DefineMacro.SplitPCMDevice { + If.0 { + Condition { + Type String +- Empty "${var:__Device}" ++ Empty "${var:-__Device}" + } + True.Define.__Device "0" + } +-- +2.41.0 + + +From 93c36d19e0bedfd4eac0314ffe58266d64f00a1e Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Fri, 7 Jul 2023 12:53:09 +0100 +Subject: [PATCH 02/23] ucm2: codecs: wcd938x: use Analog volume for HeadPhones + +Current setup used Digital Volume to control Headset Volume which is +pretty saturated after centain gain. Fix the Digital gain at 0dB and use +Analog gain to do the volume control. + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/335 +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Johan Hovold +Tested-by: Johan Hovold +Signed-off-by: Jaroslav Kysela +--- + ucm2/Qualcomm/sc8280xp/HiFi.conf | 2 +- + ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf | 2 ++ + ucm2/codecs/wcd938x/init.conf | 10 +++++----- + 3 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/ucm2/Qualcomm/sc8280xp/HiFi.conf b/ucm2/Qualcomm/sc8280xp/HiFi.conf +index a184e9d..02c65e5 100644 +--- a/ucm2/Qualcomm/sc8280xp/HiFi.conf ++++ b/ucm2/Qualcomm/sc8280xp/HiFi.conf +@@ -44,7 +44,7 @@ SectionDevice."Headphones" { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + PlaybackMixer "default:${CardId}" +- PlaybackMixerElem "HP Digital" ++ PlaybackMixerElem "HP" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } +diff --git a/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf b/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf +index 6c9236d..f996938 100644 +--- a/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf ++++ b/ucm2/codecs/wcd938x/HeadphoneEnableSeq.conf +@@ -3,6 +3,8 @@ EnableSequence [ + cset "name='HPHR_RDAC Switch' 1" + cset "name='HPHL Switch' 1" + cset "name='HPHR Switch' 1" ++ cset "name='HPHR_COMP Switch' 0" ++ cset "name='HPHL_COMP Switch' 0" + cset "name='CLSH Switch' 1" + cset "name='LO Switch' 1" + ] +diff --git a/ucm2/codecs/wcd938x/init.conf b/ucm2/codecs/wcd938x/init.conf +index 9bf7fd8..3b7c119 100644 +--- a/ucm2/codecs/wcd938x/init.conf ++++ b/ucm2/codecs/wcd938x/init.conf +@@ -1,8 +1,8 @@ + # WCD938X specific volume control settings + + BootSequence [ +- cset "name='RX_RX0 Digital Volume' 80" +- cset "name='RX_RX1 Digital Volume' 80" ++ cset "name='RX_RX0 Digital Volume' 84" ++ cset "name='RX_RX1 Digital Volume' 84" + cset "name='ADC2 Volume' 12" + ] + +@@ -10,9 +10,9 @@ LibraryConfig.remap.Config { + + ctl.default.map { + # Merge two mono controls into one stereo +- "name='HP Digital Volume'" { +- "name='RX_RX0 Digital Volume'".vindex.0 0 +- "name='RX_RX1 Digital Volume'".vindex.1 0 ++ "name='HP Volume'" { ++ "name='HPHL Volume'".vindex.0 0 ++ "name='HPHR Volume'".vindex.1 0 + } + } + } +-- +2.41.0 + + +From 489b9a1406b640d6eeb44b1a78e5750ec6d691ec Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Tue, 18 Jul 2023 12:51:06 +0100 +Subject: [PATCH 03/23] ucm2: codecs: wsa883x: add Speakers Volume in init conf + +Add combined analog volume controls for Speakers in the init conf + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/335 +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Johan Hovold +Tested-by: Johan Hovold +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/wsa883x/init.conf | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + create mode 100644 ucm2/codecs/wsa883x/init.conf + +diff --git a/ucm2/codecs/wsa883x/init.conf b/ucm2/codecs/wsa883x/init.conf +new file mode 100644 +index 0000000..75a8fa4 +--- /dev/null ++++ b/ucm2/codecs/wsa883x/init.conf +@@ -0,0 +1,18 @@ ++# WSA883x specific volume control settings ++ ++BootSequence [ ++ cset "name='WSA_RX0 Digital Volume' 84" ++ cset "name='WSA_RX1 Digital Volume' 84" ++] ++ ++LibraryConfig.remap.Config { ++ ++ ctl.default.map { ++ # Merge two mono controls into one stereo ++ "name='Speakers Volume'" { ++ "name='SpkrLeft PA Volume'".vindex.0 0 ++ "name='SpkrRight PA Volume'".vindex.1 0 ++ } ++ } ++} ++ +-- +2.41.0 + + +From ddf329098b4427851465709d091f8d8770c7c130 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Tue, 18 Jul 2023 12:52:46 +0100 +Subject: [PATCH 04/23] ucm2: Qualcomm: sc8280xp: use Speakers volume control + +Make use of Speakers volume control to control analog gain on WSA +Speakers. + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/335 +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Johan Hovold +Tested-by: Johan Hovold +Signed-off-by: Jaroslav Kysela +--- + ucm2/Qualcomm/sc8280xp/HiFi.conf | 1 + + ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/ucm2/Qualcomm/sc8280xp/HiFi.conf b/ucm2/Qualcomm/sc8280xp/HiFi.conf +index 02c65e5..0fb5302 100644 +--- a/ucm2/Qualcomm/sc8280xp/HiFi.conf ++++ b/ucm2/Qualcomm/sc8280xp/HiFi.conf +@@ -29,6 +29,7 @@ SectionDevice."Speaker" { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},1" + PlaybackMixer "default:${CardId}" ++ PlaybackMixerElem "Speakers" + } + } + +diff --git a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +index 6df65f9..fd52729 100644 +--- a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf ++++ b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +@@ -8,3 +8,4 @@ SectionUseCase."HiFi" { + Include.card-init.File "/lib/card-init.conf" + Include.ctl-remap.File "/lib/ctl-remap.conf" + Include.codec-init.File "/codecs/wcd938x/init.conf" ++Include.codec-init.File "/codecs/wsa883x/init.conf" +-- +2.41.0 + + +From e25f159098821bb6dbc00d6183d24e36ae11867d Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Tue, 18 Jul 2023 12:54:12 +0100 +Subject: [PATCH 05/23] ucm2: codecs: lpass-wsa: use set Digital gain at 0dB + +For some reason we ended up with a Digital gain below 0dB, resulting in +a very low speaker volume. +Fix this to 0dB and let Analog gain control speakers volume. + +CloseS: https://github.com/alsa-project/alsa-ucm-conf/pull/335 +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Johan Hovold +Tested-by: Johan Hovold +Signed-off-by: Jaroslav Kysela +--- + ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf | 1 + + ucm2/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf | 2 -- + ucm2/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf | 2 -- + ucm2/codecs/qcom-lpass/wsa-macro/init.conf | 6 ++++++ + ucm2/codecs/wsa883x/init.conf | 6 ------ + 5 files changed, 7 insertions(+), 10 deletions(-) + create mode 100644 ucm2/codecs/qcom-lpass/wsa-macro/init.conf + +diff --git a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +index fd52729..dd8f584 100644 +--- a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf ++++ b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +@@ -9,3 +9,4 @@ Include.card-init.File "/lib/card-init.conf" + Include.ctl-remap.File "/lib/ctl-remap.conf" + Include.codec-init.File "/codecs/wcd938x/init.conf" + Include.codec-init.File "/codecs/wsa883x/init.conf" ++Include.codec-init.File "/codecs/qcom-lpass/wsa-macro/init.conf" +diff --git a/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf b/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf +index 1f27d4c..98cf061 100644 +--- a/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf ++++ b/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf +@@ -1,6 +1,4 @@ + DisableSequence [ +- cset "name='WSA_RX0 Digital Volume' 0" +- cset "name='WSA_RX1 Digital Volume' 0" + cset "name='WSA_COMP1 Switch' 0" + cset "name='WSA_COMP2 Switch' 0" + cset "name='WSA_RX0 INP0' ZERO" +diff --git a/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf b/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf +index 618bab4..488826b 100644 +--- a/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf ++++ b/ucm2/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf +@@ -5,6 +5,4 @@ EnableSequence [ + cset "name='WSA_RX1 INP0' RX1" + cset "name='WSA_COMP1 Switch' 1" + cset "name='WSA_COMP2 Switch' 1" +- cset "name='WSA_RX0 Digital Volume' 68" +- cset "name='WSA_RX1 Digital Volume' 68" + ] +diff --git a/ucm2/codecs/qcom-lpass/wsa-macro/init.conf b/ucm2/codecs/qcom-lpass/wsa-macro/init.conf +new file mode 100644 +index 0000000..29f7c39 +--- /dev/null ++++ b/ucm2/codecs/qcom-lpass/wsa-macro/init.conf +@@ -0,0 +1,6 @@ ++# WSA Digital codec specific volume control settings ++ ++BootSequence [ ++ cset "name='WSA_RX0 Digital Volume' 84" ++ cset "name='WSA_RX1 Digital Volume' 84" ++] +diff --git a/ucm2/codecs/wsa883x/init.conf b/ucm2/codecs/wsa883x/init.conf +index 75a8fa4..ae7d0fb 100644 +--- a/ucm2/codecs/wsa883x/init.conf ++++ b/ucm2/codecs/wsa883x/init.conf +@@ -1,10 +1,4 @@ + # WSA883x specific volume control settings +- +-BootSequence [ +- cset "name='WSA_RX0 Digital Volume' 84" +- cset "name='WSA_RX1 Digital Volume' 84" +-] +- + LibraryConfig.remap.Config { + + ctl.default.map { +-- +2.41.0 + + +From 9fd2f06a2c0fdd19b2cdae7d699b18e7d775940f Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Wed, 27 Sep 2023 13:22:24 +0100 +Subject: [PATCH 06/23] ucm2: codecs: lpass-rx: use set Digital gain at 0dB + +For some reason we ended up with a Digital gain below 0dB, resulting in +a very low HP volume. +Fix this to 0dB and let Analog gain control HP volume. +Also remove all redundant setting of this control. + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/335 +Signed-off-by: Srinivas Kandagatla +Reviewed-by: Johan Hovold +Tested-by: Johan Hovold +Signed-off-by: Jaroslav Kysela +--- + ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf | 1 + + ucm2/codecs/qcom-lpass/rx-macro/init.conf | 6 ++++++ + ucm2/codecs/wcd938x/DefaultEnableSeq.conf | 2 -- + ucm2/codecs/wcd938x/init.conf | 2 -- + 4 files changed, 7 insertions(+), 4 deletions(-) + create mode 100644 ucm2/codecs/qcom-lpass/rx-macro/init.conf + +diff --git a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +index dd8f584..aea66d8 100644 +--- a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf ++++ b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf +@@ -10,3 +10,4 @@ Include.ctl-remap.File "/lib/ctl-remap.conf" + Include.codec-init.File "/codecs/wcd938x/init.conf" + Include.codec-init.File "/codecs/wsa883x/init.conf" + Include.codec-init.File "/codecs/qcom-lpass/wsa-macro/init.conf" ++Include.codec-init.File "/codecs/qcom-lpass/rx-macro/init.conf" +diff --git a/ucm2/codecs/qcom-lpass/rx-macro/init.conf b/ucm2/codecs/qcom-lpass/rx-macro/init.conf +new file mode 100644 +index 0000000..55b6927 +--- /dev/null ++++ b/ucm2/codecs/qcom-lpass/rx-macro/init.conf +@@ -0,0 +1,6 @@ ++# RX Digital codec specific volume control settings ++ ++BootSequence [ ++ cset "name='RX_RX0 Digital Volume' 84" ++ cset "name='RX_RX1 Digital Volume' 84" ++] +diff --git a/ucm2/codecs/wcd938x/DefaultEnableSeq.conf b/ucm2/codecs/wcd938x/DefaultEnableSeq.conf +index d283a5d..5da6717 100644 +--- a/ucm2/codecs/wcd938x/DefaultEnableSeq.conf ++++ b/ucm2/codecs/wcd938x/DefaultEnableSeq.conf +@@ -1,6 +1,4 @@ + EnableSequence [ +- cset "name='RX_RX0 Digital Volume' 80" +- cset "name='RX_RX1 Digital Volume' 80" + cset "name='HPHR Volume' 20" + cset "name='HPHL Volume' 20" + ] +diff --git a/ucm2/codecs/wcd938x/init.conf b/ucm2/codecs/wcd938x/init.conf +index 3b7c119..c2a418c 100644 +--- a/ucm2/codecs/wcd938x/init.conf ++++ b/ucm2/codecs/wcd938x/init.conf +@@ -1,8 +1,6 @@ + # WCD938X specific volume control settings + + BootSequence [ +- cset "name='RX_RX0 Digital Volume' 84" +- cset "name='RX_RX1 Digital Volume' 84" + cset "name='ADC2 Volume' 12" + ] + +-- +2.41.0 + + +From cda5b30bb7f5d0443e0d7be980045acb77dd8457 Mon Sep 17 00:00:00 2001 +From: Sebastian Mangelsen +Date: Wed, 13 Sep 2023 23:16:42 +0200 +Subject: [PATCH 07/23] Roland Bridgecast - add missing intermediate config + file + +- tested on ArchLinux running UCM version 1.2.10 + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/354 +Signed-off-by: Sebastian Mangelsen +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Roland/BridgeCast.conf | 6 ++++++ + 1 file changed, 6 insertions(+) + create mode 100644 ucm2/USB-Audio/Roland/BridgeCast.conf + +diff --git a/ucm2/USB-Audio/Roland/BridgeCast.conf b/ucm2/USB-Audio/Roland/BridgeCast.conf +new file mode 100644 +index 0000000..f943c98 +--- /dev/null ++++ b/ucm2/USB-Audio/Roland/BridgeCast.conf +@@ -0,0 +1,6 @@ ++Comment "Roland BridgeCast Hifi-Mode" ++ ++SectionUseCase."HiFi" { ++ Comment "Default" ++ File "/USB-Audio/Roland/BridgeCast-Hifi.conf" ++} +-- +2.41.0 + + +From c1acd4022349878ae40718bb11fc4817378b25d5 Mon Sep 17 00:00:00 2001 +From: Sebastian Mangelsen +Date: Wed, 13 Sep 2023 23:21:39 +0200 +Subject: [PATCH 08/23] Roland/BridgeCast - config, improve config title + +- comment is used as profile name when using + pavucontrol, DEFAULT wasn't saying much + thus I've changed it to something more + explanatory. + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/354 +Signed-off-by: Sebastian Mangelsen +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Roland/BridgeCast.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/USB-Audio/Roland/BridgeCast.conf b/ucm2/USB-Audio/Roland/BridgeCast.conf +index f943c98..6231a72 100644 +--- a/ucm2/USB-Audio/Roland/BridgeCast.conf ++++ b/ucm2/USB-Audio/Roland/BridgeCast.conf +@@ -1,6 +1,6 @@ + Comment "Roland BridgeCast Hifi-Mode" + + SectionUseCase."HiFi" { +- Comment "Default" ++ Comment "BridgeCast MultiChannel" + File "/USB-Audio/Roland/BridgeCast-Hifi.conf" + } +-- +2.41.0 + + +From 1c3a937ee2774bfa403f245339e671b67a040755 Mon Sep 17 00:00:00 2001 +From: Sebastian Mangelsen +Date: Thu, 14 Sep 2023 00:32:04 +0200 +Subject: [PATCH 09/23] Roland/BridgeCast - adjust new input channels after + latest FW update + +- the latest FW updated exposed yet another channel + for SFX sounds, played on button events +- legacy channels have been renumbered + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/354 +Signed-off-by: Sebastian Mangelsen +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf b/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf +index e708a18..e2f9ac4 100644 +--- a/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf ++++ b/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf +@@ -110,7 +110,7 @@ SectionDevice."Line4" { + } + + SectionDevice."Line5" { +- Comment "Mic" ++ Comment "StreamMix" + + Value { + CapturePriority 100 +@@ -128,7 +128,7 @@ SectionDevice."Line5" { + } + + SectionDevice."Line6" { +- Comment "StreamMix" ++ Comment "Mic" + + Value { + CapturePriority 200 +@@ -146,7 +146,7 @@ SectionDevice."Line6" { + } + + SectionDevice."Line7" { +- Comment "Unknown" ++ Comment "SFX" + + Value { + CapturePriority 300 +@@ -162,5 +162,3 @@ SectionDevice."Line7" { + ChannelPos1 FR + } + } +- +- +-- +2.41.0 + + +From a788a42fcb269d33e91c185e50868c2d9119b4de Mon Sep 17 00:00:00 2001 +From: Sebastian Mangelsen +Date: Thu, 14 Sep 2023 00:36:21 +0200 +Subject: [PATCH 10/23] Roland/BridgeCast - adjust capture priority for input + channels + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/354 +Signed-off-by: Sebastian Mangelsen +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf b/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf +index e2f9ac4..1812433 100644 +--- a/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf ++++ b/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf +@@ -113,7 +113,7 @@ SectionDevice."Line5" { + Comment "StreamMix" + + Value { +- CapturePriority 100 ++ CapturePriority 300 + } + Macro.pcm_split.SplitPCMDevice { + Name "bc_stereo_in" +@@ -149,7 +149,7 @@ SectionDevice."Line7" { + Comment "SFX" + + Value { +- CapturePriority 300 ++ CapturePriority 100 + } + Macro.pcm_split.SplitPCMDevice { + Name "bc_stereo_in" +-- +2.41.0 + + +From 6cf648192b06c6d8e3781754a62aa8110ef91a90 Mon Sep 17 00:00:00 2001 +From: Simon Greaves +Date: Mon, 21 Aug 2023 21:42:03 +0100 +Subject: [PATCH 11/23] Add a config for the Allen & Heath Zedi 10 mixer. + +The mixer has an embedded 4x4 USB interface, this config surfaces +the mixer channels as 4 mono inputs, 2 stereo inputs and 2 stereo +outputs. Config based on the Behringer Flow8 config. + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/341 +Signed-off-by: Simon Greaves +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf | 194 ++++++++++++++++++ + ucm2/USB-Audio/AllenAndHeath/Zedi10.conf | 12 ++ + ucm2/USB-Audio/USB-Audio.conf | 9 + + 3 files changed, 215 insertions(+) + create mode 100644 ucm2/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf + create mode 100644 ucm2/USB-Audio/AllenAndHeath/Zedi10.conf + +diff --git a/ucm2/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf b/ucm2/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf +new file mode 100644 +index 0000000..4bbae15 +--- /dev/null ++++ b/ucm2/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf +@@ -0,0 +1,194 @@ ++Include.pcm_split.File "/common/pcm/split.conf" ++ ++Macro [ ++ { ++ SplitPCM { ++ Name "zedi10_stereo_out" ++ Direction Playback ++ Channels 2 ++ HWChannels 4 ++ HWChannelPos0 FL ++ HWChannelPos1 FR ++ HWChannelPos2 FL ++ HWChannelPos3 FR ++ } ++ } ++ { ++ SplitPCM { ++ Name "zedi10_stereo_in" ++ Direction Capture ++ Channels 2 ++ HWChannels 4 ++ HWChannelPos0 FL ++ HWChannelPos1 FR ++ HWChannelPos2 FL ++ HWChannelPos3 FR ++ } ++ } ++ { ++ SplitPCM { ++ Name "zedi10_mono_in" ++ Direction Capture ++ Channels 1 ++ HWChannels 4 ++ HWChannelPos0 MONO ++ HWChannelPos1 MONO ++ HWChannelPos2 MONO ++ HWChannelPos3 MONO ++ } ++ } ++] ++ ++SectionDevice."Line1" { ++ Comment "USB IN 1-2" ++ ++ Value { ++ PlaybackPriority 100 ++ } ++ ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_stereo_out" ++ Direction Playback ++ HWChannels 4 ++ Channels 2 ++ Channel0 0 ++ Channel1 1 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} ++ ++SectionDevice."Line2" { ++ Comment "USB IN 3-4" ++ ++ Value { ++ PlaybackPriority 200 ++ } ++ ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_stereo_out" ++ Direction Playback ++ HWChannels 4 ++ Channels 2 ++ Channel0 2 ++ Channel1 3 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} ++ ++SectionDevice."Mic1" { ++ Comment "M1" ++ ++ ConflictingDevice [ ++ "Line12" ++ ] ++ ++ Value { ++ CapturePriority 100 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 0 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic2" { ++ Comment "M2" ++ ++ ConflictingDevice [ ++ "Line12" ++ ] ++ ++ Value { ++ CapturePriority 101 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 1 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic3" { ++ Comment "M3" ++ ++ ConflictingDevice [ ++ "Line34" ++ ] ++ ++ Value { ++ CapturePriority 102 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 2 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic4" { ++ Comment "M4" ++ ++ ConflictingDevice [ ++ "Line34" ++ ] ++ ++ Value { ++ CapturePriority 103 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 3 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Line12" { ++ Comment "USB OUT 1-2" ++ ++ Value { ++ CapturePriority 104 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_stereo_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 2 ++ Channel0 0 ++ Channel1 1 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} ++ ++SectionDevice."Line34" { ++ Comment "USB OUT 3-4" ++ ++ Value { ++ CapturePriority 105 ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "zedi10_stereo_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 2 ++ Channel0 2 ++ Channel1 3 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} +diff --git a/ucm2/USB-Audio/AllenAndHeath/Zedi10.conf b/ucm2/USB-Audio/AllenAndHeath/Zedi10.conf +new file mode 100644 +index 0000000..00d2273 +--- /dev/null ++++ b/ucm2/USB-Audio/AllenAndHeath/Zedi10.conf +@@ -0,0 +1,12 @@ ++Comment "Allen & Heath Zedi10 Recording Mode" ++ ++SectionUseCase."Recording" { ++ Comment "Recording Mode (4 chan output, 4 chan input)" ++ File "/USB-Audio/AllenAndHeath/Zedi10-Hifi.conf" ++} ++ ++Define.DirectCardName "Zedi10" ++Define.DirectPlaybackChannels 4 ++Define.DirectCaptureChannels 4 ++ ++Include.dhw.File "/common/direct.conf" +diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf +index a29f33c..81a1446 100644 +--- a/ucm2/USB-Audio/USB-Audio.conf ++++ b/ucm2/USB-Audio/USB-Audio.conf +@@ -337,6 +337,15 @@ If.ua-volt2 { + } + } + ++If.zedi10 { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "USB22f0:0016" ++ } ++ True.Define.ProfileName "AllenAndHeath/Zedi10" ++} ++ + If.mixremap { + Condition { + Type String +-- +2.41.0 + + +From 90f991ba7740f80e3abc00a07a44061f3ee7da67 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Mon, 27 Sep 2021 22:23:40 +0200 +Subject: [PATCH 12/23] meson: add initial p241 support + +Add support for the p241 board, the amlogic s905x reference design + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/355 +Signed-off-by: Jerome Brunet +Signed-off-by: Jaroslav Kysela +--- + ucm2/Amlogic/p241/p241-HiFi.conf | 40 +++++++++++++++++++++++++ + ucm2/Amlogic/p241/p241.conf | 31 +++++++++++++++++++ + ucm2/conf.d/gx-sound-card/GXL-P241.conf | 1 + + 3 files changed, 72 insertions(+) + create mode 100644 ucm2/Amlogic/p241/p241-HiFi.conf + create mode 100644 ucm2/Amlogic/p241/p241.conf + create mode 120000 ucm2/conf.d/gx-sound-card/GXL-P241.conf + +diff --git a/ucm2/Amlogic/p241/p241-HiFi.conf b/ucm2/Amlogic/p241/p241-HiFi.conf +new file mode 100644 +index 0000000..056116e +--- /dev/null ++++ b/ucm2/Amlogic/p241/p241-HiFi.conf +@@ -0,0 +1,40 @@ ++SectionDevice."Line" { ++ Comment "Analog Lineout" ++ ++ EnableSequence [ ++ cset "name='AIU ACODEC SRC' I2S" ++ cset "name='AIU ACODEC OUT EN Switch' 1" ++ cset "name='ACODEC Playback Switch' 1" ++ ] ++ ++ DisableSequence [ ++ cset "name='ACODEC Playback Switch' 0" ++ cset "name='AIU ACODEC OUT EN Switch' 0" ++ cset "name='AIU ACODEC SRC' DISABLED" ++ ] ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId},0" ++ PlaybackChannels 2 ++ PlaybackVolume "ACODEC Playback Volume" ++ PlaybackMixerElem "ACODEC" ++ } ++} ++ ++SectionDevice."HDMI" { ++ Comment "HDMI" ++ ++ EnableSequence [ ++ cset "name='AIU HDMI CTRL SRC' I2S" ++ ] ++ ++ DisableSequence [ ++ cset "name='AIU HDMI CTRL SRC' DISABLED" ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId},0" ++ } ++} +diff --git a/ucm2/Amlogic/p241/p241.conf b/ucm2/Amlogic/p241/p241.conf +new file mode 100644 +index 0000000..b6f4010 +--- /dev/null ++++ b/ucm2/Amlogic/p241/p241.conf +@@ -0,0 +1,31 @@ ++# Use case for the p241 Amlogic s805x reference design ++ ++Syntax 3 ++ ++SectionUseCase."HiFi" { ++ File "/Amlogic/p241/p241-HiFi.conf" ++ Comment "Play HiFi quality Music" ++} ++ ++FixedBootSequence [ ++ cset "name='AIU SPDIF SRC SEL' SPDIF" ++] ++ ++BootSequence [ ++ cset "name='AIU ACODEC I2S Lane Select' 0" ++ cset "name='ACODEC Playback Channel Mode' Stereo" ++ cset "name='ACODEC Playback Volume' 80%" ++ cset "name='ACODEC Ramp Rate' Fast" ++ cset "name='ACODEC Volume Ramp Switch' on" ++ cset "name='ACODEC Mute Ramp Switch' on" ++ cset "name='ACODEC Unmute Ramp Switch' on" ++ cset "name='ACODEC Right DAC Sel' Right" ++ cset "name='ACODEC Left DAC Sel' Left" ++] ++ ++SectionDefaults [ ++ cset "name='ACODEC Playback Switch' off" ++ cset "name='AIU ACODEC OUT EN Switch' off" ++ cset "name='AIU ACODEC SRC' DISABLED" ++ cset "name='AIU HDMI CTRL SRC' DISABLED" ++] +diff --git a/ucm2/conf.d/gx-sound-card/GXL-P241.conf b/ucm2/conf.d/gx-sound-card/GXL-P241.conf +new file mode 120000 +index 0000000..a05d657 +--- /dev/null ++++ b/ucm2/conf.d/gx-sound-card/GXL-P241.conf +@@ -0,0 +1 @@ ++../../Amlogic/p241/p241.conf +\ No newline at end of file +-- +2.41.0 + + +From f869f26401c3d02cef4869750c49d30139041c74 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Sun, 23 Jan 2022 19:37:26 +0100 +Subject: [PATCH 13/23] meson: add initial libretech cc support + +Add support for the libretech-cc based on the amlogic s905x + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/355 +Signed-off-by: Jerome Brunet +Signed-off-by: Jaroslav Kysela +--- + ucm2/conf.d/gx-sound-card/LIBRETECH-CC.conf | 1 + + 1 file changed, 1 insertion(+) + create mode 120000 ucm2/conf.d/gx-sound-card/LIBRETECH-CC.conf + +diff --git a/ucm2/conf.d/gx-sound-card/LIBRETECH-CC.conf b/ucm2/conf.d/gx-sound-card/LIBRETECH-CC.conf +new file mode 120000 +index 0000000..a05d657 +--- /dev/null ++++ b/ucm2/conf.d/gx-sound-card/LIBRETECH-CC.conf +@@ -0,0 +1 @@ ++../../Amlogic/p241/p241.conf +\ No newline at end of file +-- +2.41.0 + + +From fafffe418ea1fd5ac2b43846517490ad9410030e Mon Sep 17 00:00:00 2001 +From: Akihiko Odaki +Date: Mon, 3 Oct 2022 18:07:53 +0900 +Subject: [PATCH 14/23] ucm2: acp3xalc5682m98: Add JackControls + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/357 +Signed-off-by: Akihiko Odaki +Signed-off-by: Jaroslav Kysela +--- + ucm2/AMD/acp3xalc5682m98/HiFi.conf | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ucm2/AMD/acp3xalc5682m98/HiFi.conf b/ucm2/AMD/acp3xalc5682m98/HiFi.conf +index 97e4294..aa0e91b 100644 +--- a/ucm2/AMD/acp3xalc5682m98/HiFi.conf ++++ b/ucm2/AMD/acp3xalc5682m98/HiFi.conf +@@ -47,6 +47,7 @@ SectionDevice."Headphones" { + Value { + PlaybackPCM "hw:${CardId},0" + PlaybackMixerElem "DAC1" ++ JackControl "Headphone Jack" + } + EnableSequence [ + cset "name='Headphone Jack Switch' on" +@@ -97,6 +98,7 @@ If.1mic { + Value { + CapturePCM "hw:${CardId},0" + CaptureMixerElem "Headset Mic" ++ JackControl "Headset Mic Jack" + } + EnableSequence [ + cset "name='Headset Mic Switch' on" +@@ -122,6 +124,7 @@ If.1mic { + Value { + CapturePCM "hw:${CardId},0" + CaptureMixerElem "Headset Mic" ++ JackControl "Headset Mic Jack" + } + EnableSequence [ + cset "name='Headset Mic Switch' on" +-- +2.41.0 + + +From fedff06b0bc04dc82d43346082c43d46d19706f5 Mon Sep 17 00:00:00 2001 +From: Akihiko Odaki +Date: Thu, 19 Oct 2023 19:48:39 +0900 +Subject: [PATCH 15/23] ucm2: acp3xalc5682m98: Add priority values + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/357 +Signed-off-by: Akihiko Odaki +Signed-off-by: Jaroslav Kysela +--- + ucm2/AMD/acp3xalc5682m98/HiFi.conf | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/ucm2/AMD/acp3xalc5682m98/HiFi.conf b/ucm2/AMD/acp3xalc5682m98/HiFi.conf +index aa0e91b..915d020 100644 +--- a/ucm2/AMD/acp3xalc5682m98/HiFi.conf ++++ b/ucm2/AMD/acp3xalc5682m98/HiFi.conf +@@ -33,6 +33,7 @@ SectionDevice."Speaker" { + Comment "Speaker" + Value { + PlaybackPCM "hw:${CardId},1" ++ PlaybackPriority 200 + } + EnableSequence [ + cset "name='Spk Switch' on" +@@ -46,6 +47,7 @@ SectionDevice."Headphones" { + Comment "Headphones" + Value { + PlaybackPCM "hw:${CardId},0" ++ PlaybackPriority 300 + PlaybackMixerElem "DAC1" + JackControl "Headphone Jack" + } +@@ -74,6 +76,7 @@ If.1mic { + ] + Value { + CapturePCM "hw:${CardId},2" ++ CapturePriority 200 + } + EnableSequence [ + cset "name='Dmic Mux' Front Mic" +@@ -87,6 +90,7 @@ If.1mic { + ] + Value { + CapturePCM "hw:${CardId},2" ++ CapturePriority 100 + } + EnableSequence [ + cset "name='Dmic Mux' Rear Mic" +@@ -97,6 +101,7 @@ If.1mic { + Comment "Microphone" + Value { + CapturePCM "hw:${CardId},0" ++ CapturePriority 300 + CaptureMixerElem "Headset Mic" + JackControl "Headset Mic Jack" + } +@@ -113,6 +118,7 @@ If.1mic { + Comment "Internal Microphone" + Value { + CapturePCM "hw:${CardId},2" ++ CapturePriority 200 + } + EnableSequence [ + cset "name='Dmic Mux' Front Mic" +@@ -123,6 +129,7 @@ If.1mic { + Comment "Microphone" + Value { + CapturePCM "hw:${CardId},0" ++ CapturePriority 300 + CaptureMixerElem "Headset Mic" + JackControl "Headset Mic Jack" + } +-- +2.41.0 + + +From d0c630e04241d07f1d4148de725813ad58a98cec Mon Sep 17 00:00:00 2001 +From: Janis Jansons +Date: Wed, 11 Oct 2023 03:33:55 +0300 +Subject: [PATCH 16/23] Add UCM2 configuration for Behringer UMC404HD + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/358 +Signed-off-by: Janis Jansons +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/Behringer/UMC404HD-HiFi.conf | 200 ++++++++++++++++++++ + ucm2/USB-Audio/Behringer/UMC404HD.conf | 11 ++ + ucm2/USB-Audio/USB-Audio.conf | 12 ++ + 3 files changed, 223 insertions(+) + create mode 100644 ucm2/USB-Audio/Behringer/UMC404HD-HiFi.conf + create mode 100644 ucm2/USB-Audio/Behringer/UMC404HD.conf + +diff --git a/ucm2/USB-Audio/Behringer/UMC404HD-HiFi.conf b/ucm2/USB-Audio/Behringer/UMC404HD-HiFi.conf +new file mode 100644 +index 0000000..df45dca +--- /dev/null ++++ b/ucm2/USB-Audio/Behringer/UMC404HD-HiFi.conf +@@ -0,0 +1,200 @@ ++Include.pcm_split.File "/common/pcm/split.conf" ++ ++Macro [ ++ { ++ SplitPCM { ++ Name "umc404hd_stereo_out" ++ Direction Playback ++ Format S32_LE ++ Channels 2 ++ HWChannels 4 ++ HWChannelPos0 FL ++ HWChannelPos1 FR ++ HWChannelPos2 FL ++ HWChannelPos3 FR ++ } ++ } ++ { ++ SplitPCM { ++ Name "umc404hd_mono_in" ++ Direction Capture ++ Format S32_LE ++ Channels 1 ++ HWChannels 4 ++ HWChannelPos0 MONO ++ HWChannelPos1 MONO ++ HWChannelPos2 MONO ++ HWChannelPos3 MONO ++ } ++ } ++] ++ ++Define.PCMCTLName "PCM Playback" ++ ++If.pcm_controls { ++ Condition { ++ Type ControlExists ++ Control "name='UMC404HD 192k Output Playback Switch'" ++ } ++ True.Define.PCMCTLName "UMC404HD 192k Output Playback" ++} ++ ++Include.ctl_remap.File "/common/ctl/remap.conf" ++ ++Macro [ ++ { ++ CtlRemapStereoVolSw { ++ Dst "Line A Playback" ++ Src "${var:PCMCTLName}" ++ Index0 0 ++ Index1 1 ++ } ++ } ++ { ++ CtlRemapStereoVolSw { ++ Dst "Line B Playback" ++ Src "${var:PCMCTLName}" ++ Index0 2 ++ Index1 3 ++ } ++ } ++ { ++ CtlRemapMonoVolSw { ++ Dst "Input 1 Capture" ++ Src "Mic Capture" ++ Index 0 ++ } ++ } ++ { ++ CtlRemapMonoVolSw { ++ Dst "Input 2 Capture" ++ Src "Mic Capture" ++ Index 1 ++ } ++ } ++ { ++ CtlRemapMonoVolSw { ++ Dst "Input 3 Capture" ++ Src "Mic Capture" ++ Index 2 ++ } ++ } ++ { ++ CtlRemapMonoVolSw { ++ Dst "Input 4 Capture" ++ Src "Mic Capture" ++ Index 3 ++ } ++ } ++] ++ ++SectionDevice."Line1" { ++ Comment "Line A" ++ Value { ++ PlaybackPriority 200 ++ PlaybackMixer "default:${CardId}" ++ PlaybackMixerElem "Line A" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_stereo_out" ++ Direction Playback ++ HWChannels 4 ++ Channels 2 ++ Channel0 0 ++ Channel1 1 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} ++ ++SectionDevice."Line2" { ++ Comment "Line B" ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackMixer "default:${CardId}" ++ PlaybackMixerElem "Line B" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_stereo_out" ++ Direction Playback ++ HWChannels 4 ++ Channels 2 ++ Channel0 2 ++ Channel1 3 ++ ChannelPos0 FL ++ ChannelPos1 FR ++ } ++} ++ ++SectionDevice."Mic1" { ++ Comment "Input 1" ++ ++ Value { ++ CapturePriority 400 ++ CaptureMixer "default:${CardId}" ++ CaptureMixerElem "Input 1" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 0 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic2" { ++ Comment "Input 2" ++ ++ Value { ++ CapturePriority 300 ++ CaptureMixer "default:${CardId}" ++ CaptureMixerElem "Input 2" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 1 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic3" { ++ Comment "Input 3" ++ ++ Value { ++ CapturePriority 200 ++ CaptureMixer "default:${CardId}" ++ CaptureMixerElem "Input 3" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 2 ++ ChannelPos0 MONO ++ } ++} ++ ++SectionDevice."Mic4" { ++ Comment "Input 4" ++ ++ Value { ++ CapturePriority 100 ++ CaptureMixer "default:${CardId}" ++ CaptureMixerElem "Input 4" ++ } ++ Macro.pcm_split.SplitPCMDevice { ++ Name "umc404hd_mono_in" ++ Direction Capture ++ HWChannels 4 ++ Channels 1 ++ Channel0 3 ++ ChannelPos0 MONO ++ } ++} +diff --git a/ucm2/USB-Audio/Behringer/UMC404HD.conf b/ucm2/USB-Audio/Behringer/UMC404HD.conf +new file mode 100644 +index 0000000..91f231b +--- /dev/null ++++ b/ucm2/USB-Audio/Behringer/UMC404HD.conf +@@ -0,0 +1,11 @@ ++Comment "Behringer UMC404HD" ++ ++SectionUseCase."HiFi" { ++ Comment "Default" ++ File "/USB-Audio/Behringer/UMC404HD-HiFi.conf" ++} ++ ++Define.DirectPlaybackChannels 4 ++Define.DirectCaptureChannels 4 ++ ++Include.dhw.File "/common/direct.conf" +diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf +index 81a1446..aa1f849 100644 +--- a/ucm2/USB-Audio/USB-Audio.conf ++++ b/ucm2/USB-Audio/USB-Audio.conf +@@ -236,6 +236,18 @@ If.behringer-umc204hd { + } + } + ++If.behringer-umc404hd { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "USB1397:0509" ++ } ++ True.Define { ++ ProfileName "Behringer/UMC404HD" ++ MixerRemap yes ++ } ++} ++ + If.behringer-Flow8-Streaming { + Condition { + Type String +-- +2.41.0 + + +From b422a8e08cb3845053ece1fc832294adca21a684 Mon Sep 17 00:00:00 2001 +From: Shuming Fan +Date: Thu, 12 Oct 2023 10:07:36 +0800 +Subject: [PATCH 17/23] ucm2: soundwire: add rt713 SDCA device + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/363 +Signed-off-by: Shuming Fan +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/rt713-dmic/init.conf | 6 ++++ + ucm2/codecs/rt713-sdca/init.conf | 8 ++++++ + ucm2/sof-soundwire/rt713-dmic.conf | 21 ++++++++++++++ + ucm2/sof-soundwire/rt713-sdca.conf | 40 +++++++++++++++++++++++++++ + ucm2/sof-soundwire/sof-soundwire.conf | 6 ++-- + 5 files changed, 78 insertions(+), 3 deletions(-) + create mode 100644 ucm2/codecs/rt713-dmic/init.conf + create mode 100644 ucm2/codecs/rt713-sdca/init.conf + create mode 100644 ucm2/sof-soundwire/rt713-dmic.conf + create mode 100644 ucm2/sof-soundwire/rt713-sdca.conf + +diff --git a/ucm2/codecs/rt713-dmic/init.conf b/ucm2/codecs/rt713-dmic/init.conf +new file mode 100644 +index 0000000..6547a36 +--- /dev/null ++++ b/ucm2/codecs/rt713-dmic/init.conf +@@ -0,0 +1,6 @@ ++# RT713-dmic specific volume control settings ++ ++BootSequence [ ++ cset "name='rt713-dmic ADC 25 Mux' 'DMIC1'" ++ cset "name='rt713-dmic FU1E Capture Switch' 1" ++] +diff --git a/ucm2/codecs/rt713-sdca/init.conf b/ucm2/codecs/rt713-sdca/init.conf +new file mode 100644 +index 0000000..df6a7aa +--- /dev/null ++++ b/ucm2/codecs/rt713-sdca/init.conf +@@ -0,0 +1,8 @@ ++# RT713-sdca specific volume control settings ++ ++BootSequence [ ++ cset "name='rt713 FU05 Playback Volume' 87" ++ cset "name='rt713 ADC 23 Mux' 'MIC2'" ++ cset "name='rt713 FU0F Capture Volume' 57" ++ cset "name='rt713 FU0F Capture Switch' 1" ++] +diff --git a/ucm2/sof-soundwire/rt713-dmic.conf b/ucm2/sof-soundwire/rt713-dmic.conf +new file mode 100644 +index 0000000..dc5fe0e +--- /dev/null ++++ b/ucm2/sof-soundwire/rt713-dmic.conf +@@ -0,0 +1,21 @@ ++# Use case Configuration for sof-soundwire card ++ ++SectionDevice."Mic" { ++ Comment "SoundWire microphones" ++ ++ EnableSequence [ ++ cset "name='rt713-dmic FU1E Capture Switch' 1" ++ ] ++ ++ DisableSequence [ ++ cset "name='rt713-dmic FU1E Capture Switch' 0" ++ ] ++ ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId},4" ++ CaptureSwitch "rt713-dmic FU1E Capture Switch" ++ CaptureVolume "rt713-dmic FU1E Capture Volume" ++ CaptureMixerElem "rt713-dmic FU1E" ++ } ++} +diff --git a/ucm2/sof-soundwire/rt713-sdca.conf b/ucm2/sof-soundwire/rt713-sdca.conf +new file mode 100644 +index 0000000..f1cee7c +--- /dev/null ++++ b/ucm2/sof-soundwire/rt713-sdca.conf +@@ -0,0 +1,40 @@ ++# Use case Configuration for sof-soundwire card ++ ++SectionDevice."Headphones" { ++ Comment "Headphones" ++ ++ EnableSequence [ ++ cset "name='Headphone Switch' on" ++ ] ++ ++ DisableSequence [ ++ cset "name='Headphone Switch' off" ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ JackControl "Headphone Jack" ++ } ++} ++ ++SectionDevice."Headset" { ++ Comment "Headset Microphone" ++ ++ EnableSequence [ ++ cset "name='rt713 FU0F Capture Switch' 1" ++ ] ++ ++ DisableSequence [ ++ cset "name='rt713 FU0F Capture Switch' 0" ++ ] ++ ++ Value { ++ CapturePriority 200 ++ CapturePCM "hw:${CardId},1" ++ JackControl "Headset Mic Jack" ++ CaptureSwitch "rt713 FU0F Capture Switch" ++ CaptureVolume "rt713 FU0F Capture Volume" ++ CaptureMixerElem "rt713 FU0F" ++ } ++} +diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf +index 3368d65..18b1bf8 100644 +--- a/ucm2/sof-soundwire/sof-soundwire.conf ++++ b/ucm2/sof-soundwire/sof-soundwire.conf +@@ -35,7 +35,7 @@ DefineRegex { + String "${CardComponents}" + } + MicCodec { +- Regex " mic:([a-z0-9]+(-sdca)?)" ++ Regex " mic:([a-z0-9]+(-dmic)?+(-sdca)?)" + String "${CardComponents}" + } + Mics { +@@ -47,7 +47,7 @@ DefineRegex { + If.hs_init { + Condition { + Type RegexMatch +- Regex "(rt5682|rt700|rt711(-sdca)?)" ++ Regex "(rt5682|rt700|rt711|rt713(-sdca)?)" + String "${var:HeadsetCodec1}" + } + True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf" +@@ -56,7 +56,7 @@ If.hs_init { + If.mic_init { + Condition { + Type RegexMatch +- Regex "(rt715(-sdca)?)" ++ Regex "(rt713-dmic|rt715(-sdca)?)" + String "${var:MicCodec1}" + } + True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf" +-- +2.41.0 + + +From 4e0e3423bc28bdd519f1f9f97b253d06206ba620 Mon Sep 17 00:00:00 2001 +From: WeirdTreeThing +Date: Wed, 18 Oct 2023 18:56:27 -0400 +Subject: [PATCH 18/23] ucm2: add acpd7219m98357 + +For "grunt" chromebooks + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/361 +Signed-off-by: WeirdTreeThing +Signed-off-by: Jaroslav Kysela +--- + ucm2/AMD/acpd7219m98357/HiFi.conf | 77 +++++++++++++++++++ + ucm2/AMD/acpd7219m98357/acpd7219m98357.conf | 6 ++ + .../conf.d/acpd7219m98357/acpd7219m98357.conf | 1 + + 3 files changed, 84 insertions(+) + create mode 100644 ucm2/AMD/acpd7219m98357/HiFi.conf + create mode 100644 ucm2/AMD/acpd7219m98357/acpd7219m98357.conf + create mode 120000 ucm2/conf.d/acpd7219m98357/acpd7219m98357.conf + +diff --git a/ucm2/AMD/acpd7219m98357/HiFi.conf b/ucm2/AMD/acpd7219m98357/HiFi.conf +new file mode 100644 +index 0000000..ff64063 +--- /dev/null ++++ b/ucm2/AMD/acpd7219m98357/HiFi.conf +@@ -0,0 +1,77 @@ ++SectionVerb { ++ EnableSequence [ ++ cset "name='Playback Digital Volume' 111" ++ cset "name='Playback Digital Switch' on" ++ cset "name='Out DACL Mux' DAIL" ++ cset "name='Out DACR Mux' DAIR" ++ cset "name='Mixer Out FilterL DACL Switch' on" ++ cset "name='Mixer Out FilterR DACR Switch' on" ++ cset "name='ST Mixer Out FilterL Out FilterL Switch' on" ++ cset "name='ST Mixer Out FilterR Out FilterR Switch' on" ++ cset "name='Headphone Switch' off" ++ cset "name='Headset Mic Switch' off" ++ cset "name='Mic Volume' 5" ++ cset "name='Capture Digital Volume' 111" ++ cset "name='Capture Digital Switch' on" ++ cset "name='Mixin Volume' 10" ++ cset "name='Mixin Switch' on" ++ cset "name='Mixer In Mic Switch' on" ++ cset "name='Out DAIL Mux' ADC" ++ cset "name='Out DAIR Mux' ADC" ++ cset "name='Gain Ramp Rate' 1" ++ ] ++} ++ ++SectionDevice."Speaker" { ++ Comment "Speaker" ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId},2" ++ } ++} ++ ++SectionDevice."Headphones" { ++ Comment "Headphones" ++ ++ Value { ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId},0" ++ PlaybackMixerElem "Headphone" ++ JackControl "Headphone Jack" ++ } ++ EnableSequence [ ++ cset "name='Headphone Switch' on" ++ ] ++ DisableSequence [ ++ cset "name='Headphone Switch' off" ++ ] ++} ++ ++SectionDevice."Mic" { ++ Comment "Internal Microphone" ++ ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId},4" ++ } ++} ++ ++SectionDevice."Headset" { ++ Comment "Headset Microphone" ++ ++ Value { ++ CapturePriority 200 ++ CapturePCM "hw:${CardId},1" ++ CaptureMixerElem "Headset Mic" ++ JackControl "Headset Mic Jack" ++ } ++ EnableSequence [ ++ cset "name='Headset Mic Switch' on" ++ cset "name='Mic Switch' on" ++ ] ++ DisableSequence [ ++ cset "name='Headset Mic Switch' off" ++ cset "name='Mic Switch' off" ++ ] ++} +diff --git a/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf b/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf +new file mode 100644 +index 0000000..2cb6c95 +--- /dev/null ++++ b/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf +@@ -0,0 +1,6 @@ ++Syntax 6 ++ ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "Default" ++} +diff --git a/ucm2/conf.d/acpd7219m98357/acpd7219m98357.conf b/ucm2/conf.d/acpd7219m98357/acpd7219m98357.conf +new file mode 120000 +index 0000000..34238f0 +--- /dev/null ++++ b/ucm2/conf.d/acpd7219m98357/acpd7219m98357.conf +@@ -0,0 +1 @@ ++../../AMD/acpd7219m98357/acpd7219m98357.conf +\ No newline at end of file +-- +2.41.0 + + +From 70e39a3d45248eafd553d7cecacde02b5da67f96 Mon Sep 17 00:00:00 2001 +From: WeirdTreeThing +Date: Mon, 30 Oct 2023 08:39:06 -0400 +Subject: [PATCH 19/23] ucm2: acpd7219m98357: Use common da7219 BootSequence + +Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/361 +Signed-off-by: WeirdTreeThing +Signed-off-by: Jaroslav Kysela +--- + ucm2/AMD/acpd7219m98357/HiFi.conf | 24 --------------------- + ucm2/AMD/acpd7219m98357/acpd7219m98357.conf | 2 ++ + 2 files changed, 2 insertions(+), 24 deletions(-) + +diff --git a/ucm2/AMD/acpd7219m98357/HiFi.conf b/ucm2/AMD/acpd7219m98357/HiFi.conf +index ff64063..8b2985d 100644 +--- a/ucm2/AMD/acpd7219m98357/HiFi.conf ++++ b/ucm2/AMD/acpd7219m98357/HiFi.conf +@@ -1,27 +1,3 @@ +-SectionVerb { +- EnableSequence [ +- cset "name='Playback Digital Volume' 111" +- cset "name='Playback Digital Switch' on" +- cset "name='Out DACL Mux' DAIL" +- cset "name='Out DACR Mux' DAIR" +- cset "name='Mixer Out FilterL DACL Switch' on" +- cset "name='Mixer Out FilterR DACR Switch' on" +- cset "name='ST Mixer Out FilterL Out FilterL Switch' on" +- cset "name='ST Mixer Out FilterR Out FilterR Switch' on" +- cset "name='Headphone Switch' off" +- cset "name='Headset Mic Switch' off" +- cset "name='Mic Volume' 5" +- cset "name='Capture Digital Volume' 111" +- cset "name='Capture Digital Switch' on" +- cset "name='Mixin Volume' 10" +- cset "name='Mixin Switch' on" +- cset "name='Mixer In Mic Switch' on" +- cset "name='Out DAIL Mux' ADC" +- cset "name='Out DAIR Mux' ADC" +- cset "name='Gain Ramp Rate' 1" +- ] +-} +- + SectionDevice."Speaker" { + Comment "Speaker" + +diff --git a/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf b/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf +index 2cb6c95..14126dd 100644 +--- a/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf ++++ b/ucm2/AMD/acpd7219m98357/acpd7219m98357.conf +@@ -4,3 +4,5 @@ SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Default" + } ++ ++Include.codec-init.File "/codecs/da7219/init.conf" +-- +2.41.0 + + +From 24b9ea47b7bfafd963abc224968f91f8afdc7a85 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sun, 29 Oct 2023 15:50:07 +0100 +Subject: [PATCH 20/23] codecs/es8316: Fix mono speaker settings from previous + boot getting applied + +When codecs/es8316/MonoSpeaker.conf's EnableSeq was run last before +shutdown the 'Playback Polarity' and 'DAC Mono Mix Switch' controls for +Mono Speaker output get saved and restored on the next boot. + +These settings are undone by the MonoSpeaker DisableSeq, but that never +runs when an updated kernel switches from the default "cfg-spk:1" in +components to "cfg-spk:2" for devices which do actually have 2 speakers, +which causes the ucm profile to use codecs/es8316/Speaker.conf instead. + +Set the 'Playback Polarity' and 'DAC Mono Mix Switch' controls to their +defaults in codecs/es8316/EnableSeq.conf to avoid them getting stuck +in Mono mix mode in this scenario. + +Link: https://lore.kernel.org/alsa-devel/20231029145007.24106-1-hdegoede@redhat.com/ +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/codecs/es8316/EnableSeq.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ucm2/codecs/es8316/EnableSeq.conf b/ucm2/codecs/es8316/EnableSeq.conf +index b6c81d8..b75c4a7 100644 +--- a/ucm2/codecs/es8316/EnableSeq.conf ++++ b/ucm2/codecs/es8316/EnableSeq.conf +@@ -22,4 +22,8 @@ EnableSequence [ + # Setup muxes / switches + cset "name='Left Headphone Mixer Left DAC Switch' on" + cset "name='Right Headphone Mixer Right DAC Switch' on" ++ ++ # Undo MonoSpeaker settings which may have been saved on shutdown ++ cset "name='Playback Polarity' 0" ++ cset "name='DAC Mono Mix Switch' off" + ] +-- +2.41.0 + + +From 5e2f5c6515463be582c185a12891aa00629a55b0 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 21 Oct 2023 16:31:09 +0200 +Subject: [PATCH 21/23] chtnau8824: Mono speaker fixes + +2 mono speaker setup fixes: + +1. Use the kernel's components string to check for a mono-speaker device +when the board has a components string. + +2. So far known nau8824 boards with a mono speaker where using the right +speaker channel, which is unusual. Normally mono speaker setups use +only the left speaker channel. The Cyberbook T116 tablet is a nau8824 +based model, which indeed uses the left speaker channel for its single +speaker. + +Modify ucm2/codecs/nau8824/MonoSpeaker.conf to send a left+right +channel mix to both speaker channels, so that things will work +independent of which speaker channel is used for a mono setup. + +Link: https://lore.kernel.org/alsa-devel/20231021143109.52210-1-hdegoede@redhat.com/ +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/Intel/chtnau8824/HiFi.conf | 15 +++++++++++++++ + ucm2/codecs/nau8824/MonoSpeaker.conf | 7 ++++--- + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/ucm2/Intel/chtnau8824/HiFi.conf b/ucm2/Intel/chtnau8824/HiFi.conf +index c3d830d..1a1faf4 100644 +--- a/ucm2/Intel/chtnau8824/HiFi.conf ++++ b/ucm2/Intel/chtnau8824/HiFi.conf +@@ -14,6 +14,21 @@ If.Controls { + } + } + ++# Figure out which components are in use on the device, we check both the ++# components string (present on newer kernels) as well as checking for DMI ++# strings for compatibility with older kernels. Note DMI matches for new ++# models should only be added to the kernel, this UCM profile will then ++# automatically pick up the info from the components string. ++ ++If.components-mono-spk { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "cfg-spk:1" ++ } ++ True.Define.Speaker "MonoSpeaker" ++} ++ + If.cfg-mspk { + Condition { + Type RegexMatch +diff --git a/ucm2/codecs/nau8824/MonoSpeaker.conf b/ucm2/codecs/nau8824/MonoSpeaker.conf +index 6b4ef8a..5428133 100644 +--- a/ucm2/codecs/nau8824/MonoSpeaker.conf ++++ b/ucm2/codecs/nau8824/MonoSpeaker.conf +@@ -11,9 +11,10 @@ SectionDevice."Speaker" { + ] + + EnableSequence [ +- # nau8824 mono speaker boards have the speaker on the right chan +- cset "name='Speaker Left DACL Volume' 0" +- cset "name='Speaker Left DACR Volume' 0" ++ # Some nau8824 mono speaker boards have the speaker on the right chan ++ # others on the left, enable output of both channels on both speakers ++ cset "name='Speaker Left DACL Volume' 1" ++ cset "name='Speaker Left DACR Volume' 1" + cset "name='Speaker Right DACL Volume' 1" + cset "name='Speaker Right DACR Volume' 1" + cset "name='Ext Spk Switch' on" +-- +2.41.0 + + +From acc506dbee7602628e0df4eb3c8c14d0d05f69b5 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 21 Oct 2023 23:16:13 +0200 +Subject: [PATCH 22/23] bytcr-wm5102: Add support for speakers connected to + HPOUT2 + +On the Lenovo Yoga Tab 3 YT3-X90 the speaker amplifiers are connected +to the HPOUT2 output pins instead of the the SPK output pins. + +Check for "cfg-spk:hpout2" in the components string which indicates +this setup and add a ucm2/codecs/wm5102/HPOut2-Speaker.conf file +for this setup. + +Link: https://lore.kernel.org/alsa-devel/20231021211614.115152-1-hdegoede@redhat.com/ +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/Intel/bytcr-wm5102/HiFi.conf | 11 ++++++++++- + ucm2/codecs/wm5102/EnableSeq.conf | 2 ++ + ucm2/codecs/wm5102/HPOut2-Speaker.conf | 22 ++++++++++++++++++++++ + 3 files changed, 34 insertions(+), 1 deletion(-) + create mode 100644 ucm2/codecs/wm5102/HPOut2-Speaker.conf + +diff --git a/ucm2/Intel/bytcr-wm5102/HiFi.conf b/ucm2/Intel/bytcr-wm5102/HiFi.conf +index 1269868..2afc757 100644 +--- a/ucm2/Intel/bytcr-wm5102/HiFi.conf ++++ b/ucm2/Intel/bytcr-wm5102/HiFi.conf +@@ -21,7 +21,16 @@ SectionVerb { + } + } + +-Include.spk.File "/codecs/wm5102/Speaker.conf" ++If.spk { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "cfg-spk:hpout2" ++ } ++ True.Include.hpout2.File "/codecs/wm5102/HPOut2-Speaker.conf" ++ False.Include.spk.File "/codecs/wm5102/Speaker.conf" ++} ++ + Include.hp.File "/codecs/wm5102/HeadPhones.conf" + Include.mic.File "/codecs/wm5102/IN3-InternalMic.conf" + Include.headset.File "/codecs/wm5102/IN1-HeadsetMic.conf" +diff --git a/ucm2/codecs/wm5102/EnableSeq.conf b/ucm2/codecs/wm5102/EnableSeq.conf +index 6a857a2..87cb3bb 100644 +--- a/ucm2/codecs/wm5102/EnableSeq.conf ++++ b/ucm2/codecs/wm5102/EnableSeq.conf +@@ -4,6 +4,8 @@ EnableSequence [ + cset "name='SPKOUTR Input 1' AIF1RX2" + cset "name='HPOUT1L Input 1' AIF1RX1" + cset "name='HPOUT1R Input 1' AIF1RX2" ++ cset "name='HPOUT2L Input 1' AIF1RX1" ++ cset "name='HPOUT2R Input 1' AIF1RX2" + + # Both mics are quite soft by default, boost then + cset "name='IN1L Volume' 28" +diff --git a/ucm2/codecs/wm5102/HPOut2-Speaker.conf b/ucm2/codecs/wm5102/HPOut2-Speaker.conf +new file mode 100644 +index 0000000..375f9ba +--- /dev/null ++++ b/ucm2/codecs/wm5102/HPOut2-Speaker.conf +@@ -0,0 +1,22 @@ ++SectionDevice."Speaker" { ++ Comment "Speakers" ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId}" ++ } ++ ++ ConflictingDevice [ ++ "Headphones" ++ ] ++ ++ EnableSequence [ ++ cset "name='HPOUT2 Digital Switch' on" ++ cset "name='Speaker Switch' on" ++ ] ++ ++ DisableSequence [ ++ cset "name='HPOUT2 Digital Switch' off" ++ cset "name='Speaker Switch' off" ++ ] ++} +-- +2.41.0 + + +From 23adf5a368abe9009f44547b91d60a244f735d81 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 21 Oct 2023 23:16:14 +0200 +Subject: [PATCH 23/23] bytcr-wm5102: Add support for different microphone + routes + +Unlike all designs supported sofar the Lenovo Yoga Tab 3 YT3-X90 does not +have its internal microphone (intmic) on IN3L with the headset microphone +on IN1L. Instead this tablet has the intmic on IN1L and the hsmic on IN2L. + +Add IN1-InternalMic.conf and IN2-HeadsetMic.conf config snippets +under ucm2/codecs/wm5102/ for this and check the components string +to determine which microphone routes should be used. + +Link: https://lore.kernel.org/alsa-devel/20231021211614.115152-2-hdegoede@redhat.com/ +Signed-off-by: Hans de Goede +Signed-off-by: Jaroslav Kysela +--- + ucm2/Intel/bytcr-wm5102/HiFi.conf | 22 ++++++++++++++++++++-- + ucm2/codecs/wm5102/EnableSeq.conf | 3 ++- + ucm2/codecs/wm5102/IN1-InternalMic.conf | 23 +++++++++++++++++++++++ + ucm2/codecs/wm5102/IN2-HeadsetMic.conf | 24 ++++++++++++++++++++++++ + 4 files changed, 69 insertions(+), 3 deletions(-) + create mode 100644 ucm2/codecs/wm5102/IN1-InternalMic.conf + create mode 100644 ucm2/codecs/wm5102/IN2-HeadsetMic.conf + +diff --git a/ucm2/Intel/bytcr-wm5102/HiFi.conf b/ucm2/Intel/bytcr-wm5102/HiFi.conf +index 2afc757..46ef7d1 100644 +--- a/ucm2/Intel/bytcr-wm5102/HiFi.conf ++++ b/ucm2/Intel/bytcr-wm5102/HiFi.conf +@@ -32,5 +32,23 @@ If.spk { + } + + Include.hp.File "/codecs/wm5102/HeadPhones.conf" +-Include.mic.File "/codecs/wm5102/IN3-InternalMic.conf" +-Include.headset.File "/codecs/wm5102/IN1-HeadsetMic.conf" ++ ++If.intmic { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "cfg-intmic:in1l" ++ } ++ True.Include.intmic1.File "/codecs/wm5102/IN1-InternalMic.conf" ++ False.Include.intmic3.File "/codecs/wm5102/IN3-InternalMic.conf" ++} ++ ++If.hsmic { ++ Condition { ++ Type String ++ Haystack "${CardComponents}" ++ Needle "cfg-hsmic:in2l" ++ } ++ True.Include.hsmic2.File "/codecs/wm5102/IN2-HeadsetMic.conf" ++ False.Include.hsmic1.File "/codecs/wm5102/IN1-HeadsetMic.conf" ++} +diff --git a/ucm2/codecs/wm5102/EnableSeq.conf b/ucm2/codecs/wm5102/EnableSeq.conf +index 87cb3bb..11166c0 100644 +--- a/ucm2/codecs/wm5102/EnableSeq.conf ++++ b/ucm2/codecs/wm5102/EnableSeq.conf +@@ -7,8 +7,9 @@ EnableSequence [ + cset "name='HPOUT2L Input 1' AIF1RX1" + cset "name='HPOUT2R Input 1' AIF1RX2" + +- # Both mics are quite soft by default, boost then ++ # mics are quite soft by default, boost then + cset "name='IN1L Volume' 28" ++ cset "name='IN2L Volume' 28" + cset "name='IN3L Volume' 28" + + cset "name='Headphone Switch' off" +diff --git a/ucm2/codecs/wm5102/IN1-InternalMic.conf b/ucm2/codecs/wm5102/IN1-InternalMic.conf +new file mode 100644 +index 0000000..d9a70ce +--- /dev/null ++++ b/ucm2/codecs/wm5102/IN1-InternalMic.conf +@@ -0,0 +1,23 @@ ++SectionDevice."Mic" { ++ Comment "Internal Microphone" ++ ++ ConflictingDevice [ ++ "Headset" ++ ] ++ ++ EnableSequence [ ++ cset "name='AIF1TX1 Input 1' IN1L" ++ cset "name='AIF1TX2 Input 1' IN1L" ++ ++ cset "name='Internal Mic Switch' on" ++ ] ++ ++ DisableSequence [ ++ cset "name='Internal Mic Switch' off" ++ ] ++ ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId}" ++ } ++} +diff --git a/ucm2/codecs/wm5102/IN2-HeadsetMic.conf b/ucm2/codecs/wm5102/IN2-HeadsetMic.conf +new file mode 100644 +index 0000000..8fbbcb1 +--- /dev/null ++++ b/ucm2/codecs/wm5102/IN2-HeadsetMic.conf +@@ -0,0 +1,24 @@ ++SectionDevice."Headset" { ++ Comment "Headset Microphone" ++ ++ ConflictingDevice [ ++ "Mic" ++ ] ++ ++ EnableSequence [ ++ cset "name='AIF1TX1 Input 1' IN2L" ++ cset "name='AIF1TX2 Input 1' IN2L" ++ ++ cset "name='Headset Mic Switch' on" ++ ] ++ ++ DisableSequence [ ++ cset "name='Headset Mic Switch' off" ++ ] ++ ++ Value { ++ CapturePriority 200 ++ CapturePCM "hw:${CardId}" ++ JackControl "Headset Mic Jack" ++ } ++} +-- +2.41.0 + diff --git a/SOURCES/alsa-ucm-git.patch b/SOURCES/alsa-ucm-git.patch deleted file mode 100644 index e69de29..0000000 diff --git a/SPECS/alsa-lib.spec b/SPECS/alsa-lib.spec index 8498e78..36c0863 100644 --- a/SPECS/alsa-lib.spec +++ b/SPECS/alsa-lib.spec @@ -2,8 +2,8 @@ #define prever_dot .rc3 #define postver a -%define version_alsa_lib 1.2.9 -%define version_alsa_ucm 1.2.9 +%define version_alsa_lib 1.2.10 +%define version_alsa_ucm 1.2.10 %define version_alsa_tplg 1.2.5 %if 0%{?rhel} @@ -13,23 +13,23 @@ Summary: The Advanced Linux Sound Architecture (ALSA) library Name: alsa-lib Version: %{version_alsa_lib} -Release: 1%{?prever_dot}%{?dist} +Release: 2%{?prever_dot}%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.alsa-project.org/ -Source: ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2 -Source1: ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{version_alsa_ucm}.tar.bz2 +Source: https://www.alsa-project.org/files/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2 +Source1: https://www.alsa-project.org/files/pub/lib/alsa-ucm-conf-%{version_alsa_ucm}.tar.bz2 %if 0%{!?_without_topology:1} -Source2: ftp://ftp.alsa-project.org/pub/lib/alsa-topology-conf-%{version_alsa_tplg}.tar.bz2 +Source2: https://www.alsa-project.org/files/pub/lib/alsa-topology-conf-%{version_alsa_tplg}.tar.bz2 %endif Source10: asound.conf Source11: modprobe-dist-alsa.conf Source12: modprobe-dist-oss.conf -Source20: alsa-ucm-git.patch +Source20: alsa-ucm-conf.patch Patch0: alsa-git.patch Patch1: alsa-lib-1.2.3-config.patch -Patch2: alsa-lib-1.0.14-glibc-open.patch +Patch2: alsa-lib-1.2.10-glibc-open.patch BuildRequires: doxygen BuildRequires: autoconf automake libtool @@ -84,9 +84,9 @@ contains alsa-lib configuration of SoC topology %prep %setup -q -n %{name}-%{version}%{?prever}%{?postver} -%patch0 -p1 -b .alsa-git -%patch1 -p1 -b .config -%patch2 -p1 -b .glibc-open +%patch -P 0 -p1 -b .alsa-git +%patch -P 1 -p1 -b .config +%patch -P 2 -p1 -b .glibc-open %build autoreconf -vif @@ -130,7 +130,7 @@ mkdir -p %{buildroot}/%{_datadir}/alsa/topology tar xvjf %{SOURCE2} -C %{buildroot}/%{_datadir}/alsa --strip-components=1 "*/topology" %endif -# Remove libtool archives. +# Remove libtool archives find %{buildroot} -name '*.la' -delete # Remove /usr/include/asoundlib.h @@ -177,6 +177,9 @@ rm %{buildroot}/%{_includedir}/asoundlib.h %endif %changelog +* Thu Nov 30 2023 Jaroslav Kysela - 1.2.10-2 +- update to alsa-lib 1.2.10 and alsa-ucm-conf 1.2.10 + * Mon May 15 2023 Jaroslav Kysela - 1.2.9-1 - update to alsa-lib 1.2.9 and alsa-ucm-conf 1.2.9