From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org,
mark.rutland@arm.com, tiwai@suse.com, devicetree@vger.kernel.org,
kwestfie@codeaurora.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 1/6] ASoC: codecs: Add msm8916-wcd analog codec
Date: Tue, 6 Sep 2016 13:55:26 +0100 [thread overview]
Message-ID: <deca1ce5-ba88-b9b5-5e39-d1938dbb6567@linaro.org> (raw)
In-Reply-To: <20160906111710.GM3950@sirena.org.uk>
On 06/09/16 12:17, Mark Brown wrote:
> On Tue, Sep 06, 2016 at 10:57:40AM +0100, Srinivas Kandagatla wrote:
>
>> +static const struct soc_enum hph_enum =
>> +SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(hph_text), hph_text);
>
> Coding style, let's have some indentation please.
>
I think Lindent did some mess up here, I will take of of such
occurrences in next version.
>> + if (w->reg == CDC_A_TX_1_EN)
>> + snd_soc_update_bits(codec, CDC_D_CDC_CONN_TX1_CTL,
>> + CONN_TX1_SERIAL_TX1_MUX,
>> + CONN_TX1_SERIAL_TX1_ADC_1);
>> + else if ((w->reg == CDC_A_TX_2_EN) || (w->reg == CDC_A_TX_3_EN))
>> + snd_soc_update_bits(codec, CDC_D_CDC_CONN_TX2_CTL,
>> + CONN_TX2_SERIAL_TX2_MUX,
>> + CONN_TX2_SERIAL_TX2_ADC_2);
>
> This looks like it should be a switch statement.
Yep, will fix this in next version.
>
>> + for (reg = 0; reg < ARRAY_SIZE(wcd_reg_defaults_2_0); reg++)
>> + snd_soc_write(codec, wcd_reg_defaults_2_0[reg].reg,
>> + wcd_reg_defaults_2_0[reg].def);
>
>> +static int msm8916_wcd_analog_enable_spk_pa(struct snd_soc_dapm_widget *w,
>> + struct snd_kcontrol *kcontrol,
>> + int event)
>
> We had some DAPM operations earlier, then the probe now we're back to
> DAPM operations. Seems a bit confused.
I agree, I will reorder these functions to make the code more readable.
>
>> + //Path domain ???
>
> C style comments please.
Will fix it.
>
>> +static int msm8916_wcd_analog_startup(struct snd_pcm_substream *substream,
>> + struct snd_soc_dai *dai)
>> +{
>> +
>> + snd_soc_update_bits(dai->codec, CDC_A_MASTER_BIAS_CTL,
>> + MASTER_BIAS_CTL_MASTER_BIAS_EN_MASK |
>> + MASTER_BIAS_CTL_V2L_BUFFER_EN_MASK,
>> + MASTER_BIAS_CTL_MASTER_BIAS_EN_ENABLE |
>> + MASTER_BIAS_CTL_V2L_BUFFER_EN_ENABLE);
>> +
>> + snd_soc_update_bits(dai->codec, CDC_D_CDC_RST_CTL,
>> + RST_CTL_DIG_SW_RST_N_MASK,
>> + RST_CTL_DIG_SW_RST_N_REMOVE_RESET);
>> +
>> + return 0;
>> +}
>
> I'm not quite sure what this is doing but it looks like something I'd
> expect to be in DAPM and I can't see anything that undoes this on
> teardown either.
I will fix this in next version, where this thing will be teardown in
shutdown callback.
>
>> +static int msm8916_wcd_analog_parse_dt(struct device *dev,
>> + struct msm8916_wcd_analog_priv *priv)
>> +{
>> + struct device_node *np = dev->of_node;
>> + int ret, i;
>> + u32 res[2];
>> +
>> + ret = of_property_read_u32_array(np, "reg", res, 2);
>> + if (ret < 0)
>> + return ret;
>
> That's weird, why are we reading a reg property directly? Not that we
> ever look at the value we parsed...
>
Ah.. looks like left over from my previous patches.. will get rid of
this in next version.
>> +static const struct of_device_id msm8916_wcd_analog_spmi_match_table[] = {
>> + {.compatible = "qcom,msm8916-wcd-analog-codec"},
>> + {}
>> +};
>
> Coding style, let's have somme spaces please.
Ok.
>
next prev parent reply other threads:[~2016-09-06 12:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 9:57 [PATCH v4 0/6] ASoC: Add support to Qualcomm msm8916-wcd multi codec Srinivas Kandagatla
2016-09-06 9:57 ` [PATCH v4 1/6] ASoC: codecs: Add msm8916-wcd analog codec Srinivas Kandagatla
[not found] ` <1473155865-13361-2-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-06 11:17 ` Mark Brown
2016-09-06 12:55 ` Srinivas Kandagatla [this message]
2016-09-06 9:57 ` [PATCH v4 2/6] ASoC: codecs: Add msm8916-wcd digital codec Srinivas Kandagatla
[not found] ` <1473155865-13361-3-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-06 11:24 ` Mark Brown
2016-09-06 12:54 ` Srinivas Kandagatla
[not found] ` <1473155865-13361-1-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-06 9:57 ` [PATCH v4 3/6] ASoC: qcom: apq8016-sbc: add board specific dapm mic widgets Srinivas Kandagatla
2016-09-06 11:29 ` Applied "ASoC: qcom: apq8016-sbc: add board specific dapm mic widgets" to the asoc tree Mark Brown
2016-09-06 9:57 ` [PATCH v4 4/6] ASoC: qcom: apq8016-sbc: add support to routing via DT Srinivas Kandagatla
[not found] ` <1473155865-13361-5-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-06 11:29 ` Applied "ASoC: qcom: apq8016-sbc: add support to routing via DT" to the asoc tree Mark Brown
2016-09-06 9:57 ` [PATCH v4 5/6] ASoC: qcom: apq8016-sbc: Add support to multi codec Srinivas Kandagatla
[not found] ` <1473155865-13361-6-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-06 11:27 ` Mark Brown
2016-09-06 12:54 ` Srinivas Kandagatla
2016-09-06 9:57 ` [PATCH v4 6/6] arm64: dts: apq8016-sbc: add analog audio support with multicodec Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=deca1ce5-ba88-b9b5-5e39-d1938dbb6567@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kwestfie@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).