update to 1.2.3
This commit is contained in:
parent
35f5727aa8
commit
6dbf2613ac
789
alsa-git.patch
789
alsa-git.patch
@ -1,789 +0,0 @@
|
||||
From 27c7927842a691ef13724cd16fb26264680c6aa2 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Sat, 29 Feb 2020 10:30:37 +0100
|
||||
Subject: [PATCH 01/14] conf: change the order of PCM devices in alsa.conf
|
||||
|
||||
Appearently, some applications use the first device for probe or so.
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/27
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf/alsa.conf | 46 +++++++++++++++++++++++-----------------------
|
||||
1 file changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
|
||||
index 09980586..a091b810 100644
|
||||
--- a/src/conf/alsa.conf
|
||||
+++ b/src/conf/alsa.conf
|
||||
@@ -119,29 +119,6 @@ defaults.timer.subdevice 0
|
||||
# PCM interface
|
||||
#
|
||||
|
||||
-# redirect to load-on-demand extended pcm definitions
|
||||
-pcm.cards cards.pcm
|
||||
-
|
||||
-pcm.default cards.pcm.default
|
||||
-pcm.sysdefault cards.pcm.default
|
||||
-pcm.front cards.pcm.front
|
||||
-pcm.rear cards.pcm.rear
|
||||
-pcm.center_lfe cards.pcm.center_lfe
|
||||
-pcm.side cards.pcm.side
|
||||
-pcm.surround21 cards.pcm.surround21
|
||||
-pcm.surround40 cards.pcm.surround40
|
||||
-pcm.surround41 cards.pcm.surround41
|
||||
-pcm.surround50 cards.pcm.surround50
|
||||
-pcm.surround51 cards.pcm.surround51
|
||||
-pcm.surround71 cards.pcm.surround71
|
||||
-pcm.iec958 cards.pcm.iec958
|
||||
-pcm.spdif iec958
|
||||
-pcm.hdmi cards.pcm.hdmi
|
||||
-pcm.dmix cards.pcm.dmix
|
||||
-pcm.dsnoop cards.pcm.dsnoop
|
||||
-pcm.modem cards.pcm.modem
|
||||
-pcm.phoneline cards.pcm.phoneline
|
||||
-
|
||||
pcm.hw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
@@ -323,6 +300,29 @@ pcm.null {
|
||||
}
|
||||
}
|
||||
|
||||
+# redirect to load-on-demand extended pcm definitions
|
||||
+pcm.cards cards.pcm
|
||||
+
|
||||
+pcm.default cards.pcm.default
|
||||
+pcm.sysdefault cards.pcm.default
|
||||
+pcm.front cards.pcm.front
|
||||
+pcm.rear cards.pcm.rear
|
||||
+pcm.center_lfe cards.pcm.center_lfe
|
||||
+pcm.side cards.pcm.side
|
||||
+pcm.surround21 cards.pcm.surround21
|
||||
+pcm.surround40 cards.pcm.surround40
|
||||
+pcm.surround41 cards.pcm.surround41
|
||||
+pcm.surround50 cards.pcm.surround50
|
||||
+pcm.surround51 cards.pcm.surround51
|
||||
+pcm.surround71 cards.pcm.surround71
|
||||
+pcm.iec958 cards.pcm.iec958
|
||||
+pcm.spdif iec958
|
||||
+pcm.hdmi cards.pcm.hdmi
|
||||
+pcm.dmix cards.pcm.dmix
|
||||
+pcm.dsnoop cards.pcm.dsnoop
|
||||
+pcm.modem cards.pcm.modem
|
||||
+pcm.phoneline cards.pcm.phoneline
|
||||
+
|
||||
#
|
||||
# Control interface
|
||||
#
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 09e78da4cade7b8fecb8f36717b85c456f2e5487 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Sun, 1 Mar 2020 19:57:06 +0100
|
||||
Subject: [PATCH 02/14] conf: namehint - add omit_noargs to the hint section
|
||||
|
||||
Do not list simple surround devices in the namehint function by default.
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/27
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf/pcm/surround21.conf | 1 +
|
||||
src/conf/pcm/surround40.conf | 1 +
|
||||
src/conf/pcm/surround41.conf | 1 +
|
||||
src/conf/pcm/surround50.conf | 1 +
|
||||
src/conf/pcm/surround51.conf | 1 +
|
||||
src/conf/pcm/surround71.conf | 1 +
|
||||
src/control/namehint.c | 6 +++++-
|
||||
7 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf
|
||||
index 1cf1b7af..ad19507b 100644
|
||||
--- a/src/conf/pcm/surround21.conf
|
||||
+++ b/src/conf/pcm/surround21.conf
|
||||
@@ -57,5 +57,6 @@ pcm.!surround21 {
|
||||
hint {
|
||||
description "2.1 Surround output to Front and Subwoofer speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/surround40.conf b/src/conf/pcm/surround40.conf
|
||||
index 9788ad48..7c615022 100644
|
||||
--- a/src/conf/pcm/surround40.conf
|
||||
+++ b/src/conf/pcm/surround40.conf
|
||||
@@ -55,5 +55,6 @@ pcm.!surround40 {
|
||||
hint {
|
||||
description "4.0 Surround output to Front and Rear speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/surround41.conf b/src/conf/pcm/surround41.conf
|
||||
index 7b4ef3be..cb6c0445 100644
|
||||
--- a/src/conf/pcm/surround41.conf
|
||||
+++ b/src/conf/pcm/surround41.conf
|
||||
@@ -61,5 +61,6 @@ pcm.!surround41 {
|
||||
hint {
|
||||
description "4.1 Surround output to Front, Rear and Subwoofer speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/surround50.conf b/src/conf/pcm/surround50.conf
|
||||
index 7d9a9e79..70d54069 100644
|
||||
--- a/src/conf/pcm/surround50.conf
|
||||
+++ b/src/conf/pcm/surround50.conf
|
||||
@@ -61,5 +61,6 @@ pcm.!surround50 {
|
||||
hint {
|
||||
description "5.0 Surround output to Front, Center and Rear speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/surround51.conf b/src/conf/pcm/surround51.conf
|
||||
index e67f007e..d0236e42 100644
|
||||
--- a/src/conf/pcm/surround51.conf
|
||||
+++ b/src/conf/pcm/surround51.conf
|
||||
@@ -57,5 +57,6 @@ pcm.!surround51 {
|
||||
hint {
|
||||
description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/surround71.conf b/src/conf/pcm/surround71.conf
|
||||
index a26c3f36..66792dde 100644
|
||||
--- a/src/conf/pcm/surround71.conf
|
||||
+++ b/src/conf/pcm/surround71.conf
|
||||
@@ -59,5 +59,6 @@ pcm.!surround71 {
|
||||
hint {
|
||||
description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"
|
||||
device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
||||
index 60c48ae3..169bd421 100644
|
||||
--- a/src/control/namehint.c
|
||||
+++ b/src/control/namehint.c
|
||||
@@ -287,10 +287,14 @@ static int try_config(snd_config_t *config,
|
||||
err = -EINVAL;
|
||||
goto __cleanup;
|
||||
}
|
||||
+ if (list->card < 0 &&
|
||||
+ snd_config_search(cfg, "omit_noargs", &n) >= 0 &&
|
||||
+ snd_config_get_bool(n) > 0)
|
||||
+ goto __skip_add;
|
||||
if (level == 1 &&
|
||||
snd_config_search(cfg, "show", &n) >= 0 &&
|
||||
snd_config_get_bool(n) <= 0)
|
||||
- goto __skip_add;
|
||||
+ goto __skip_add;
|
||||
if (buf1 == NULL &&
|
||||
snd_config_search(cfg, "description", &n) >= 0 &&
|
||||
snd_config_get_string(n, &str) >= 0) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From c7efaef195b92e30efb3049a1c03fa1b50310477 Mon Sep 17 00:00:00 2001
|
||||
From: be-marc <marcbecker@posteo.de>
|
||||
Date: Tue, 3 Mar 2020 11:01:09 +0100
|
||||
Subject: [PATCH 03/14] Change PCM device number of Asus Xonar U5
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf/cards/USB-Audio.conf | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||
index 1c677937..dd99c44d 100644
|
||||
--- a/src/conf/cards/USB-Audio.conf
|
||||
+++ b/src/conf/cards/USB-Audio.conf
|
||||
@@ -39,7 +39,8 @@ USB-Audio.pcm.iec958_device {
|
||||
# "NoiseBlaster 3000" 42
|
||||
"USB Sound Blaster HD" 1
|
||||
"Xonar U7" 1
|
||||
-
|
||||
+ "ASUS XONAR U5" 1
|
||||
+
|
||||
# The below don't have digital in/out, so prevent them from being opened.
|
||||
"Andrea PureAudio USB-SA Headset" 999
|
||||
"Blue Snowball" 999
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 1654f38a29e635ce69a30c6c95ec1ca773ecee37 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Wed, 4 Mar 2020 11:27:12 +0100
|
||||
Subject: [PATCH 04/14] configure: add --embed for python3-config (python 3.8)
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/33
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
configure.ac | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0f9fb016..4b5ab662 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -423,7 +423,10 @@ if test "$build_python" = "yes" -a "$build_mixer_pymodules" = "yes"; then
|
||||
pythonlibs0=
|
||||
pythoninc0=
|
||||
if test "$build_python2" != "yes"; then
|
||||
- pythonlibs0=$(python3-config --libs)
|
||||
+ pythonlibs0=$(python3-config --libs --embed 2> /dev/null)
|
||||
+ if test -z "$pythonlibs0"; then
|
||||
+ pythonlibs0=$(python3-config --libs)
|
||||
+ fi
|
||||
pythoninc0=$(python3-config --includes)
|
||||
fi
|
||||
if test -z "$pythonlibs0"; then
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 9ed3c65e1569a0ebbec9af1d04d739db9921e775 Mon Sep 17 00:00:00 2001
|
||||
From: Tanu Kaskinen <tanuk@iki.fi>
|
||||
Date: Fri, 13 Mar 2020 09:39:17 +0200
|
||||
Subject: [PATCH 05/14] conf: USB-Audio: Add C-Media USB Headphone Set to the
|
||||
IEC958 blacklist
|
||||
|
||||
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/317
|
||||
|
||||
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf/cards/USB-Audio.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||
index dd99c44d..89811086 100644
|
||||
--- a/src/conf/cards/USB-Audio.conf
|
||||
+++ b/src/conf/cards/USB-Audio.conf
|
||||
@@ -44,6 +44,7 @@ USB-Audio.pcm.iec958_device {
|
||||
# The below don't have digital in/out, so prevent them from being opened.
|
||||
"Andrea PureAudio USB-SA Headset" 999
|
||||
"Blue Snowball" 999
|
||||
+ "C-Media USB Headphone Set" 999
|
||||
"HP Digital Stereo Headset" 999
|
||||
"GN 9330" 999
|
||||
"Logitech Speaker Lapdesk N700" 999
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From caf77a93cef5bda729bc33e0100cc0e769767389 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Fri, 13 Mar 2020 17:05:14 +0100
|
||||
Subject: [PATCH 06/14] topology: add back asrc to widget_map in dapm.c
|
||||
|
||||
Fixes: aa1bac2d04bd ("topology: add snd_tplg_save()")
|
||||
BugLink: https://github.com/thesofproject/sof/issues/2543
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/topology/dapm.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/topology/dapm.c b/src/topology/dapm.c
|
||||
index cb85e667..70645126 100644
|
||||
--- a/src/topology/dapm.c
|
||||
+++ b/src/topology/dapm.c
|
||||
@@ -43,6 +43,7 @@ static const struct map_elem widget_map[] = {
|
||||
{"effect", SND_SOC_TPLG_DAPM_EFFECT},
|
||||
{"siggen", SND_SOC_TPLG_DAPM_SIGGEN},
|
||||
{"src", SND_SOC_TPLG_DAPM_SRC},
|
||||
+ {"asrc", SND_SOC_TPLG_DAPM_ASRC},
|
||||
{"encoder", SND_SOC_TPLG_DAPM_ENCODER},
|
||||
{"decoder", SND_SOC_TPLG_DAPM_DECODER},
|
||||
};
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 79102bf264f8651692fe9435a4d1bb06aa022d55 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 17 Mar 2020 10:21:10 +0100
|
||||
Subject: [PATCH 07/14] ucm: clarify the index syntax for the device names
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
include/use-case.h | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index 134303af..27cb3fe1 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -117,7 +117,10 @@ extern "C" {
|
||||
*
|
||||
* If multiple devices with the same name exists, the number suffixes should
|
||||
* be added to these names like HDMI1,HDMI2,HDMI3 etc. No number gaps are
|
||||
- * allowed. The names with numbers must be continuous.
|
||||
+ * allowed. The names with numbers must be continuous. It is allowed to put
|
||||
+ * a whitespace between name and index (like 'Line 1') for the better
|
||||
+ * readability. The device names 'Line 1' and 'Line1' are equal for
|
||||
+ * thus purpose.
|
||||
*
|
||||
* If EnableSequence/DisableSequence controls independent paths in the hardware
|
||||
* it is also recommended to split playback and capture UCM devices and use
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 6137d263f3805c72781ea74b813b0e3754f5fc34 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 17 Mar 2020 16:20:52 +0100
|
||||
Subject: [PATCH 08/14] ucm: fix uc_mgr_scan_master_configs()
|
||||
|
||||
Skip the lookup, if the top level filename does not exist.
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/16
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/ucm/parser.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
|
||||
index 8d6eea31..0001e595 100644
|
||||
--- a/src/ucm/parser.c
|
||||
+++ b/src/ucm/parser.c
|
||||
@@ -1969,6 +1969,9 @@ int uc_mgr_scan_master_configs(const char **_list[])
|
||||
|
||||
configuration_filename2(filename, sizeof(filename), 2,
|
||||
d_name, d_name, ".conf");
|
||||
+ if (eaccess(filename, R_OK))
|
||||
+ continue;
|
||||
+
|
||||
err = uc_mgr_config_load(2, filename, &cfg);
|
||||
if (err < 0)
|
||||
goto __err;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From d434638a683c01bd6decf8f41863044055237a50 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Fri, 27 Mar 2020 11:59:53 +0100
|
||||
Subject: [PATCH 09/14] namehint: remember the direction from the upper levels
|
||||
|
||||
The current code resets the direction info for each level.
|
||||
Simply remove this code.
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/39
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/control/namehint.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/src/control/namehint.c b/src/control/namehint.c
|
||||
index 169bd421..ecd470f3 100644
|
||||
--- a/src/control/namehint.c
|
||||
+++ b/src/control/namehint.c
|
||||
@@ -270,8 +270,6 @@ static int try_config(snd_config_t *config,
|
||||
if (snd_config_search(cfg1, "type", &cfg) >= 0 &&
|
||||
snd_config_get_string(cfg, &str) >= 0 &&
|
||||
strcmp(str, "hw") == 0) {
|
||||
- list->device_input = -1;
|
||||
- list->device_output = -1;
|
||||
if (snd_config_search(cfg1, "device", &cfg) >= 0) {
|
||||
if (snd_config_get_integer(cfg, &dev) < 0) {
|
||||
SNDERR("(%s) device must be an integer", buf);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From bca39e99d0c2a270a71dad640983fb739dac8bdd Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Fri, 27 Mar 2020 18:14:02 +0100
|
||||
Subject: [PATCH 10/14] conf: fix namehint for pcm.front and pcm.iec958
|
||||
|
||||
As suggested in:
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-lib/issues/39
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/conf/pcm/front.conf | 3 ++-
|
||||
src/conf/pcm/iec958.conf | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/conf/pcm/front.conf b/src/conf/pcm/front.conf
|
||||
index 7aff0cbf..0edf6a69 100644
|
||||
--- a/src/conf/pcm/front.conf
|
||||
+++ b/src/conf/pcm/front.conf
|
||||
@@ -53,6 +53,7 @@ pcm.!front {
|
||||
name defaults.namehint.basic
|
||||
}
|
||||
description "Front speakers"
|
||||
- device $DEV
|
||||
+ device_output $DEV
|
||||
+ omit_noargs true
|
||||
}
|
||||
}
|
||||
diff --git a/src/conf/pcm/iec958.conf b/src/conf/pcm/iec958.conf
|
||||
index ac139b5e..2b084d6f 100644
|
||||
--- a/src/conf/pcm/iec958.conf
|
||||
+++ b/src/conf/pcm/iec958.conf
|
||||
@@ -78,6 +78,6 @@ pcm.!iec958 {
|
||||
name defaults.namehint.basic
|
||||
}
|
||||
description "IEC958 (S/PDIF) Digital Audio Output"
|
||||
- device $DEV
|
||||
+ device_output $DEV
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 3b46b03f099da2f39c205a25b3cc62ec688fe6b3 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Holmberg <jonashg@axis.com>
|
||||
Date: Tue, 31 Mar 2020 17:09:25 +0200
|
||||
Subject: [PATCH 11/14] pcm: add chmap option to route plugin
|
||||
|
||||
Add a config definition "chmap" to override the channel maps in the same
|
||||
way as in the hw and null plugins.
|
||||
|
||||
Signed-off-by: Jonas Holmberg <jonashg@axis.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 57 +++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 47 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index bbcc6118..d3e5f3ff 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -104,6 +104,7 @@ typedef struct {
|
||||
int schannels;
|
||||
snd_pcm_route_params_t params;
|
||||
snd_pcm_chmap_t *chmap;
|
||||
+ snd_pcm_chmap_query_t **chmap_override;
|
||||
} snd_pcm_route_t;
|
||||
|
||||
#endif /* DOC_HIDDEN */
|
||||
@@ -441,6 +442,7 @@ static int snd_pcm_route_close(snd_pcm_t *pcm)
|
||||
free(params->dsts);
|
||||
}
|
||||
free(route->chmap);
|
||||
+ snd_pcm_free_chmaps(route->chmap_override);
|
||||
return snd_pcm_generic_close(pcm);
|
||||
}
|
||||
|
||||
@@ -634,6 +636,9 @@ static snd_pcm_chmap_t *snd_pcm_route_get_chmap(snd_pcm_t *pcm)
|
||||
snd_pcm_chmap_t *map, *slave_map;
|
||||
unsigned int src, dst, nsrcs;
|
||||
|
||||
+ if (route->chmap_override)
|
||||
+ return _snd_pcm_choose_fixed_chmap(pcm, route->chmap_override);
|
||||
+
|
||||
slave_map = snd_pcm_generic_get_chmap(pcm);
|
||||
if (!slave_map)
|
||||
return NULL;
|
||||
@@ -660,8 +665,14 @@ static snd_pcm_chmap_t *snd_pcm_route_get_chmap(snd_pcm_t *pcm)
|
||||
|
||||
static snd_pcm_chmap_query_t **snd_pcm_route_query_chmaps(snd_pcm_t *pcm)
|
||||
{
|
||||
+ snd_pcm_route_t *route = pcm->private_data;
|
||||
snd_pcm_chmap_query_t **maps;
|
||||
- snd_pcm_chmap_t *map = snd_pcm_route_get_chmap(pcm);
|
||||
+ snd_pcm_chmap_t *map;
|
||||
+
|
||||
+ if (route->chmap_override)
|
||||
+ return _snd_pcm_copy_chmap_query(route->chmap_override);
|
||||
+
|
||||
+ map = snd_pcm_route_get_chmap(pcm);
|
||||
if (!map)
|
||||
return NULL;
|
||||
maps = _snd_pcm_make_single_query_chmaps(map);
|
||||
@@ -818,10 +829,10 @@ err:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
-static int find_matching_chmap(snd_pcm_t *spcm, snd_pcm_chmap_t *tt_chmap,
|
||||
+static int find_matching_chmap(snd_pcm_chmap_query_t **chmaps,
|
||||
+ snd_pcm_chmap_t *tt_chmap,
|
||||
snd_pcm_chmap_t **found_chmap, int *schannels)
|
||||
{
|
||||
- snd_pcm_chmap_query_t** chmaps = snd_pcm_query_chmaps(spcm);
|
||||
int i;
|
||||
|
||||
*found_chmap = NULL;
|
||||
@@ -854,7 +865,6 @@ static int find_matching_chmap(snd_pcm_t *spcm, snd_pcm_chmap_t *tt_chmap,
|
||||
int size = sizeof(snd_pcm_chmap_t) + c->channels * sizeof(unsigned int);
|
||||
*found_chmap = malloc(size);
|
||||
if (!*found_chmap) {
|
||||
- snd_pcm_free_chmaps(chmaps);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(*found_chmap, c, size);
|
||||
@@ -863,8 +873,6 @@ static int find_matching_chmap(snd_pcm_t *spcm, snd_pcm_chmap_t *tt_chmap,
|
||||
}
|
||||
}
|
||||
|
||||
- snd_pcm_free_chmaps(chmaps);
|
||||
-
|
||||
if (*found_chmap == NULL) {
|
||||
SNDERR("Found no matching channel map");
|
||||
return -EINVAL;
|
||||
@@ -1252,6 +1260,7 @@ pcm.name {
|
||||
SCHANNEL REAL # route value (0.0 - 1.0)
|
||||
}
|
||||
}
|
||||
+ [chmap MAP] # Override channel maps; MAP is a string array
|
||||
}
|
||||
\endcode
|
||||
|
||||
@@ -1292,6 +1301,7 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
snd_pcm_route_ttable_entry_t *ttable = NULL;
|
||||
unsigned int csize, ssize;
|
||||
unsigned int cused, sused;
|
||||
+ snd_pcm_chmap_query_t **chmaps = NULL;
|
||||
snd_config_for_each(i, next, conf) {
|
||||
snd_config_t *n = snd_config_iterator_entry(i);
|
||||
const char *id;
|
||||
@@ -1306,31 +1316,45 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
if (strcmp(id, "ttable") == 0) {
|
||||
if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
SNDERR("Invalid type for %s", id);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return -EINVAL;
|
||||
}
|
||||
tt = n;
|
||||
continue;
|
||||
}
|
||||
+ if (strcmp(id, "chmap") == 0) {
|
||||
+ chmaps = _snd_pcm_parse_config_chmaps(n);
|
||||
+ if (!chmaps) {
|
||||
+ SNDERR("Invalid channel map for %s", id);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
SNDERR("Unknown field %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!slave) {
|
||||
SNDERR("slave is not defined");
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!tt) {
|
||||
SNDERR("ttable is not defined");
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return -EINVAL;
|
||||
}
|
||||
err = snd_pcm_slave_conf(root, slave, &sconf, 2,
|
||||
SND_PCM_HW_PARAM_FORMAT, 0, &sformat,
|
||||
SND_PCM_HW_PARAM_CHANNELS, 0, &schannels);
|
||||
- if (err < 0)
|
||||
+ if (err < 0) {
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return err;
|
||||
+ }
|
||||
if (sformat != SND_PCM_FORMAT_UNKNOWN &&
|
||||
snd_pcm_format_linear(sformat) != 1) {
|
||||
snd_config_delete(sconf);
|
||||
SNDERR("slave format is not linear");
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1345,13 +1369,19 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
if (err < 0) {
|
||||
free(tt_chmap);
|
||||
free(ttable);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (tt_chmap) {
|
||||
- err = find_matching_chmap(spcm, tt_chmap, &chmap, &schannels);
|
||||
+ if (!chmaps)
|
||||
+ chmaps = snd_pcm_query_chmaps(spcm);
|
||||
+ if (chmaps)
|
||||
+ err = find_matching_chmap(chmaps, tt_chmap, &chmap,
|
||||
+ &schannels);
|
||||
free(tt_chmap);
|
||||
- if (err < 0) {
|
||||
+ if (chmaps && err < 0) {
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
snd_pcm_close(spcm);
|
||||
return err;
|
||||
}
|
||||
@@ -1360,12 +1390,14 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
err = _snd_pcm_route_determine_ttable(tt, &csize, &ssize, chmap);
|
||||
if (err < 0) {
|
||||
free(chmap);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
snd_pcm_close(spcm);
|
||||
return err;
|
||||
}
|
||||
ttable = malloc(csize * ssize * sizeof(snd_pcm_route_ttable_entry_t));
|
||||
if (ttable == NULL) {
|
||||
free(chmap);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
snd_pcm_close(spcm);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -1374,6 +1406,7 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
if (err < 0) {
|
||||
free(chmap);
|
||||
free(ttable);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
snd_pcm_close(spcm);
|
||||
return err;
|
||||
}
|
||||
@@ -1385,9 +1418,13 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
free(ttable);
|
||||
if (err < 0) {
|
||||
free(chmap);
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
snd_pcm_close(spcm);
|
||||
} else {
|
||||
- ((snd_pcm_route_t*) (*pcmp)->private_data)->chmap = chmap;
|
||||
+ snd_pcm_route_t *route = (*pcmp)->private_data;
|
||||
+
|
||||
+ route->chmap = chmap;
|
||||
+ route->chmap_override = chmaps;
|
||||
}
|
||||
|
||||
return err;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 341326c21ededb8c768c43ec2c9c7a80e7a26d35 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Fri, 3 Apr 2020 18:00:43 +0200
|
||||
Subject: [PATCH 12/14] usecase: allow indexes also for modifier names
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
include/use-case.h | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/use-case.h b/include/use-case.h
|
||||
index 27cb3fe1..c2ba79a9 100644
|
||||
--- a/include/use-case.h
|
||||
+++ b/include/use-case.h
|
||||
@@ -120,7 +120,7 @@ extern "C" {
|
||||
* allowed. The names with numbers must be continuous. It is allowed to put
|
||||
* a whitespace between name and index (like 'Line 1') for the better
|
||||
* readability. The device names 'Line 1' and 'Line1' are equal for
|
||||
- * thus purpose.
|
||||
+ * this purpose.
|
||||
*
|
||||
* If EnableSequence/DisableSequence controls independent paths in the hardware
|
||||
* it is also recommended to split playback and capture UCM devices and use
|
||||
@@ -149,6 +149,13 @@ extern "C" {
|
||||
* The use case modifier allows runtime configuration changes to deal with
|
||||
* asynchronous events.
|
||||
*
|
||||
+ * If multiple modifiers with the same name exists, the number suffixes should
|
||||
+ * be added to these names like 'Echo Reference 1','Echo Reference 2' etc.
|
||||
+ * No number gaps are allowed. The names with numbers must be continuous.
|
||||
+ * It is allowed to put a whitespace between name and index for the better
|
||||
+ * readability. The modifier names 'Something 1' and 'Something1' are equal
|
||||
+ * for this purpose.
|
||||
+ *
|
||||
* e.g. to record a voice call :-
|
||||
* 1. Set verb to SND_USE_CASE_VERB_VOICECALL (for voice call)
|
||||
* 2. Set modifier SND_USE_CASE_MOD_CAPTURE_VOICE when capture required.
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From c9605484d165d2b707f78eef14a224b0b47ba322 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 6 Apr 2020 13:25:43 +0200
|
||||
Subject: [PATCH 13/14] ucm: fix the device remove operation
|
||||
|
||||
- allow to remove device only from conflicting lists
|
||||
- unify the error codes when the device is not found (ENODEV)
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/ucm/utils.c | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/ucm/utils.c b/src/ucm/utils.c
|
||||
index 50b2a1df..d78ba91c 100644
|
||||
--- a/src/ucm/utils.c
|
||||
+++ b/src/ucm/utils.c
|
||||
@@ -371,7 +371,7 @@ int uc_mgr_rename_in_dev_list(struct dev_list *dev_list, const char *src,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
- return -ENOENT;
|
||||
+ return -ENODEV;
|
||||
}
|
||||
|
||||
int uc_mgr_remove_from_dev_list(struct dev_list *dev_list, const char *name)
|
||||
@@ -528,17 +528,22 @@ int uc_mgr_remove_device(struct use_case_verb *verb, const char *name)
|
||||
{
|
||||
struct use_case_device *device;
|
||||
struct list_head *pos, *npos;
|
||||
+ int err, found = 0;
|
||||
|
||||
list_for_each_safe(pos, npos, &verb->device_list) {
|
||||
device = list_entry(pos, struct use_case_device, list);
|
||||
if (strcmp(device->name, name) == 0) {
|
||||
uc_mgr_free_device(device);
|
||||
+ found++;
|
||||
continue;
|
||||
}
|
||||
- uc_mgr_remove_from_dev_list(&device->dev_list, name);
|
||||
- return 0;
|
||||
+ err = uc_mgr_remove_from_dev_list(&device->dev_list, name);
|
||||
+ if (err < 0 && err != -ENODEV)
|
||||
+ return err;
|
||||
+ if (err == 0)
|
||||
+ found++;
|
||||
}
|
||||
- return -ENOENT;
|
||||
+ return found == 0 ? -ENODEV : 0;
|
||||
}
|
||||
|
||||
void uc_mgr_free_verb(snd_use_case_mgr_t *uc_mgr)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From fb48ad9e4f6b84fd4ade689bd79e3a3c37d3e034 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 6 Apr 2020 17:20:24 +0200
|
||||
Subject: [PATCH 14/14] ucm: fix copy-n-paste typo (RemoveDevice list)
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/ucm/parser.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
|
||||
index 0001e595..aca5ea8c 100644
|
||||
--- a/src/ucm/parser.c
|
||||
+++ b/src/ucm/parser.c
|
||||
@@ -1176,7 +1176,7 @@ static int verb_device_management(struct use_case_verb *verb)
|
||||
}
|
||||
|
||||
/* remove devices */
|
||||
- list_for_each(pos, &verb->rename_list) {
|
||||
+ list_for_each(pos, &verb->remove_list) {
|
||||
dev = list_entry(pos, struct ucm_dev_name, list);
|
||||
err = uc_mgr_remove_device(verb, dev->name2);
|
||||
if (err < 0) {
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,19 +1,19 @@
|
||||
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
|
||||
index 09980586..c4525f0b 100644
|
||||
index 08370108..dea39af1 100644
|
||||
--- a/src/conf/alsa.conf
|
||||
+++ b/src/conf/alsa.conf
|
||||
@@ -67,8 +67,7 @@ defaults.pcm.nonblock 1
|
||||
@@ -80,8 +80,7 @@ defaults.pcm.nonblock 1
|
||||
defaults.pcm.compat 0
|
||||
defaults.pcm.minperiodtime 5000 # in us
|
||||
defaults.pcm.ipc_key 5678293
|
||||
-defaults.pcm.ipc_gid audio
|
||||
-defaults.pcm.ipc_perm 0660
|
||||
+defaults.pcm.ipc_perm 0600
|
||||
defaults.pcm.tstamp_type "default"
|
||||
defaults.pcm.dmix.max_periods 0
|
||||
defaults.pcm.dmix.channels 2
|
||||
defaults.pcm.dmix.rate 48000
|
||||
diff --git a/src/conf/pcm/dmix.conf b/src/conf/pcm/dmix.conf
|
||||
index 7fa5c8b2..97936a82 100644
|
||||
index 50e573da..70523f29 100644
|
||||
--- a/src/conf/pcm/dmix.conf
|
||||
+++ b/src/conf/pcm/dmix.conf
|
||||
@@ -48,10 +48,6 @@ pcm.!dmix {
|
||||
@ -28,7 +28,7 @@ index 7fa5c8b2..97936a82 100644
|
||||
@func refer
|
||||
name defaults.pcm.ipc_perm
|
||||
diff --git a/src/conf/pcm/dsnoop.conf b/src/conf/pcm/dsnoop.conf
|
||||
index abbd44f7..528fb6ad 100644
|
||||
index f4336e5f..60b9f212 100644
|
||||
--- a/src/conf/pcm/dsnoop.conf
|
||||
+++ b/src/conf/pcm/dsnoop.conf
|
||||
@@ -41,10 +41,6 @@ pcm.!dsnoop {
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define prever_dot .rc3
|
||||
#define postver a
|
||||
|
||||
%define version_alsa_lib 1.2.2
|
||||
%define version_alsa_ucm 1.2.2
|
||||
%define version_alsa_tplg 1.2.2
|
||||
%define version_alsa_lib 1.2.3
|
||||
%define version_alsa_ucm 1.2.3
|
||||
%define version_alsa_tplg 1.2.3
|
||||
|
||||
Summary: The Advanced Linux Sound Architecture (ALSA) library
|
||||
Name: alsa-lib
|
||||
|
@ -1,941 +0,0 @@
|
||||
From 46222753fdddc86d6a0b92c465875f71c628a779 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
||||
Date: Thu, 27 Feb 2020 12:40:20 -0600
|
||||
Subject: [PATCH 01/10] sof-bdw-rt5677: initial port to UCM2
|
||||
|
||||
Tested on Pixel 2015/SAMUS Chromebook.
|
||||
|
||||
Known limitations:
|
||||
Left/Right confusion (probably a firmware issue)
|
||||
PulseAudio does not switch capture devices on headset plug
|
||||
|
||||
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/sof-bdw-rt5677/HiFi.conf | 194 ++++++++++++++++++++++++
|
||||
ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf | 6 +
|
||||
2 files changed, 200 insertions(+)
|
||||
create mode 100644 ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
create mode 100644 ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
|
||||
|
||||
diff --git a/ucm2/sof-bdw-rt5677/HiFi.conf b/ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
new file mode 100644
|
||||
index 0000000..f4b1449
|
||||
--- /dev/null
|
||||
+++ b/ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
@@ -0,0 +1,194 @@
|
||||
+# Use case Configuration for sof-bdw-rt5677
|
||||
+# command-line sequence to switch playback/capture
|
||||
+# alsaucm -c sof-bdw-rt5677 set _verb HiFi
|
||||
+# alsaucm -c sof-bdw-rt5677 set _verb HiFi set _enadev Headphones
|
||||
+
|
||||
+
|
||||
+SectionVerb {
|
||||
+
|
||||
+ EnableSequence [
|
||||
+
|
||||
+ cset "name='PDM1 L Mux' STO1 DAC MIX"
|
||||
+ cset "name='PDM1 R Mux' STO1 DAC MIX"
|
||||
+
|
||||
+ # Adjust Master Playback volume if needed
|
||||
+ # cset "name='Master Playback Volume' 30"
|
||||
+
|
||||
+ cset "name='OUT1 Playback Switch' off"
|
||||
+ cset "name='OUT2 Playback Switch' off"
|
||||
+
|
||||
+ cset "name='DAC1 Playback Volume' 175"
|
||||
+ cset "name='DAC2 Playback Volume' 175"
|
||||
+ cset "name='DAC12 SRC Mux' STO1 DAC MIX"
|
||||
+
|
||||
+ cset "name='Stereo DAC MIXL ST L Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 L Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC2 L Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 R Switch' on"
|
||||
+
|
||||
+ cset "name='Stereo DAC MIXR ST R Switch' off"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 R Switch' off"
|
||||
+ cset "name='Stereo DAC MIXR DAC2 R Switch' off"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 L Switch' on"
|
||||
+
|
||||
+ cset "name='DAC1 MIXL Stereo ADC Switch' off"
|
||||
+ cset "name='DAC1 MIXL DAC1 Switch' on"
|
||||
+
|
||||
+ cset "name='DAC1 MIXR Stereo ADC Switch' off"
|
||||
+ cset "name='DAC1 MIXR DAC1 Switch' on"
|
||||
+
|
||||
+ cset "name='DAC1 Mux' IF1 DAC 01"
|
||||
+
|
||||
+ cset "name='Stereo1 DMIC Mux' DMIC1"
|
||||
+ cset "name='Stereo1 ADC2 Mux' DMIC"
|
||||
+ cset "name='Stereo1 ADC1 Mux' ADC1/2"
|
||||
+
|
||||
+ cset "name='Sto1 ADC MIXL ADC1 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXL ADC2 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXL ADC2 Switch' on"
|
||||
+
|
||||
+ cset "name='Sto1 ADC MIXR ADC1 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXR ADC2 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXR ADC2 Switch' on"
|
||||
+
|
||||
+ cset "name='IF1 ADC1 Mux' STO1 ADC MIX"
|
||||
+ cset "name='IF1 ADC1 Swap Mux' L/R"
|
||||
+
|
||||
+ # Adjust Mic Capture Volume if needed
|
||||
+ # cset "name='Mic Capture Volume' 30"
|
||||
+
|
||||
+ cset "name='ADC1 Capture Switch' on"
|
||||
+ cset "name='ADC1 Capture Volume' 31"
|
||||
+ cset "name='STO1 ADC Boost Volume' 2"
|
||||
+
|
||||
+ cset "name='Headphone Switch' off"
|
||||
+ cset "name='Speaker Switch' on"
|
||||
+
|
||||
+ cset "name='Remote DMICs Switch' on"
|
||||
+ cset "name='Mono DMIC L Mux' DMIC1"
|
||||
+ cset "name='Mono ADC2 L Mux' DMIC"
|
||||
+ cset "name='Mono ADC MIXL ADC1 Switch' off"
|
||||
+ cset "name='Mono ADC MIXL ADC2 Switch' on"
|
||||
+ cset "name='VAD ADC Mux' MONO ADC MIX L"
|
||||
+ cset "name='IB01 Mux' VAD ADC/DAC1 FS"
|
||||
+ cset "name='IB01 Bypass Mux' Bypass"
|
||||
+ cset "name='Mono ADC Boost Volume' 2"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Speaker" {
|
||||
+ Comment "Speakers"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headphones"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 100
|
||||
+ PlaybackPCM "hw:${CardId}"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+SectionDevice."Headphones" {
|
||||
+ Comment "Headphones"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Speaker"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='Speaker Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 R Switch' off"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 L Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 L Switch' on"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 R Switch' on"
|
||||
+ cset "name='OUT1 Playback Switch' on"
|
||||
+ cset "name='OUT2 Playback Switch' on"
|
||||
+ cset "name='Headphone Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cset "name='Headphone Switch' off"
|
||||
+ cset "name='OUT1 Playback Switch' off"
|
||||
+ cset "name='OUT2 Playback Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 L Switch' off"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 R Switch' off"
|
||||
+ cset "name='Stereo DAC MIXL DAC1 R Switch' on"
|
||||
+ cset "name='Stereo DAC MIXR DAC1 L Switch' on"
|
||||
+ cset "name='Speaker Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 300
|
||||
+ PlaybackPCM "hw:${CardId}"
|
||||
+ JackControl "Headphone Jack"
|
||||
+ JackHWMute "Speakers"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Mic" {
|
||||
+ Comment "Internal Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headset"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CapturePriority 100
|
||||
+ CapturePCM "hw:${CardId}"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headset" {
|
||||
+ Comment "Headset Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Mic"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='Sto1 ADC MIXL ADC2 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXR ADC2 Switch' off"
|
||||
+ cset "name='Local DMICs Switch' off"
|
||||
+
|
||||
+ cset "name='IF1 ADC1 Swap Mux' L/L"
|
||||
+
|
||||
+ cset "name='Sto1 ADC MIXL ADC1 Switch' on"
|
||||
+ cset "name='Sto1 ADC MIXR ADC1 Switch' on"
|
||||
+ cset "name='Headset Mic Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ DisableSequence [
|
||||
+ cset "name='Sto1 ADC MIXL ADC1 Switch' off"
|
||||
+ cset "name='Sto1 ADC MIXR ADC1 Switch' off"
|
||||
+ cset "name='Headset Mic Switch' off"
|
||||
+
|
||||
+ cset "name='IF1 ADC1 Swap Mux' L/R"
|
||||
+
|
||||
+ cset "name='Sto1 ADC MIXL ADC2 Switch' on"
|
||||
+ cset "name='Sto1 ADC MIXR ADC2 Switch' on"
|
||||
+ cset "name='Local DMICs Switch' on"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CapturePriority 300
|
||||
+ CapturePCM "hw:${CardId}"
|
||||
+ JackControl "Mic Jack"
|
||||
+ }
|
||||
+}
|
||||
diff --git a/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf b/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
|
||||
new file mode 100644
|
||||
index 0000000..d672df2
|
||||
--- /dev/null
|
||||
+++ b/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
|
||||
@@ -0,0 +1,6 @@
|
||||
+Syntax 2
|
||||
+
|
||||
+SectionUseCase."HiFi" {
|
||||
+ File "HiFi.conf"
|
||||
+ Comment "Default"
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From da45a07c756308b57facf1a97c4842274ff04fe3 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Sun, 1 Mar 2020 16:12:28 +0100
|
||||
Subject: [PATCH 02/10] ucm2: treewide - JackHWMute fixes
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/14
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/HDA-Intel/HiFi-dual.conf | 1 +
|
||||
ucm2/broxton-rt298/HiFi.conf | 1 -
|
||||
ucm2/chtrt5645/HiFi-dmic2.conf | 2 +-
|
||||
ucm2/skylake-rt286/HiFi.conf | 1 -
|
||||
ucm2/sof-bdw-rt5677/HiFi.conf | 2 +-
|
||||
5 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/ucm2/HDA-Intel/HiFi-dual.conf b/ucm2/HDA-Intel/HiFi-dual.conf
|
||||
index 174fef4..277894a 100644
|
||||
--- a/ucm2/HDA-Intel/HiFi-dual.conf
|
||||
+++ b/ucm2/HDA-Intel/HiFi-dual.conf
|
||||
@@ -93,6 +93,7 @@ SectionDevice."Mic2" {
|
||||
CapturePriority 300
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackHWMute "Line2"
|
||||
+ JackControl "Mic Jack"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
diff --git a/ucm2/broxton-rt298/HiFi.conf b/ucm2/broxton-rt298/HiFi.conf
|
||||
index 6f5b9a5..f7e561f 100644
|
||||
--- a/ucm2/broxton-rt298/HiFi.conf
|
||||
+++ b/ucm2/broxton-rt298/HiFi.conf
|
||||
@@ -30,7 +30,6 @@ SectionDevice."Speaker" {
|
||||
Value {
|
||||
PlaybackPriority 100
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
- JackHWMute "Headphones"
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/ucm2/chtrt5645/HiFi-dmic2.conf b/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
index c9fdd79..d3f880a 100644
|
||||
--- a/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
+++ b/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
@@ -98,7 +98,7 @@ SectionDevice."Headset" {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackControl "Headset Mic Jack"
|
||||
- JackHWMute "DMic"
|
||||
+ JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
diff --git a/ucm2/skylake-rt286/HiFi.conf b/ucm2/skylake-rt286/HiFi.conf
|
||||
index 9e94a1b..ed4bfa7 100644
|
||||
--- a/ucm2/skylake-rt286/HiFi.conf
|
||||
+++ b/ucm2/skylake-rt286/HiFi.conf
|
||||
@@ -51,7 +51,6 @@ SectionDevice."Speaker" {
|
||||
Value {
|
||||
PlaybackPriority 100
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
- JackHWMute "Headphones"
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/ucm2/sof-bdw-rt5677/HiFi.conf b/ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
index f4b1449..724a1cc 100644
|
||||
--- a/ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
+++ b/ucm2/sof-bdw-rt5677/HiFi.conf
|
||||
@@ -132,7 +132,7 @@ SectionDevice."Headphones" {
|
||||
PlaybackPriority 300
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
JackControl "Headphone Jack"
|
||||
- JackHWMute "Speakers"
|
||||
+ JackHWMute "Speaker"
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 4722f5b3859903521ba0f92a64d86af31083ca50 Mon Sep 17 00:00:00 2001
|
||||
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
|
||||
Date: Thu, 5 Mar 2020 14:59:56 +0200
|
||||
Subject: [PATCH 03/10] sof-hda-dsp: Support systems without integrated
|
||||
graphics audio
|
||||
|
||||
On systems where integrated graphics audio is not present
|
||||
or is disabled, the HDMI PCM nodes are disabled. Add rules to
|
||||
detect these systems by checking presence of HDMI jack controls
|
||||
with UCM2 rules.
|
||||
|
||||
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/sof-hda-dsp/Hdmi.conf | 96 ++++++++++++++++++++++++--------------
|
||||
1 file changed, 60 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/ucm2/sof-hda-dsp/Hdmi.conf b/ucm2/sof-hda-dsp/Hdmi.conf
|
||||
index be6cb39..6f2c4aa 100644
|
||||
--- a/ucm2/sof-hda-dsp/Hdmi.conf
|
||||
+++ b/ucm2/sof-hda-dsp/Hdmi.conf
|
||||
@@ -1,55 +1,79 @@
|
||||
# Use case Configuration for sof-hda-dsp
|
||||
|
||||
-SectionDevice."HDMI1" {
|
||||
- Comment "HDMI1/DP1 Output"
|
||||
+If.hdmi1 {
|
||||
+ Condition {
|
||||
+ Type ControlExists
|
||||
+ Control "iface=CARD,name='HDMI/DP,pcm=3 Jack'"
|
||||
+ }
|
||||
+ True {
|
||||
+ SectionDevice."HDMI1" {
|
||||
+ Comment "HDMI1/DP1 Output"
|
||||
|
||||
- EnableSequence [
|
||||
- cset "name='IEC958 Playback Switch' on"
|
||||
- ]
|
||||
+ EnableSequence [
|
||||
+ cset "name='IEC958 Playback Switch' on"
|
||||
+ ]
|
||||
|
||||
- DisableSequence [
|
||||
- cset "name='IEC958 Playback Switch' off"
|
||||
- ]
|
||||
+ DisableSequence [
|
||||
+ cset "name='IEC958 Playback Switch' off"
|
||||
+ ]
|
||||
|
||||
- Value {
|
||||
- PlaybackPriority 500
|
||||
- PlaybackPCM "hw:${CardId},3"
|
||||
- JackControl "HDMI/DP,pcm=3 Jack"
|
||||
+ Value {
|
||||
+ PlaybackPriority 500
|
||||
+ PlaybackPCM "hw:${CardId},3"
|
||||
+ JackControl "HDMI/DP,pcm=3 Jack"
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
-SectionDevice."HDMI2" {
|
||||
- Comment "HDMI2/DP2 Output"
|
||||
+If.hdmi2 {
|
||||
+ Condition {
|
||||
+ Type ControlExists
|
||||
+ Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
|
||||
+ }
|
||||
+ True {
|
||||
+ SectionDevice."HDMI2" {
|
||||
+ Comment "HDMI2/DP2 Output"
|
||||
|
||||
- EnableSequence [
|
||||
- cset "name='IEC958 Playback Switch',index=1 on"
|
||||
- ]
|
||||
+ EnableSequence [
|
||||
+ cset "name='IEC958 Playback Switch',index=1 on"
|
||||
+ ]
|
||||
|
||||
- DisableSequence [
|
||||
- cset "name='IEC958 Playback Switch',index=1 off"
|
||||
- ]
|
||||
+ DisableSequence [
|
||||
+ cset "name='IEC958 Playback Switch',index=1 off"
|
||||
+ ]
|
||||
|
||||
- Value {
|
||||
- PlaybackPriority 600
|
||||
- PlaybackPCM "hw:${CardId},4"
|
||||
- JackControl "HDMI/DP,pcm=4 Jack"
|
||||
+ Value {
|
||||
+ PlaybackPriority 600
|
||||
+ PlaybackPCM "hw:${CardId},4"
|
||||
+ JackControl "HDMI/DP,pcm=4 Jack"
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
-SectionDevice."HDMI3" {
|
||||
- Comment "HDMI3/DP3 Output"
|
||||
+If.hdmi3 {
|
||||
+ Condition {
|
||||
+ Type ControlExists
|
||||
+ Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
|
||||
+ }
|
||||
+ True {
|
||||
+ SectionDevice."HDMI3" {
|
||||
+ Comment "HDMI3/DP3 Output"
|
||||
|
||||
- EnableSequence [
|
||||
- cset "name='IEC958 Playback Switch',index=2 on"
|
||||
- ]
|
||||
+ EnableSequence [
|
||||
+ cset "name='IEC958 Playback Switch',index=2 on"
|
||||
+ ]
|
||||
|
||||
- DisableSequence [
|
||||
- cset "name='IEC958 Playback Switch',index=2 off"
|
||||
- ]
|
||||
+ DisableSequence [
|
||||
+ cset "name='IEC958 Playback Switch',index=2 off"
|
||||
+ ]
|
||||
|
||||
- Value {
|
||||
- PlaybackPriority 700
|
||||
- PlaybackPCM "hw:${CardId},5"
|
||||
- JackControl "HDMI/DP,pcm=5 Jack"
|
||||
+ Value {
|
||||
+ PlaybackPriority 700
|
||||
+ PlaybackPCM "hw:${CardId},5"
|
||||
+ JackControl "HDMI/DP,pcm=5 Jack"
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 76df616aa2fcae1cca1f948dac24c98a211c2593 Mon Sep 17 00:00:00 2001
|
||||
From: Mateusz Gorski <mateusz.gorski@linux.intel.com>
|
||||
Date: Wed, 18 Mar 2020 11:26:05 +0100
|
||||
Subject: [PATCH 04/10] hda-dsp: add basic ucm config
|
||||
|
||||
Basic UCM configuration for Intel Skylake SST with HDA DSP generic
|
||||
machine driver enabling codec playback and capture on both HDA codec
|
||||
and DMIC ports.
|
||||
|
||||
Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/hda-dsp/Hdmi1.conf | 24 ++++++++++
|
||||
ucm2/hda-dsp/Hdmi2.conf | 23 ++++++++++
|
||||
ucm2/hda-dsp/HiFi.conf | 96 +++++++++++++++++++++++++++++++++++++++
|
||||
ucm2/hda-dsp/hda-dsp.conf | 16 +++++++
|
||||
4 files changed, 159 insertions(+)
|
||||
create mode 100644 ucm2/hda-dsp/Hdmi1.conf
|
||||
create mode 100644 ucm2/hda-dsp/Hdmi2.conf
|
||||
create mode 100644 ucm2/hda-dsp/HiFi.conf
|
||||
create mode 100644 ucm2/hda-dsp/hda-dsp.conf
|
||||
|
||||
diff --git a/ucm2/hda-dsp/Hdmi1.conf b/ucm2/hda-dsp/Hdmi1.conf
|
||||
new file mode 100644
|
||||
index 0000000..08fa5dd
|
||||
--- /dev/null
|
||||
+++ b/ucm2/hda-dsp/Hdmi1.conf
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Usecase for device HDMI1/Display Port stereo playback on Intel cAVS platforms
|
||||
+# For Audio in HDA mode
|
||||
+
|
||||
+SectionDevice."HDMI1" {
|
||||
+ Comment "HDMI/Display Port 1 Stereo"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 300
|
||||
+ PlaybackPCM "hw:${CardId},10"
|
||||
+ If.1 {
|
||||
+ Condition {
|
||||
+ Type ControlExists
|
||||
+ Control "iface=CARD,name='HDMI/DP,pcm=17 Jack'"
|
||||
+ }
|
||||
+ True {
|
||||
+ JackControl "HDMI/DP,pcm=17 Jack"
|
||||
+ }
|
||||
+ False {
|
||||
+ JackControl "HDMI/DP, pcm=17 Jack"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
diff --git a/ucm2/hda-dsp/Hdmi2.conf b/ucm2/hda-dsp/Hdmi2.conf
|
||||
new file mode 100644
|
||||
index 0000000..eb168ea
|
||||
--- /dev/null
|
||||
+++ b/ucm2/hda-dsp/Hdmi2.conf
|
||||
@@ -0,0 +1,23 @@
|
||||
+# Usecase for device HDMI2/Display Port stereo playback on Intel cAVS platforms
|
||||
+# For Audio in HDA mode
|
||||
+
|
||||
+SectionDevice."HDMI2" {
|
||||
+ Comment "HDMI/Display Port 2 Stereo"
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 400
|
||||
+ PlaybackPCM "hw:${CardId},11"
|
||||
+ If.1 {
|
||||
+ Condition {
|
||||
+ Type ControlExists
|
||||
+ Control "iface=CARD,name='HDMI/DP,pcm=18 Jack'"
|
||||
+ }
|
||||
+ True {
|
||||
+ JackControl "HDMI/DP,pcm=18 Jack"
|
||||
+ }
|
||||
+ False {
|
||||
+ JackControl "HDMI/DP, pcm=18 Jack"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/ucm2/hda-dsp/HiFi.conf b/ucm2/hda-dsp/HiFi.conf
|
||||
new file mode 100644
|
||||
index 0000000..cdeb215
|
||||
--- /dev/null
|
||||
+++ b/ucm2/hda-dsp/HiFi.conf
|
||||
@@ -0,0 +1,96 @@
|
||||
+# Usecase for stereo playback Speaker and Headset, Recording on DMIC and Headset MIC.
|
||||
+# For Audio in HDA mode on Intel cAVS platforms
|
||||
+
|
||||
+SectionVerb {
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='mch_cap_out mo mch_cap_in mi Switch' 1"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ TQ "HiFi"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headphones" {
|
||||
+ Comment "Headphones"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Speaker"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='Headphone Playback Switch' 1,1"
|
||||
+ cset "name='Speaker Playback Switch' 0,0"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 200
|
||||
+ PlaybackPCM "hw:${CardId},7"
|
||||
+ PlaybackMixerElem "Headphone"
|
||||
+ PlaybackMasterElem "Master"
|
||||
+ PlaybackVolume "Headphone Playback Volume"
|
||||
+ PlaybackSwitch "Headphone Playback Switch"
|
||||
+ JackControl "Front Headphone Jack"
|
||||
+ JackHWMute "Speaker"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Speaker" {
|
||||
+ Comment "Speaker"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headphones"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='Headphone Playback Switch' 0,0"
|
||||
+ cset "name='Speaker Playback Switch' 1,1"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ PlaybackPriority 100
|
||||
+ PlaybackPCM "hw:${CardId},7"
|
||||
+ PlaybackMixerElem "Speaker"
|
||||
+ PlaybackMasterElem "Master"
|
||||
+ PlaybackVolume "Speaker Playback Volume"
|
||||
+ PlaybackSwitch "Speaker Playback Switch"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Headset" {
|
||||
+ Comment "Headset Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Mic"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='media0_out mo codec0_in mi Switch' 1"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CapturePriority 200
|
||||
+ CapturePCM "hw:${CardId},7"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+SectionDevice."Mic" {
|
||||
+ Comment "Digital Microphone"
|
||||
+
|
||||
+ ConflictingDevice [
|
||||
+ "Headset"
|
||||
+ ]
|
||||
+
|
||||
+ EnableSequence [
|
||||
+ cset "name='mch_cap_out mo mch_cap_in mi Switch' 1"
|
||||
+ ]
|
||||
+
|
||||
+ Value {
|
||||
+ CapturePriority 100
|
||||
+ CapturePCM "hw:${CardId},13"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+<hda-dsp/Hdmi1.conf>
|
||||
+<hda-dsp/Hdmi2.conf>
|
||||
diff --git a/ucm2/hda-dsp/hda-dsp.conf b/ucm2/hda-dsp/hda-dsp.conf
|
||||
new file mode 100644
|
||||
index 0000000..bf80b09
|
||||
--- /dev/null
|
||||
+++ b/ucm2/hda-dsp/hda-dsp.conf
|
||||
@@ -0,0 +1,16 @@
|
||||
+# UCM for Intel CAVS platforms
|
||||
+# For Audio in HDA and DMIC mode
|
||||
+
|
||||
+Syntax 2
|
||||
+
|
||||
+SectionUseCase."HiFi" {
|
||||
+ File "HiFi.conf"
|
||||
+ Comment "Play HiFi quality Music"
|
||||
+}
|
||||
+
|
||||
+SectionDefaults [
|
||||
+ cset "name='Master Playback Switch' 1"
|
||||
+ cset "name='codec0_out mo media0_in mi Switch' 1"
|
||||
+ cset "name='media0_out mo codec0_in mi Switch' 1"
|
||||
+ cset "name='mch_cap_out mo mch_cap_in mi Switch' 1"
|
||||
+]
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 85ca26a4f2b73888dbce3437a402df13faf628fa Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 5 Apr 2020 20:34:50 +0200
|
||||
Subject: [PATCH 06/10] bytcr-rt5651: Fix dmic check in HiFi-Components.conf
|
||||
|
||||
The kernel sets cfg-mic:dmic not cfg-mic:dmic1 when a digital mic is
|
||||
used. The wrong check for cfg-mic:dmic1 causes there to be no "Mic"
|
||||
device at all, which causes the check for the ConflictingDevices section
|
||||
of the HeadSet (mic) device to fail like e.g. so:
|
||||
|
||||
[hans@localhost ~]$ alsaucm -c bytcr-rt5651 set _verb HiFi set _enadev Speaker
|
||||
ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Mic'
|
||||
ALSA lib parser.c:1433:(parse_verb_file) error: device management error in verb 'HiFi'
|
||||
ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import bytcr-rt5651 use case configuration -2
|
||||
alsaucm: error failed to open sound card bytcr-rt5651: No such file or directory
|
||||
|
||||
This commit fixes this.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/bytcr-rt5651/HiFi-Components.conf | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ucm2/bytcr-rt5651/HiFi-Components.conf b/ucm2/bytcr-rt5651/HiFi-Components.conf
|
||||
index 53ebcbe..d0a573e 100644
|
||||
--- a/ucm2/bytcr-rt5651/HiFi-Components.conf
|
||||
+++ b/ucm2/bytcr-rt5651/HiFi-Components.conf
|
||||
@@ -34,11 +34,11 @@ If.headphones {
|
||||
}
|
||||
}
|
||||
|
||||
-If.dmic1 {
|
||||
+If.dmic {
|
||||
Condition {
|
||||
Type String
|
||||
Haystack "${CardComponents}"
|
||||
- Needle "cfg-mic:dmic1"
|
||||
+ Needle "cfg-mic:dmic"
|
||||
}
|
||||
True {
|
||||
<codecs/rt5651/DigitalMic.conf>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From aaa86069ab721683afcf978b9291219855db42f1 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 5 Apr 2020 20:34:51 +0200
|
||||
Subject: [PATCH 07/10] chtrt5645: Add ASUSTeKCOMPUTERINC.-T100HAN-1.0 symlink
|
||||
to chtrt5645-dmic1.conf
|
||||
|
||||
We already have a ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN symlink to
|
||||
chtrt5645-dmic1.conf, but since kernel commit 39870b0dec68 ("ASoC: DMI long
|
||||
name - avoid to add board name if matches with product name"), the kernel
|
||||
omits the (second) -T100HAN. So with newer kernels that no longer works.
|
||||
|
||||
Arguably this is a kernel regressions, but chances are we already have
|
||||
some configs depending on the new behavior, so lets fix this on the
|
||||
UCM2 side by adding a second symlink using the new long name.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/chtrt5645/ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 120000 ucm2/chtrt5645/ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf
|
||||
|
||||
diff --git a/ucm2/chtrt5645/ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf b/ucm2/chtrt5645/ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf
|
||||
new file mode 120000
|
||||
index 0000000..b4d2816
|
||||
--- /dev/null
|
||||
+++ b/ucm2/chtrt5645/ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf
|
||||
@@ -0,0 +1 @@
|
||||
+chtrt5645-dmic1.conf
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 5ba4fd1dfca593248a603e5621bf2f53a4e2ddcc Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 5 Apr 2020 20:34:52 +0200
|
||||
Subject: [PATCH 08/10] chtrt5645: Add MEDION-E1239TMD60568-0.1-Wingman.conf
|
||||
symlink to chtrt5645-dmic2.conf
|
||||
|
||||
The Medion Akoya E1239T 2-in-1 uses a digital mic connected to the
|
||||
dmic2 pin, rather then the default analog mic on in2.
|
||||
|
||||
Add a long name symlink to chtrt5645-dmic2.conf for this, so that
|
||||
the right config is used.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/chtrt5645/MEDION-E1239TMD60568-0.1-Wingman.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 120000 ucm2/chtrt5645/MEDION-E1239TMD60568-0.1-Wingman.conf
|
||||
|
||||
diff --git a/ucm2/chtrt5645/MEDION-E1239TMD60568-0.1-Wingman.conf b/ucm2/chtrt5645/MEDION-E1239TMD60568-0.1-Wingman.conf
|
||||
new file mode 120000
|
||||
index 0000000..7823e31
|
||||
--- /dev/null
|
||||
+++ b/ucm2/chtrt5645/MEDION-E1239TMD60568-0.1-Wingman.conf
|
||||
@@ -0,0 +1 @@
|
||||
+chtrt5645-dmic2.conf
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From d0b1a426ba7cbfb34355a4101bb314ba288a6679 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 5 Apr 2020 20:34:53 +0200
|
||||
Subject: [PATCH 09/10] chtrt5645: Remove bogus JackHWMute settings
|
||||
|
||||
There is no reason why the internal microphone or speakers cannot
|
||||
be used when a headset is plugged in.
|
||||
|
||||
The jack does not physically disconnect these, so the JackHWMute settings
|
||||
are wrong, remove them.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/chtrt5645/HiFi-dmic1.conf | 2 --
|
||||
ucm2/chtrt5645/HiFi-dmic2.conf | 2 --
|
||||
ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf | 2 --
|
||||
ucm2/chtrt5645/HiFi.conf | 2 --
|
||||
4 files changed, 8 deletions(-)
|
||||
|
||||
diff --git a/ucm2/chtrt5645/HiFi-dmic1.conf b/ucm2/chtrt5645/HiFi-dmic1.conf
|
||||
index 1a8ee0a..c7e12c9 100644
|
||||
--- a/ucm2/chtrt5645/HiFi-dmic1.conf
|
||||
+++ b/ucm2/chtrt5645/HiFi-dmic1.conf
|
||||
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
|
||||
PlaybackPriority 200
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
JackControl "Headphone Jack"
|
||||
- JackHWMute "Speaker"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
@@ -96,7 +95,6 @@ SectionDevice."Headset" {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackControl "Headset Mic Jack"
|
||||
- JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
diff --git a/ucm2/chtrt5645/HiFi-dmic2.conf b/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
index d3f880a..95fedb3 100644
|
||||
--- a/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
+++ b/ucm2/chtrt5645/HiFi-dmic2.conf
|
||||
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
|
||||
PlaybackPriority 200
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
JackControl "Headphone Jack"
|
||||
- JackHWMute "Speaker"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
@@ -98,7 +97,6 @@ SectionDevice."Headset" {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackControl "Headset Mic Jack"
|
||||
- JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
diff --git a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
|
||||
index db866cd..f6180a4 100644
|
||||
--- a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
|
||||
+++ b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
|
||||
@@ -54,7 +54,6 @@ SectionDevice."Headphones" {
|
||||
PlaybackPriority 200
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
JackControl "Headphone Jack"
|
||||
- JackHWMute "Speaker"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
@@ -84,7 +83,6 @@ SectionDevice."Headset" {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackControl "Headset Mic Jack"
|
||||
- JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf
|
||||
index 58468a8..116d456 100644
|
||||
--- a/ucm2/chtrt5645/HiFi.conf
|
||||
+++ b/ucm2/chtrt5645/HiFi.conf
|
||||
@@ -50,7 +50,6 @@ SectionDevice."Headphones" {
|
||||
PlaybackPriority 200
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
JackControl "Headphone Jack"
|
||||
- JackHWMute "Speaker"
|
||||
}
|
||||
|
||||
ConflictingDevice [
|
||||
@@ -76,7 +75,6 @@ SectionDevice."Headset" {
|
||||
CapturePriority 200
|
||||
CapturePCM "hw:${CardId}"
|
||||
JackControl "Headset Mic Jack"
|
||||
- JackHWMute "Mic"
|
||||
}
|
||||
|
||||
EnableSequence [
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From 907c8309b2ee671e1b36630b0d29db1bc3124990 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 6 Apr 2020 17:37:20 +0200
|
||||
Subject: [PATCH 10/10] sof-hda-dsp: change Headphones2 to Mic2
|
||||
|
||||
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/19
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
ucm2/sof-hda-dsp/HiFi.conf | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf
|
||||
index 60a8693..9a82930 100644
|
||||
--- a/ucm2/sof-hda-dsp/HiFi.conf
|
||||
+++ b/ucm2/sof-hda-dsp/HiFi.conf
|
||||
@@ -6,7 +6,7 @@ SectionVerb {
|
||||
]
|
||||
}
|
||||
|
||||
-SectionDevice."Headphones1" {
|
||||
+SectionDevice."Headphones" {
|
||||
Comment "Headphones"
|
||||
|
||||
EnableSequence [
|
||||
@@ -85,9 +85,9 @@ If.monomic {
|
||||
Control "name='Input Source'"
|
||||
ControlEnum "Headphone Mic"
|
||||
}
|
||||
- After.SectionDevice "Mic"
|
||||
+ After.SectionDevice "Mic1"
|
||||
True {
|
||||
- SectionDevice."Headphones2" {
|
||||
+ SectionDevice."Mic2" {
|
||||
Comment "Headphones Stereo Microphone"
|
||||
|
||||
ConflictingDevice [
|
||||
@@ -120,7 +120,7 @@ If.monomic {
|
||||
}
|
||||
}
|
||||
False {
|
||||
- SectionDevice."Headphones2" {
|
||||
+ SectionDevice."Mic2" {
|
||||
Comment "Headphones Stereo Microphone"
|
||||
|
||||
Value {
|
||||
@@ -132,7 +132,7 @@ If.monomic {
|
||||
}
|
||||
}
|
||||
|
||||
-SectionDevice."Mic" {
|
||||
+SectionDevice."Mic1" {
|
||||
Comment "Digital Microphone"
|
||||
|
||||
Value {
|
||||
--
|
||||
2.25.1
|
||||
|
6
sources
6
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (alsa-lib-1.2.2.tar.bz2) = d21adb3ff998918c7d1820f9ce2aaf4202dd45ccb87cb092d49da8b2402b6ddaad06325be0fd59f17393a5d9958e3743bfccb4b14bdb947a42e7d791d73c7033
|
||||
SHA512 (alsa-ucm-conf-1.2.2.tar.bz2) = 25e3f341c110772c7cffc8c7745b320f2ddd12fe6460380c088939b5dc67b99ae4ad92e69375179574e0e1c40d14ff49961e86494e223fde009e51590f00ca8f
|
||||
SHA512 (alsa-topology-conf-1.2.2.tar.bz2) = 145ee0e16f7f84d5f97759b1efaa3df9fe35c8b33c7ae863ae1b915f361acd902ad05f59090e1d98b2a4f2ecc14933681592893564fcc45cdbc974899f789b94
|
||||
SHA512 (alsa-lib-1.2.3.tar.bz2) = e4e09062786635461bd721c71f1cfa01227a2ec2791bbe386b1cdb0e9f83d12291ced9977d9b1f09d6be6a336da2ad239d51e4bd28bcd48f767864f93492fff0
|
||||
SHA512 (alsa-ucm-conf-1.2.3.tar.bz2) = 1bdb024170f1dc18170c1d3699798c14d9cc7bbaccfe6eaef1fac0ec8c28074d08ed722bf47996682d4a0737138112b7eb4d45e224f00b027b3331da728e47cd
|
||||
SHA512 (alsa-topology-conf-1.2.3.tar.bz2) = e57439212fd76d1d0c1677654ae7cecef0f89c01a6c57f5f00a02ecd2f6d9f22dc31ed4f301cf82464d98ac32c01f2015a91a5b51d08268ddfeb4265e9b951b9
|
||||
|
Loading…
Reference in New Issue
Block a user