From patchwork Mon May 6 20:30:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Curtis Malainey X-Patchwork-Id: 10931899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C26A924 for ; Mon, 6 May 2019 20:31:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39A5C2880D for ; Mon, 6 May 2019 20:31:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D475288B9; Mon, 6 May 2019 20:31:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D22F2880D for ; Mon, 6 May 2019 20:31:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A2B9A18DE; Mon, 6 May 2019 22:30:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A2B9A18DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1557174698; bh=+OWYS/6XPNQRoLC30wdJ5LSimZ2FY+tWht8zdPeAk9Y=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=lZOqJqxWa7SfmFkh1vxhZSCTw2GMovkSqUFM8kU+s1xu6d9Nj99miNw/uLaqafn2R xVimJIAI40ZdL3JlTBSgWijTV4O13xNB+PvoBzEAtuARfcWjIwRd3FHyAIw0jrRKR6 9pJkpovppY3s1hzDvBIiWaWhKQF0BSYf7ZGXBdso= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 25628F896E6; Mon, 6 May 2019 22:30:48 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E987F896F0; Mon, 6 May 2019 22:30:46 +0200 (CEST) Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A4B8FF80C07 for ; Mon, 6 May 2019 22:30:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A4B8FF80C07 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="b4D7egJl" Received: by mail-pl1-x643.google.com with SMTP id n8so6929426plp.10 for ; Mon, 06 May 2019 13:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UCCGBgY8OAMupXXew8IzoqONgWAIon9ttkHZd9yTQZY=; b=b4D7egJlPUqct4lKLm15EHD0RHM1FTyrAKDr8jgb1vioWZPwHGZLKhxvPMNo0R73tg YCsN/VkXMLge6NMt9shSqOK00iZSB0p2oxF9LQnSwyiyrA9qvBMeyEwWTayegfgYXBY7 Cg/BxSnBXiyuzFvT9CHuIgdPW0FsuLL+LMCIA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UCCGBgY8OAMupXXew8IzoqONgWAIon9ttkHZd9yTQZY=; b=Fc8DzxBL31NwgwyXqeckRy7E4S6DvG8NQhRt2kJSZU3gcXAs0lac6KsnqylYp2oe59 +kSVeWZ9X4efPKohREL2GqKF7MYfNuUK3MZuiACfWSKMepyPbH8rF/VKKAotKa5dzInN iMQOCgwWhLmNG18RFvfpce/n5hdT4LlkB6SURM1O4UFlx83TBnrxZ6GQ3DNZL7vt3J7F gVJj4YkcppQz64sUb78PKvYcrKgfuHsxx9RWTjLv/g02N9K/zs7U4zb8hKsx022r7+76 mXxukEnLcaYH3/ueNzV1yn8fdpeNXXem4DSVMXuzHgdaL1Ye+iiVx2hlYGPWU2pZG+SA IPwg== X-Gm-Message-State: APjAAAXSmvGExdCTs13RO9pMNrUDlzRCGqk71+H2/AWXlGmvfW7TY5/P 1lmfdRpQFVji/HevDTIaOM40LzeBcA== X-Google-Smtp-Source: APXvYqwpdSgnpgNhdc8V7MO6+g/pOaxm51VldZDMjenwnOgZKrsWuCGNoGjB7SZ+qANVSlHTAUV8uA== X-Received: by 2002:a17:902:28a9:: with SMTP id f38mr34666433plb.295.1557174641325; Mon, 06 May 2019 13:30:41 -0700 (PDT) Received: from localhost ([2620:15c:202:201:c87a:31ae:9107:f63d]) by smtp.gmail.com with ESMTPSA id q5sm17619477pfb.51.2019.05.06.13.30.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 13:30:40 -0700 (PDT) From: Curtis Malainey To: alsa-devel@alsa-project.org Date: Mon, 6 May 2019 13:30:06 -0700 Message-Id: <20190506203006.161158-1-cujomalainey@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog MIME-Version: 1.0 Cc: Oder Chiou , Mark Brown , Takashi Iwai , Ross Zwisler , Liam Girdwood , Hsinyu Chao , Bard Liao , Dylan Reid , Curtis Malainey Subject: [alsa-devel] [PATCH] ASoC: rt5677: use more of the volume range from DACs X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Dylan Reid The DACs volume can go over 0, both according to the data sheet and real world testing. The control can go up to +30dB. This was tested by playing audio at full volume on a samus chromebook. Signed-off-by: Dylan Reid Reviewed-by: Hsinyu Chao Signed-off-by: Ross Zwisler Signed-off-by: Curtis Malainey --- sound/soc/codecs/rt5677.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 6fc70e441458..907c957b614d 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -832,13 +832,13 @@ static const struct snd_kcontrol_new rt5677_snd_controls[] = { /* DAC Digital Volume */ SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5677_DAC1_DIG_VOL, - RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 87, 0, dac_vol_tlv), + RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 127, 0, dac_vol_tlv), SOC_DOUBLE_TLV("DAC2 Playback Volume", RT5677_DAC2_DIG_VOL, - RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 87, 0, dac_vol_tlv), + RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 127, 0, dac_vol_tlv), SOC_DOUBLE_TLV("DAC3 Playback Volume", RT5677_DAC3_DIG_VOL, - RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 87, 0, dac_vol_tlv), + RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 127, 0, dac_vol_tlv), SOC_DOUBLE_TLV("DAC4 Playback Volume", RT5677_DAC4_DIG_VOL, - RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 87, 0, dac_vol_tlv), + RT5677_L_VOL_SFT, RT5677_R_VOL_SFT, 127, 0, dac_vol_tlv), /* IN1/IN2 Control */ SOC_SINGLE_TLV("IN1 Boost", RT5677_IN1, RT5677_BST_SFT1, 8, 0, bst_tlv),