Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3172975rwi; Sun, 16 Oct 2022 06:29:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4D4m9ZHjbHrVLNICyur7ZUC0RDBLh2Vr/1RFU4t8Hhdxi+KJ5re8jCSooX6QsBk3Fq7U6o X-Received: by 2002:a17:907:72c1:b0:783:34ce:87b9 with SMTP id du1-20020a17090772c100b0078334ce87b9mr5126383ejc.115.1665926973236; Sun, 16 Oct 2022 06:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665926973; cv=none; d=google.com; s=arc-20160816; b=cZQ5aDf2Oq8ZFRCscoTjW6soBYRB53YbDTp8izeEZs0saUF5bnt9SPQznJAsu/wO7C wKYJcJUfBGO2inFpqcvaTMVOhJTg28MC4BbFZgO9WZcpEBlgg+2NqIwe/Er8bPnVnCj+ ZltylTQSNxcaPlwZ3N7yjdOqT7BEOWgNepvy3FDwt+rIGG1rysaxelEu1S3lRk6KU30x KgIKGIFPRRUwO+6RhmSkgssUtpYENtvAVx8JeIWybEo7e/bV/6539KlAHAKTziHvYXYq qgXmDJgQbJyBkhQm3rMJ1UD9uQcnqOCEal5qc3UqtrLyDVQVlfdczOikgZbOMonlgSbR DxfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=IQsANxIEHACjEO789UfrDxMr8VcVkScq/x+QZ4UQMEA=; b=vM0t3Bw6F+ZNVFL6gav7FsWwfm6XpIwrwJuWh1vgOB3nznfpNsg/MmqxjcbSNE09lA PsCumQJqDm/vhPneNyCArCEM7d6DUjbeHzvs4Ojd00XAGUkAujtt1xp5GztDI7iHaDD8 v2pfwBrwV7i4n6wHVsKQ+X5y7Y5VXehwEXfpGjMYsbX/wIKSguV/fNzwG6cV3WtWuPQO enYCbjNhQTj7T+7b3OwOxfKUSH8XsD5j/zqxp4vUAeb+aZ+0Lhm8b2hGF6DSgGfj4EU0 ukB7byqHZC7qnnqhuPh++Lnkxi80twDLBbYfup7kSTl6rE8Ebv4HwU3RNWQsoQ2CxwLZ iJ3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=kJ4NshSV; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg16-20020a170907971000b00782686da1d1si6373735ejc.761.2022.10.16.06.29.06; Sun, 16 Oct 2022 06:29:33 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20210112 header.b=kJ4NshSV; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiJPN14 (ORCPT + 99 others); Sun, 16 Oct 2022 09:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiJPN1s (ORCPT ); Sun, 16 Oct 2022 09:27:48 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8EEF7654; Sun, 16 Oct 2022 06:27:47 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id s30so12681075eds.1; Sun, 16 Oct 2022 06:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IQsANxIEHACjEO789UfrDxMr8VcVkScq/x+QZ4UQMEA=; b=kJ4NshSVOAuSzJGz7Jj9SJ0xMOEi4H/WlYotPjjJejZwXBfKwe4D3mFeklshKLJi8L 6lKCCypWJrFHTNrH127vr77kV0vifbz2zlgt2b37KKhI0PzdAGn5VLNDFaaTuqmbrX5e x+7riGpjdchVyrlR2P8JgHKB0T87pb/xCaiV4GPgAN5uxNwNs6njn9Rqhjo+We4mBKgv W2dof6GFySiw0JHaFysHlrhWFeVydnAUY5zHs+yAv9wvzIcc68Z4E5f3RXBPgf/jWPe2 Sp3tXYuXlgzwm497Zx/EzipZu3TjEOLazm4vW3m24a6k6nQ3RUrR8WeLrThXidy9tvtJ nOQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IQsANxIEHACjEO789UfrDxMr8VcVkScq/x+QZ4UQMEA=; b=7OgaTrBQZ9LpHEdOMfDWsmiMajqh1S6WMylI1zI8y3BgCtF7990G8B7jLH9w2kBz5j SBQGJnR3cNQfHHPIYdNZ15J5X8IyrB2s8gvT5sYh+evXz9nvwOUywoFUoCR5zCC/SfNN zK6KlaUN+F8LThYokTFE3y4WO9zWbdNOZh54QkOwUVbQ5dilG6PsSntqmNlryZFsaJtw C3ekAWTCWXfBVePyDm8qIwmt4LPTQ+ySZXBP/Fo8pyUOHq48OFA22AmalNhP7OWhx7DT NHGzwywGmJa6cS7ewBTJFWhAfNfZqhTSQBTDTxAvmpHVZLI+COhfVb5YE6DdSvYMLVlk fgDA== X-Gm-Message-State: ACrzQf00N76fVy3fxBx45v6ZQBPKMsXgo04lRoOvjhNifLI+XK2n+ddN /v08OD44xdoxyYGxmZPNhFQ= X-Received: by 2002:a05:6402:35c9:b0:45c:de2e:ae1c with SMTP id z9-20020a05640235c900b0045cde2eae1cmr6163562edc.393.1665926866448; Sun, 16 Oct 2022 06:27:46 -0700 (PDT) Received: from hp-power-15.localdomain (mm-39-7-212-37.vitebsk.dynamic.pppoe.byfly.by. [37.212.7.39]) by smtp.gmail.com with ESMTPSA id y5-20020aa7ce85000000b0045c72bba0bfsm5572057edv.4.2022.10.16.06.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Oct 2022 06:27:45 -0700 (PDT) From: Siarhei Volkau Cc: Siarhei Volkau , Paul Cercueil , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-mips@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/7] ASoC: codecs: jz4725b: fix reported volume for Master ctl Date: Sun, 16 Oct 2022 16:26:43 +0300 Message-Id: <20221016132648.3011729-3-lis8215@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221016132648.3011729-1-lis8215@gmail.com> References: <20221016132648.3011729-1-lis8215@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 cc7a48c96..72549ee2e 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.36.1