ALSA: hda - fix the 'Capture Switch' value change notifications
authorJaroslav Kysela <perex@perex.cz>
Wed, 11 Aug 2021 16:14:41 +0000 (18:14 +0200)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:37:28 +0000 (08:37 -0400)
commitff60622b67aa0d35d3a002f7d5ba754ad71f2ee3
tree97920e0d9effd214e690b204e3c9584145cc6940
parent460e3534c37891e0493f88fbb750c75c51f307a2
ALSA: hda - fix the 'Capture Switch' value change notifications

[ Upstream commit a2befe9380dd04ee76c871568deca00eedf89134 ]

The original code in the cap_put_caller() function does not
handle correctly the positive values returned from the passed
function for multiple iterations. It means that the change
notifications may be lost.

Fixes: 352f7f914ebb ("ALSA: hda - Merge Realtek parser code to generic parser")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213851
Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210811161441.1325250-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/hda_generic.c