Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3838780pxv; Mon, 19 Jul 2021 09:58:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz47weSE6Kp+G+HbESXzETmBfFeAbukzCVblq0JlNH10GBe2XGAKWG5CRrowEweeUxAB4nc X-Received: by 2002:a17:906:fb90:: with SMTP id lr16mr28223101ejb.541.1626713916517; Mon, 19 Jul 2021 09:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626713916; cv=none; d=google.com; s=arc-20160816; b=mo4BYsUolKsF/7dP8yNNNfW1dDfmOG5EufK2rDxHvJ+K/jj2NU7KcnKPuBi6Le8vrB sxqfTpnCc2JUmhnwWRfHdlTOmrZVTHunL9KJDN3M/631zEFVu1g/3GxoB+ycoRxldS0s XN5uveQ7DqiyVMdwabxzg3gkLhIw0nj2VzyBrd648W2n+7aSd6BHxhJV1G4+9wVB2WUw 6MU2x0eVvOVkyZBPX5T0TFAm8Lk4MG3/YZu8q1H34GyMY5+13b5qRi7/na8HY/VgNntv btLBi6JnvHk5FX6DSyqK6WPwbVM9qvskwkXaWsVfRxBWNFUljwjvwqaKg6gIM0jKWBWF 62TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=glJz+6fXqQdxCkhdPPPRWK1Iqk9dUlPwVg4m2O99GMc=; b=MimjXUc1oxH/406N1BtYHfEUJ/yKHpu3oTRy/Zexlji5Q5TB/Ev13ZidzuIvhBWGBW I1ZytLHkNfWFSjIMfhdyH7UgD1MWWF04OQjEle0tF9TNQrcxJRQNG+uO8d4UCS7lprWd cI+qvvlil3yZM6aBEeoVPjckDG+Jht4cChXG//J18u/brxP0Tol3IplRVt3K6KlzjtjO Yx8+EDH7ezwy0wLpNx3+V6/s+C7cx41o5D2HQ/J3DKPifiGcvQWIQh80X0qdOBgLNILJ 4I71ogFqw9x3TyP6DEcugSH4LBntBKgmsExD1Lb7LsR9mGAIMcNVZE5RpxeDCi7wm4Fq gleQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Us3kd1aY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m29si22436204edj.170.2021.07.19.09.58.13; Mon, 19 Jul 2021 09:58:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Us3kd1aY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350720AbhGSQLw (ORCPT + 99 others); Mon, 19 Jul 2021 12:11:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345457AbhGSPJX (ORCPT ); Mon, 19 Jul 2021 11:09:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C3507606A5; Mon, 19 Jul 2021 15:48:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626709729; bh=+UwK8f6qFkk6sE0w4N68AeWGB7dIv3vu+bt6wlyxoVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Us3kd1aYvfatwzrXVPcWkhWeo6WAdJUhLG4z0+UepDIdIvi/6ooOBhOOJK+OtpJ+I TChOVGy6+RkcIyEStjyyfgMweezG0iUGLPxDpUQPL6BtPt0uzY1vjN7ZcJAorCuL5G jlhS3aa+WtlxTLpl2hm27JHTCEwR7IHeB1NRLjXg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Geoffrey D. Bennett" , Takashi Iwai , Sasha Levin Subject: [PATCH 5.4 057/149] ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values Date: Mon, 19 Jul 2021 16:52:45 +0200 Message-Id: <20210719144914.919988622@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144901.370365147@linuxfoundation.org> References: <20210719144901.370365147@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geoffrey D. Bennett [ Upstream commit c5d8e008032f3cd5f266d552732973a960b0bd4b ] Mixer control put callbacks should return 1 if the value is changed. Fix the sw_hw, level, pad, and button controls accordingly. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164645.GA9221@m.b4.vu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/usb/mixer_scarlett_gen2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c index 9c98d5b79011..322dc5b6be63 100644 --- a/sound/usb/mixer_scarlett_gen2.c +++ b/sound/usb/mixer_scarlett_gen2.c @@ -1184,6 +1184,8 @@ static int scarlett2_sw_hw_enum_ctl_put(struct snd_kcontrol *kctl, /* Send SW/HW switch change to the device */ err = scarlett2_usb_set_config(mixer, SCARLETT2_CONFIG_SW_HW_SWITCH, index, val); + if (err == 0) + err = 1; unlock: mutex_unlock(&private->data_mutex); @@ -1244,6 +1246,8 @@ static int scarlett2_level_enum_ctl_put(struct snd_kcontrol *kctl, /* Send switch change to the device */ err = scarlett2_usb_set_config(mixer, SCARLETT2_CONFIG_LEVEL_SWITCH, index, val); + if (err == 0) + err = 1; unlock: mutex_unlock(&private->data_mutex); @@ -1294,6 +1298,8 @@ static int scarlett2_pad_ctl_put(struct snd_kcontrol *kctl, /* Send switch change to the device */ err = scarlett2_usb_set_config(mixer, SCARLETT2_CONFIG_PAD_SWITCH, index, val); + if (err == 0) + err = 1; unlock: mutex_unlock(&private->data_mutex); @@ -1349,6 +1355,8 @@ static int scarlett2_button_ctl_put(struct snd_kcontrol *kctl, /* Send switch change to the device */ err = scarlett2_usb_set_config(mixer, SCARLETT2_CONFIG_BUTTONS, index, val); + if (err == 0) + err = 1; unlock: mutex_unlock(&private->data_mutex); -- 2.30.2