]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices
authorTakashi Iwai <tiwai@suse.de>
Wed, 13 Jan 2016 06:20:13 +0000 (07:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:25:46 +0000 (11:25 -0800)
commit c4a359a0049f2e17b012b31e801e96566f6391e5 upstream.

The commit [da6d276957ea: ALSA: usb-audio: Add resume support for
Native Instruments controls] brought a regression where the Native
Instrument audio devices don't get the correct value at update due to
the missing shift at writing.  This patch addresses it.

Fixes: da6d276957ea ('ALSA: usb-audio: Add resume support for Native Instruments controls')
Reported-and-tested-by: Owen Williams <owilliams@mixxx.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/mixer_quirks.c

index 3b4f3accfb39878ff6fd8ba3bb41544d75f92032..4aeccd78e5dca7e14ffa0f4bb21dc602449dac06 100644 (file)
@@ -793,7 +793,7 @@ static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
                return 0;
 
        kcontrol->private_value &= ~(0xff << 24);
-       kcontrol->private_value |= newval;
+       kcontrol->private_value |= (unsigned int)newval << 24;
        err = snd_ni_update_cur_val(list);
        return err < 0 ? err : 1;
 }