Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1148711pxv; Fri, 9 Jul 2021 19:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwv7EBaYxUGrMc0+yWzJE9J8li/eyHhvhHjL7Hc2mAaUK2W5QiCicJs5g1wb2wBRivmu0f X-Received: by 2002:a17:906:3cc:: with SMTP id c12mr39222991eja.268.1625884449136; Fri, 09 Jul 2021 19:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884449; cv=none; d=google.com; s=arc-20160816; b=CyCO3onqcHsLXIP8DtnzRHABJ5kyDY+KtcrSOWGAUX5wSAYHNXIdg5gXVE3Sh0Ln7R qoiOiaNOskLaYOy+jyIy2SHUUa0QBziGYWWyfU9oPOdBA/tB3AgLKc/qBC+DNbyIbFx2 Az/QFs5TTc7321b00uoeB6jovlxzI6zpZmLjyBNHKJBhhBSy+xK01FxF8xBE47b3IdZN VX87QpX53cyh4D0G9TI8L2y+BU2NT5HNxN+vWwQowBhPs0YHkcnu2bvAtIMvFJk0+vD6 +tqmZepzEEA+PLT1OtSM+u2ZNB0Olr2bB7/ysBwDhUJGtVW7ZXIZZGSClr4SwCZiTKV6 Af5w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4JgLEwi3jHQO8FtRfkV4J9O93DejoxPnr6XsXAbj6+4=; b=NU/H697iHsPc0KYgzCtwRG+5vf4DYB7WuUCPw6f84K9ktGkDNsQCmy+XhzGn3Lj0nd U42Wg66X2V0dU34t2d3ziFzwX2hHPPruayx022Lv0y7usAiZPIdGKluWrAeLd5qveFlD jS7+X68mwvp1e6iHp8ksHCTI2JFRnRUgqe7A9ng0BaIee67qk55RMoQzCR1WFH6X0QS9 Sk8v6zZNuROEw8yRZWBIg7H6e+wO1tm4d47FPRCPMxf7gknKMPmEmjW+TJBAaCQtd4qi wZTeeCTTg8C5WMrQOsgHDX3QFD3mKjr05MwhJOvQT+DdHQcXc5CqWT9aGHBWk9zbrSKB jclg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JxOruNnh; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si8892703eja.301.2021.07.09.19.33.45; Fri, 09 Jul 2021 19:34:09 -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=@kernel.org header.s=k20201202 header.b=JxOruNnh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbhGJCeD (ORCPT + 99 others); Fri, 9 Jul 2021 22:34:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:42072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234552AbhGJC3g (ORCPT ); Fri, 9 Jul 2021 22:29:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45FAC613EC; Sat, 10 Jul 2021 02:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625884002; bh=+LhxwBibXRQ5l/QynWgJsvH76bQGxqUWcJJM6c8JUbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JxOruNnhwiOrBMLXzTPGAxH3YZm/QOhvJNC0s+ri9frJzoAM67SOIiNK+6NVpa4WZ pYn7lkMAIqoQ+0NIlWRjR5u5A/5KTPZxWxhSPuCpcLIdR5FNSf6/SDBuJAvV0+PoQl 5TxP5uW/XO6Yo6iz5+r+1JPpFZSnaj58NgMYt9VurjM6DHDX9TYGSu0MeOWbgviU+T mAywpbHqljO2aAFr04y33WBOR4xWs4hQTTtKq4KxIxok+oGB8qi6NUaExA34yp+V7B O5YNVel2f3QbkTqUgLLhWsSquAjdDPzT8/TfecpiA+xVrPyAguwCpnnBIGoAcZeadq ARMIwrE9Fbn7A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Geoffrey D. Bennett" , Takashi Iwai , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.10 77/93] ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values Date: Fri, 9 Jul 2021 22:24:11 -0400 Message-Id: <20210710022428.3169839-77-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 38b3a0352b24..6d7805d3c39a 100644 --- a/sound/usb/mixer_scarlett_gen2.c +++ b/sound/usb/mixer_scarlett_gen2.c @@ -1179,6 +1179,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); @@ -1239,6 +1241,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); @@ -1289,6 +1293,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); @@ -1344,6 +1350,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