[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df3da44d-3181-43a9-9552-ba7e41c05db8@linaro.org>
Date: Tue, 28 Nov 2023 10:18:20 +0100
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-arm-msm@...r.kernel.org,
alsa-devel@...a-project.org, linux-sound@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] ASoC: codecs: Add WCD939x Codec driver
Hi,
On 24/11/2023 11:19, Mark Brown wrote:
> On Thu, Nov 23, 2023 at 03:49:15PM +0100, Neil Armstrong wrote:
>
>> + if (wcd939x->variant == WCD9390) {
>> + if (mode_val == CLS_H_HIFI || mode_val == CLS_AB_HIFI) {
>> + dev_info(component->dev, "%s: Invalid HPH Mode, default to CLS_H_ULP\n",
>> + __func__);
>> + mode_val = CLS_H_ULP;
>> + }
>> + }
>> + if (mode_val == CLS_H_NORMAL) {
>> + dev_info(component->dev, "%s: Invalid HPH Mode, default to class_AB\n",
>> + __func__);
>> + mode_val = CLS_H_ULP;
>> + }
>
> This lets people spam the logs from userspace, why not just return an
> error?
Indeed, will switch to an error, seems safer
>
>> + if (hphr)
>> + wcd939x->comp2_enable = value;
>> + else
>> + wcd939x->comp1_enable = value;
>
> Are there really no constraints on the values for these things?
Nop, it's basically boolean, so any value > 0 is true.
>
>> +static const struct snd_kcontrol_new wcd9390_snd_controls[] = {
>> + SOC_ENUM_EXT("EAR PA GAIN", wcd939x_ear_pa_gain_enum,
>> + wcd939x_ear_pa_gain_get, wcd939x_ear_pa_gain_put),
>
> Gains should be be named Volume. Is there no TLV information?
Let me check that, I maybe forgot to add it.
>
>> +static irqreturn_t wcd939x_wd_handle_irq(int irq, void *data)
>> +{
>> + return IRQ_HANDLED;
>> +}
>
> Why even request the interrupt if it's just going to be ignored?
Good question! I'll check this
Thanks,
Neil
Powered by blists - more mailing lists