From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Srinivas Kandagatla
<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
tiwai-IBi9RG/b67k@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kwestfie-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 1/6] ASoC: codecs: Add msm8916-wcd analog codec
Date: Tue, 6 Sep 2016 12:17:10 +0100 [thread overview]
Message-ID: <20160906111710.GM3950@sirena.org.uk> (raw)
In-Reply-To: <1473155865-13361-2-git-send-email-srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]
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.
> + 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.
> + 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.
> + //Path domain ???
C style comments please.
> +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.
> +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...
> +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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-09-06 11:17 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 [this message]
2016-09-06 12:55 ` Srinivas Kandagatla
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=20160906111710.GM3950@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kwestfie-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=tiwai-IBi9RG/b67k@public.gmane.org \
/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).