Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp589503rwb; Sun, 6 Nov 2022 10:22:59 -0800 (PST) X-Google-Smtp-Source: AMsMyM6lIs874iMB/xhTExO2KC5ngFTxP25MOOKkZurtb3omvBuKvMLk2a4eRSAy1omjT2fEBFCe X-Received: by 2002:aa7:c389:0:b0:463:5926:7254 with SMTP id k9-20020aa7c389000000b0046359267254mr39019576edq.255.1667758979465; Sun, 06 Nov 2022 10:22:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667758979; cv=none; d=google.com; s=arc-20160816; b=nbQdabDppzU7UsGfcKlWF8NcQhKOmmWq5TLG/RS3v2Y2Nwnhr6Gn8Vs1AfLenToH43 WhuqlqB2x28qUoH8C93pWWdgXY+761ff7/8nbEdGzizzPEtpbgdsDUYMJYEZvG1IRogn RDNRmIwPRRO0Wv9E8IMZHXZqeVGXJTbr1c60BhA1D4iAWAjDSq6mzTRjnWzuZUR5MOej o2WoWi6HMd/N9aPDgKD/6Q5Vd5+9R6w+x6BIUvtj+l5vL3pUwyW4HpsxTZnxZQT0J36/ yQSFmq5a87TDLJQyyHWDnMa53HCDXntyeZtBdes9VxY8EeHVANwKEhg1JditmktGEBW5 KkUw== 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=hVsNwWmcMUnBXK6qkuKiBsKREgcLE7kCe0s9z3zbECY=; b=hohkofbBsItt/9QGFFMHA7ZCeengYpN19VQS+VIdvndah1FFb4d/vBUxGnB8skRgmq wJ9JU4Uu8ary28rBXPvOta6d1SzY1FhOai+71pHo+ZwCkm39r+cr4xFKoBo8+J4yFJjb sbjcNXao/bm0mRlQdSmX+/WPIpOY2F+VwrUE5Ok1gX/iwZ7kMrSWPbuLds9+BKMidkqB Yvpa147FAiipkObsWRX08gfu6wBRZ7/hdlgja/Iys8iZZXTATc6iECQY6xL/ogCN2O6l xIclwwh35mwwb5Ueh+FMvA9rA+RgvM6E3jzFIye8sNSmwDgT5qAEFA64+hmMqiV3/2ne 71+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uIxIM+cV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170906728300b0078d550c0272si5784033ejl.269.2022.11.06.10.22.35; Sun, 06 Nov 2022 10:22:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uIxIM+cV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231215AbiKFRMm (ORCPT + 96 others); Sun, 6 Nov 2022 12:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbiKFRLm (ORCPT ); Sun, 6 Nov 2022 12:11:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6DDC14097; Sun, 6 Nov 2022 09:07:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61EE160D3C; Sun, 6 Nov 2022 17:06:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C654EC43144; Sun, 6 Nov 2022 17:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667754413; bh=dPYviG2x1KuTLEznEqp0BpXt7OOMBWQoC0Si/zlHnRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uIxIM+cVUkalFm7jehKSbl6v3kfyRxdRcuymSFO+wc9oPZ2NaMfrknhfgT5kP86VK VTI+goPCzlbTA9n+akNoNHh5Ijp6PWgfutiq+ztwQH5bxhsx40xI42zror8dIHigXb CSXnqnfXIdumbuImDV35Cg2VDe989p1xj1cv3lmqIcacdyYkSV4Bgt7guNmkibLSor /txfiykzl2rJL5prszeaMUuiuEiCAIt1FIJJbxMaGNf0yiTABNw0Tk4k8He0QpdIbv +WQrkkDC7eZ/0B2FHw8cnrIkUToRTK59+ujB8ppWQmf9Y0ECiHkTIPobSEv+zUC1VO Q+22GsMLP97OA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Siarhei Volkau , Mark Brown , Sasha Levin , paul@crapouillou.net, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, linux-mips@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 5.4 07/12] ASoC: codecs: jz4725b: fix reported volume for Master ctl Date: Sun, 6 Nov 2022 12:06:31 -0500 Message-Id: <20221106170637.1580802-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221106170637.1580802-1-sashal@kernel.org> References: <20221106170637.1580802-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Siarhei Volkau [ Upstream commit 088777bf65b98cfa4b5378119d0a7d49a58ece44 ] DAC volume control is the Master Playback Volume at the moment and it reports wrong levels in alsamixer and other alsa apps. The patch fixes that, as stated in manual on the jz4725b SoC (16.6.3.4 Programmable attenuation: GOD) the ctl range varies from -22.5dB to 0dB with 1.5dB step. Signed-off-by: Siarhei Volkau Link: https://lore.kernel.org/r/20221016132648.3011729-3-lis8215@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/jz4725b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c index a04b8d5d1ded..1f7a234266b9 100644 --- a/sound/soc/codecs/jz4725b.c +++ b/sound/soc/codecs/jz4725b.c @@ -142,8 +142,8 @@ struct jz_icdc { struct clk *clk; }; -static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_dac_tlv, -2250, 0); static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_line_tlv, -1500, 600); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_dac_tlv, -2250, 150, 0); static const struct snd_kcontrol_new jz4725b_codec_controls[] = { SOC_DOUBLE_TLV("Master Playback Volume", -- 2.35.1