Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1145485pxv; Fri, 9 Jul 2021 19:27:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW2Na67fMiQ7vrcgEt8rIAo/I7t6EnK21WlPVwHoSySRooNeTuJ8//E9kOgRh2p3S8r1ia X-Received: by 2002:a17:907:f8e:: with SMTP id kb14mr10419322ejc.40.1625884055825; Fri, 09 Jul 2021 19:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884055; cv=none; d=google.com; s=arc-20160816; b=oOYYWig09iWJzo2cKNThbLipTBTBKzUFnn0UEsS1YnyGLBy9asRT+WBfecW8nu2MYj cooy9Gahby1EUl322JT1Pg5FvaXVbDGZ/ThM5iUs90qC6bssHF3qKus10lz4mA9EWP9f vjny8wZFb5r824BApi3cHweMlmy3FfTD2iApDL1nXies6k4FA+8SxwgswH24OC94rsHr GM7+2pGkqJgreGrb7cFJIEKW6Le9GDgSs+h+hvzqLF+woEBHIwv42M8V+yLIWvT5aJvl ZYwRd2tBeIeEZhBG+3chp49bnw1aLmWcBTLucVYV90Y6aL3wTfQkxZ9wfxuhkcJ+w8+3 4azw== 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=NmfrdjQobsP4iRAG+0fUNMigrgtMXYlgdkF0YT9jq3Q=; b=ZcGvDsXnU1GtD8KcqZOXKymi1Ve2Ecf5CLKrPFc4gqrQtfrQgfFaWr6WRC4csB4XDF eecbwmGrUwpDSNeUoDBwLBsCRXXytbCVF0n1NNaRn5jF2STUgZDeYkPIeEY3FTLAVPr2 f2JIdnfm+EAifcI85YqLR+NL0Pw1jkz74ks1ydI5qXs6mTiuVwlxfn6BpVFXMtZJPknE 9ho5Tfo9nHRZV0WpVsfn4js4qxDO5+BO74q3nRqaokDNg1ad9eWbc4P6ko+Nz3CcsmHS TAuLlkB/sE7nyTp6Lc0G/lQU6Y9/+hNC6RUo6YEPnUvrkzTCg4tYnCp5zys2J7FJ31Nq Ckhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WjCrZ/mP"; 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 hx8si8844532ejc.522.2021.07.09.19.27.12; Fri, 09 Jul 2021 19:27:35 -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="WjCrZ/mP"; 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 S233459AbhGJC2c (ORCPT + 99 others); Fri, 9 Jul 2021 22:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232734AbhGJC0z (ORCPT ); Fri, 9 Jul 2021 22:26:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23CB06140C; Sat, 10 Jul 2021 02:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883841; bh=q6r+96DNfehs42FToLeU7CUqZMXqYiP4s8FIw2Wg+/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WjCrZ/mPvbBrlE9w458mYRrJ2zVZxVEbKC+DUCHZ7rIM7L7jbl+w2I45zhoSfdhB7 OztXbkLNbZ6QU+vYiw+seabQW9AGmpy9PU3RioW/WfN0AsWoDIpotAIiwlmjYBiSDB DeCBfXrJhw1BnTy2t/obZtblYqsYcUS84fVP213gAh+8w+Bh8bmGx9zIwmYGgYQVub lUwVyv89KEZzD3yiHWOIJnuVds1tEURbX/WK+bp0Uh/gaV+EkIfU2fUkI13GPrsAmK /4jxRzFfFZp5an8L426Pd8gz7kvdahbk4JGX6UI/E/x1BgnOcq0bND+HaMOuJ9lVDb Mlpd7m3GVjoUQ== 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.12 087/104] ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values Date: Fri, 9 Jul 2021 22:21:39 -0400 Message-Id: <20210710022156.3168825-87-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-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 63d6a5e45ba9..a829c3c7a30c 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