Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8090118ybc; Fri, 29 Nov 2019 05:29:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwtRNUWLOR2jwNAyS92jkJ8WgQbqeILkfRN5x0+gj7+Fgb68L1TLo+0mhb4zLbANHwJjN02 X-Received: by 2002:a17:906:2c01:: with SMTP id e1mr37135229ejh.260.1575034145820; Fri, 29 Nov 2019 05:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575034145; cv=none; d=google.com; s=arc-20160816; b=ddI+x7lTnqhkUG1lXM9ziIaa518IVXAAIaVc0nH6VHlHK87597BqGbzNd0cVmHMsxu RmGGQi+x1i712CoqlXxwXU5aQcH8GYmDgQR2JhDcartYj0ZhfhzdWUhg77fsuuzly836 mc8LeckFApQUhkaCfuyApsaE4SdwnXXGbZMvzQucgcLMHIqznn2VdgUaMdFUM1eQIA8J NJwU1CktRnVR75pOZRHcBUheF5WA5N1nKjyArS06bNVRjFFkgtS4lLAPF1v40VOzOXtd fwSuGKCg5RncP4FJ/eLPEUMOdUS0l/r3SjK+2E4bn9srjolFxlooIftDRLbMSxKksOBV QVrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wLfDQ5ajtCtjsZut+MHDTVTGUfN92CA1VMVGdXe6/IY=; b=wAZMhiENPHKLhMzx1Rn92NtuUj4570qQQqmN9EGwjH4tulbD2aMIjfhRc4Hvro5UZY PIDydQtgdvlAnMpN5aFyXp1JvoXRTVqLz8b6GEo9aDh0Wmli0mtOBJPxwaHR8BJ1arpI PFbhqZx+5co2+rL883h7S2ub51UVt8PJ703+FVJU8DA5rFrPtvLP1Kzg2lVa+qLhiTyk i283Yw3PtcSqhVG6j/NdY2ty5PVZYQIRuOyRaGIsgDHTAjmDbs9TwyKEz/tozlCo3fpm DNL6k2UUt+L3qm2WwnrGmAiv4OeGIpfvLKT1bVnLXJOyVfSQRov9jBlnicFQ23VZfgOb QtWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=s9zfE0mZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si14439061edp.264.2019.11.29.05.28.41; Fri, 29 Nov 2019 05:29:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=s9zfE0mZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfK2N13 (ORCPT + 99 others); Fri, 29 Nov 2019 08:27:29 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45457 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbfK2N12 (ORCPT ); Fri, 29 Nov 2019 08:27:28 -0500 Received: by mail-wr1-f68.google.com with SMTP id j42so9344941wrj.12 for ; Fri, 29 Nov 2019 05:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wLfDQ5ajtCtjsZut+MHDTVTGUfN92CA1VMVGdXe6/IY=; b=s9zfE0mZ46H/YCCF6SFMx+5kauV6ZRd5G/mkAxn2WUQ9jTi5/ICJ5UsjoHoaGzf0yt jICztwFjkmnOnPqaCM1Bofcnub9d9gBi8feCQ89IzLhHwezzaZrvWll2Kg3eZbKh3L2G QJo3cTnzarF65Hl+DfAIe41Doid3kjkXJULFBmzUcOW1juGWi7iPS1GG/PUovb4enixL uCELOoWEKc0QOjkHvHYvVj2GQrtAF1DiTAsxRShpfgDKDxV2LpEH4TQ2/vh7Ln5Oxcom U50W/UEB2WFlnp+fmicacfnyTc1ht0zbXtSu/wbQAJEdpjoey5NM0VM9DWbBGNOJF4/o suSw== 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=wLfDQ5ajtCtjsZut+MHDTVTGUfN92CA1VMVGdXe6/IY=; b=XIIA3ZOxQbJmzGaERcewdCgnQNsNscUvugQuvILvn6XV9EAD/WuTtRJuzcnEiu2lv/ mnC9BW7Qz+xOgUm0Yxnt2EXgE4KD04r4OAaRu8kuNR9fCZ2fhZb7rlUer2+ApQcZ7e+Z ZEQu1DT6hvIi35mPGifVCDfDd0ly36/+MgAVzL/QxLZk5tlp3IP6YLF260UuaIFgtuZ8 576q/lPyOmPtff+ZWSYHPdA19jkAXS0UssoRRSkKOXuwIxzmmv7UtHQ9Y7z7Kqjhiwi/ itmyvRwbNPrzuM71ZvVUZcRdXsPphLkEOd3AcsyB8rekUbh2qnSlIgvTz14Eznh4ShYK 4o8w== X-Gm-Message-State: APjAAAX+YGyruCNmKEltS8SN7f2JSbck5xj+GAF9YzQnqxebFGJ+vDZr qD/mt0X3a5R3/iEd5TDq4tHn1w== X-Received: by 2002:a5d:4602:: with SMTP id t2mr8447343wrq.37.1575034045218; Fri, 29 Nov 2019 05:27:25 -0800 (PST) Received: from cobook.home (nikaet.starlink.ru. [94.141.168.29]) by smtp.gmail.com with ESMTPSA id x8sm27151530wrm.7.2019.11.29.05.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2019 05:27:24 -0800 (PST) From: Nikita Yushchenko To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lucas Stach , "Andrew F. Davis" , Guennadi Liakhovetski Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Chris Healy , Nikita Yushchenko Subject: [PATCH] ASoC: tlv320aic31xx: Add Volume Soft Stepping control Date: Fri, 29 Nov 2019 16:27:19 +0300 Message-Id: <20191129132719.11603-1-nikita.yoush@cogentembedded.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chip supports soft stepping of volume changes and it is enabled by default. This patch adds a control for it, so it could be either made slower (two sample periods per step instead of one), or disabled. Signed-off-by: Nikita Yushchenko --- sound/soc/codecs/tlv320aic31xx.c | 8 ++++++++ sound/soc/codecs/tlv320aic31xx.h | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index d6c462f21370..31daa60695bd 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -275,6 +275,12 @@ static const char * const hp_rampup_step_text[] = { static SOC_ENUM_SINGLE_DECL(hp_rampup_step_enum, AIC31XX_HPPOP, 1, hp_rampup_step_text); +static const char * const vol_soft_step_mode_text[] = { + "fast", "slow", "disabled" }; + +static SOC_ENUM_SINGLE_DECL(vol_soft_step_mode_enum, AIC31XX_DACSETUP, 0, + vol_soft_step_mode_text); + static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6350, 50, 0); static const DECLARE_TLV_DB_SCALE(adc_fgain_tlv, 0, 10, 0); static const DECLARE_TLV_DB_SCALE(adc_cgain_tlv, -2000, 50, 0); @@ -306,6 +312,8 @@ static const struct snd_kcontrol_new common31xx_snd_controls[] = { */ SOC_ENUM("HP Output Driver Power-On time", hp_poweron_time_enum), SOC_ENUM("HP Output Driver Ramp-up step", hp_rampup_step_enum), + + SOC_ENUM("Volume Soft Stepping", vol_soft_step_mode_enum), }; static const struct snd_kcontrol_new aic31xx_snd_controls[] = { diff --git a/sound/soc/codecs/tlv320aic31xx.h b/sound/soc/codecs/tlv320aic31xx.h index 83a8c7604cc3..0523884cee74 100644 --- a/sound/soc/codecs/tlv320aic31xx.h +++ b/sound/soc/codecs/tlv320aic31xx.h @@ -218,9 +218,6 @@ struct aic31xx_pdata { #define AIC31XX_GPIO1_ADC_MOD_CLK 0x10 #define AIC31XX_GPIO1_SDOUT 0x11 -/* AIC31XX_DACSETUP */ -#define AIC31XX_SOFTSTEP_MASK GENMASK(1, 0) - /* AIC31XX_DACMUTE */ #define AIC31XX_DACMUTE_MASK GENMASK(3, 2) -- 2.20.1