* Patch "ALSA: hda - Check all inputs for is_active_nid_for_any()" has been added to the 4.1-stable tree
@ 2015-09-11 22:17 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-09-11 22:17 UTC (permalink / raw)
To: tiwai, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ALSA: hda - Check all inputs for is_active_nid_for_any()
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-hda-check-all-inputs-for-is_active_nid_for_any.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9d2b48f7304aafaefbf0794a556ab4e307929d24 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 24 Aug 2015 10:45:27 +0200
Subject: ALSA: hda - Check all inputs for is_active_nid_for_any()
From: Takashi Iwai <tiwai@suse.de>
commit 9d2b48f7304aafaefbf0794a556ab4e307929d24 upstream.
The is_active_nid_for_any() function in the generic parser is supposed
to check all connections from/to the given widget, but the current
code checks only the first input connection (index = 0).
This patch corrects the code to check all inputs by passing -1 to
index argument.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/hda_generic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -671,7 +671,8 @@ static bool is_active_nid(struct hda_cod
}
for (i = 0; i < path->depth; i++) {
if (path->path[i] == nid) {
- if (dir == HDA_OUTPUT || path->idx[i] == idx)
+ if (dir == HDA_OUTPUT || idx == -1 ||
+ path->idx[i] == idx)
return true;
break;
}
@@ -682,7 +683,7 @@ static bool is_active_nid(struct hda_cod
/* check whether the NID is referred by any active paths */
#define is_active_nid_for_any(codec, nid) \
- is_active_nid(codec, nid, HDA_OUTPUT, 0)
+ is_active_nid(codec, nid, HDA_OUTPUT, -1)
/* get the default amp value for the target state */
static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,
Patches currently in stable-queue which might be from tiwai@suse.de are
queue-4.1/alsa-hda-fix-possible-null-dereference.patch
queue-4.1/alsa-hda-fix-the-white-noise-on-dell-laptop.patch
queue-4.1/alsa-usb-add-native-dsd-support-for-gustard-dac-x20u.patch
queue-4.1/alsa-hda-fix-path-power-activation.patch
queue-4.1/alsa-hda-check-all-inputs-for-is_active_nid_for_any.patch
queue-4.1/alsa-usb-audio-fix-runtime-pm-unbalance.patch
queue-4.1/alsa-hda-shutdown-cx20722-on-reboot-free-to-avoid-spurious-noises.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-11 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 22:17 Patch "ALSA: hda - Check all inputs for is_active_nid_for_any()" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).