pulseaudio/0035-alsa-ucm-do-not-assign-JackHWMute-when-JackControl-i.patch
Takashi Iwai 1de102e500 Accepting request 809086 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes for ALSA UCM profile handling
  (boo#1171492):
  0033-alsa-Document-that-mixer-elements-can-be-identified-.patch
  0034-alsa-ucm-correct-the-channel-default-logic-stereo.patch
  0035-alsa-ucm-do-not-assign-JackHWMute-when-JackControl-i.patch
  0036-ucm-Don-t-log-errors-during-normal-operation.patch
  0037-alsa-handle-unavailbale-HW-volume-in-UCM.patch
  0038-alsa-ucm-use-the-right-profile-name.patch
  0039-ucm-fix-the-port-ucm-device-activation-on-boot.patch
  0040-alsa-sink-source-fix-the-mixer-initialization.patch

OBS-URL: https://build.opensuse.org/request/show/809086
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=219
2020-05-27 06:23:43 +00:00

32 lines
1.2 KiB
Diff

From 4da4670fdb9a09199fb5d3bfaee252b2f4f13128 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 1 Mar 2020 15:55:07 +0100
Subject: [PATCH] alsa ucm: do not assign JackHWMute when JackControl is
missing for the UCM device
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/14
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/modules/alsa/alsa-ucm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index b7d2c5b9c51a..8df24e7b51d7 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -1730,6 +1730,10 @@ static int ucm_create_profile(
/* JackHWMute contains a list of device names. Each listed device must
* be associated with the jack object that we just created. */
jack_hw_mute = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_JACK_HW_MUTE);
+ if (jack_hw_mute && !jack) {
+ pa_log("[%s] JackHWMute set, but JackControl is missing", name);
+ jack_hw_mute = NULL;
+ }
if (jack_hw_mute) {
char *hw_mute_device_name;
const char *state = NULL;
--
2.16.4