Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp415318rdb; Tue, 16 Jan 2024 04:33:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCtg+FXQ2V1n5MRJECxUkQv/nTJUNz4VdlJ8cLGjcYk35uyqcc0HRyDGrlN6niaKdN3jgD X-Received: by 2002:a05:6870:204f:b0:203:89c2:517e with SMTP id l15-20020a056870204f00b0020389c2517emr6576116oad.95.1705408399298; Tue, 16 Jan 2024 04:33:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705408399; cv=none; d=google.com; s=arc-20160816; b=fmNFUzidP7JE8NZSuz/RzHkqFYOr7CbzpKWQKA2iCSxKJmsl38Ei9siNvHNvlU2DfX p/SWxuj4ehFjvjgaln/dSd9j2IM6oR5UmaLu36ySm/pSvwwiRK1BPnP5Z1U8m1dsRp/i ghNxAHD8atO3cJ86ttgtI8JLxy+y4zqw2ywcNljj+k/0Nchqc3li/7xvcvi8N2E9cYGA cO+71yEgT2SVf4Pkzam7A5Mw42xsaiIZyqsxDxEFcuSSxEyDOh64v1KDWyb0Z08eG9K9 5dkTP/SpncLZeG+tGH/5TvZh0+8Q2qwuzd2Cr0AjbOWUOl3EujHgJm/k+KIcFgmH9piy /plg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=OhwDIlaEEN6IPWd1oZ/unSnl3T485q1gaJvRsEwi2vU=; fh=wV/HKdoXqD/QUSQtD4Gu0auKi9hIjQBQw4bLjr2hJc4=; b=tux7FyhWjDD/OM0c61hGqcHLEj7ZwOL04d/wnaheheyengE6egmXh5kx5wMEvvBiBJ mP23517fpwZX2oeCw7wuCpZ6pV+IRQiQs8IQAZuzSHeYu7p2l2u4LpEsWtSOjHZJ+qYq 75P4p2QffiNG4KAxTsWLKUzXWrDM/nUk+9+Skx58xLEssRi/Ooxuxhuc3Tu38vIObMCS qVraOd2CSWHg2Ru0sn5BSj3oAyL9T9iKrelQbMe01CZgBxvRf84P5a/GTzWva2EU4+al gd7ywbBO4+XK2VuKyg5HJw+Kn0xteFxqIsr8DtEQ4+R+4FIJqLmDhZq0skaY7mqWuwyy 2eRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mxo/VPcv"; spf=pass (google.com: domain of linux-kernel+bounces-27382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r5-20020a0c8d05000000b0067f2c590fd8si9372994qvb.527.2024.01.16.04.33.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 04:33:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mxo/VPcv"; spf=pass (google.com: domain of linux-kernel+bounces-27382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0E6211C233DA for ; Tue, 16 Jan 2024 12:33:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C2E01BC2F; Tue, 16 Jan 2024 12:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mxo/VPcv" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F336719470 for ; Tue, 16 Jan 2024 12:33:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3376ead25e1so7694110f8f.3 for ; Tue, 16 Jan 2024 04:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705408389; x=1706013189; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OhwDIlaEEN6IPWd1oZ/unSnl3T485q1gaJvRsEwi2vU=; b=mxo/VPcv9Ze9RQggQ9I99Ox+u2jh/Jye1O9yGDmvkEWHU9UNuo4QH5EKwX89DKmxLW ZFDuwEGTz1iJiCx3ODv6oeaD4G7unkZkG86hrdHNOCm6FJ/jtJn8qHO2kshWjNcQxueI 9QMOuLOKqjptvFSpN1YgHLd54PYmW09W85OVs72ta7pV2SPkExBUKA6UsQ+Q7o9k1d+K hdwB420AuiYlwNpjcgswD9jNX6zFYWX/M+xL60Whx4gNuPNYulWsjHo/kRJN89PTyYEL CrPX3pbuIB6gPWQZ5sbveL3KBqC6XEgV+8JmhrJzykDTM1LpvSfVwhNpGGwZIhDEsmQp DTgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705408389; x=1706013189; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OhwDIlaEEN6IPWd1oZ/unSnl3T485q1gaJvRsEwi2vU=; b=SLq2SZSHAKrXe/supL3QsQBxJ0PikfZZhEJ3TvrMB3nNr1ITMsmjl+yVzN/EiWeXw/ KFNcUvTCwYSd4KB+bxy9iYlzkuMpUCzD0doucLKqxfx/XwfR4dNSzpcZrxQO0SL+bNyX I8aV6FWQhz82rx4GwkCm2dAd92lhG28HzBvzPL0jHb3mJB6q3xQ5RqvOwMkCsdyfKFWZ FtZ+/Jb9ZMeibfdwAB9/IGfBLPRnhfyUWG9fV1k/IjgZ8+dhUKTTOfJ7F1x6fRSjsOwa gkqaN3c49w0JlAFAQlS5JEpgX6Z0xKp6t1y++U9DP4m0aSiIz69rNFenVex9F/k5LkAr jpjw== X-Gm-Message-State: AOJu0Yxf3olit0jE2XGTatU2djVnjkxrWDab/UOySUmZTfNpdTac4IOh P0Io1CxL04Xikt692yW84oUE30OEIU5WAA== X-Received: by 2002:a05:600c:45d0:b0:40e:6ee8:c13e with SMTP id s16-20020a05600c45d000b0040e6ee8c13emr2391947wmo.197.1705408388946; Tue, 16 Jan 2024 04:33:08 -0800 (PST) Received: from [192.168.1.195] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id p12-20020a05600c430c00b0040e596320bfsm6855662wme.0.2024.01.16.04.33.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jan 2024 04:33:08 -0800 (PST) Message-ID: Date: Tue, 16 Jan 2024 12:33:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/7] ASoC: codecs: msm8916-wcd-digital: drop dead gain hacks Content-Language: en-US To: Johan Hovold , Mark Brown Cc: Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240116093903.19403-1-johan+linaro@kernel.org> <20240116093903.19403-8-johan+linaro@kernel.org> From: Srinivas Kandagatla In-Reply-To: <20240116093903.19403-8-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Johan, did you see any issue with this codec? These are not really hacks, to make the gains effective it has to be applied in a particular order. On 16/01/2024 09:39, Johan Hovold wrote: > - /* apply the digital gain after the interpolator is enabled */ As you noticed in the comments, the gains have to be reprogrammed after interpolator and its clks are enabled. > - usleep_range(10000, 10100); > - snd_soc_component_write(component, rx_gain_reg[w->shift], > - snd_soc_component_read(component, rx_gain_reg[w->shift])); > - break; > case SND_SOC_DAPM_POST_PMD: > snd_soc_component_update_bits(component, LPASS_CDC_CLK_RX_RESET_CTL, > 1 << w->shift, 1 << w->shift); > @@ -630,9 +613,6 @@ static int msm8916_wcd_digital_enable_dec(struct snd_soc_dapm_widget *w, > snd_soc_component_update_bits(component, tx_mux_ctl_reg, > TX_MUX_CTL_HPF_BP_SEL_MASK, > TX_MUX_CTL_HPF_BP_SEL_NO_BYPASS); > - /* apply the digital gain after the decimator is enabled */ same here. > - snd_soc_component_write(component, tx_gain_reg[w->shift], > - snd_soc_component_read(component, tx_gain_reg[w->shift]));