summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2019-12-06 15:43:04 +0100
committerArun Raghavan <arun@arunraghavan.net>2019-12-18 08:29:11 +0100
commitef1df946274a0499e1fa631a8b6680c23c4eb723 (patch)
tree9e086426d7eaa3ac504da58a6ce025950c8a8581
parent4c64f73c97c7f77426ee838f47fc7bad6a4563b6 (diff)
alsa-ucm: do not try to use UCM device name as jack name by default
Remove the implicit rule. It is perfectly ok to have the jack with the same name for another I/O in the driver. Trust only the value obtained from UCM. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--src/modules/alsa/alsa-ucm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index ac1b71e9..95f1a47f 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -1522,9 +1522,8 @@ static pa_alsa_jack* ucm_get_jack(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *d
* end, so drop the trailing " Jack". */
name = pa_xstrndup(jack_control, strlen(jack_control) - 5);
} else {
- /* The jack control hasn't been explicitly configured - try a jack name
- * that is the same as the device name. */
- name = pa_xstrdup(device_name);
+ /* The jack control hasn't been explicitly configured, fail. */
+ return NULL;
}
PA_LLIST_FOREACH(j, ucm->jacks)
@@ -1603,7 +1602,8 @@ static int ucm_create_profile(
ucm_create_mapping(ucm, ps, p, dev, verb_name, name, sink, source);
jack = ucm_get_jack(ucm, dev);
- device_set_jack(dev, jack);
+ if (jack)
+ device_set_jack(dev, jack);
/* JackHWMute contains a list of device names. Each listed device must
* be associated with the jack object that we just created. */