From: Mark Brown <broonie@kernel.org>
To: Shunqian Zheng <zhengsq@rock-chips.com>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
heiko@sntech.de, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com, benzh@chromium.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v2 1/2] ASoC: codec: Inno codec driver for RK3036 SoC
Date: Thu, 5 Nov 2015 16:13:11 +0000 [thread overview]
Message-ID: <20151105161311.GR18409@sirena.org.uk> (raw)
In-Reply-To: <1446717194-8572-2-git-send-email-zhengsq@rock-chips.com>
[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]
On Thu, Nov 05, 2015 at 05:53:13PM +0800, Shunqian Zheng wrote:
This is basically all good, a few very minor comments below but nothing
that should take any time to fix.
> +static const char *rk3036_codec_antipop_text[] = {"none", "work"};
> +static const unsigned int rk3036_codec_antipop_values[] = {0x1, 0x2};
> +
> +static SOC_VALUE_ENUM_DOUBLE_DECL(rk3036_codec_antipop_enum, INNO_R09,
> + INNO_R09_HPL_ANITPOP_SHIFT, INNO_R09_HPR_ANITPOP_SHIFT, 0x3,
> + rk3036_codec_antipop_text, rk3036_codec_antipop_values);
This looks like a simple boolean control rather than an enum - it looks
like it's just turning antipop on and off.
> + SOC_DOUBLE_R_RANGE_TLV("Headphone Volume", INNO_R07, INNO_R08,
> + INNO_HP_GAIN_SHIFT, INNO_HP_GAIN_N39DB,
> + INNO_HP_GAIN_0DB, 0, rk3036_codec_hp_tlv),
> + SOC_DOUBLE("Zero Cross Detect", INNO_R06, INNO_R06_VOUTL_CZ_SHIFT,
> + INNO_R06_VOUTR_CZ_SHIFT, 1, 0),
This should be "Zero Cross Switch".
> + SOC_DOUBLE("HP Mute", INNO_R09, INNO_R09_HPL_MUTE_SHIFT,
> + INNO_R09_HPR_MUTE_SHIFT, 1, 1),
This should be "Headphone Switch".
> +static int rk3036_codec_add_widgets(struct snd_soc_codec *codec)
> +{
> + struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
> +
> + snd_soc_add_codec_controls(codec, rk3036_codec_dapm_controls,
> + ARRAY_SIZE(rk3036_codec_dapm_controls));
> +
> + snd_soc_dapm_new_controls(dapm, rk3036_codec_dapm_widgets,
> + ARRAY_SIZE(rk3036_codec_dapm_widgets));
> +
> + snd_soc_dapm_add_routes(dapm, rk3036_codec_dapm_routes,
> + ARRAY_SIZE(rk3036_codec_dapm_routes));
Just point at the tables from the driver structure and let the core do
the initialisation for you.
> +static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec,
> + enum snd_soc_bias_level level)
> +{
> + switch (level) {
> + case SND_SOC_BIAS_STANDBY:
> + /* set a big current for capacitor charging. */
> + snd_soc_write(codec, INNO_R10, INNO_R10_MAX_CUR);
> + /* start precharge */
> + snd_soc_write(codec, INNO_R06, INNO_R06_DAC_PRECHARGE);
Do we not need to wait for this to ramp?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-11-05 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 9:53 [PATCH v2 0/2] Audio Codec Driver of " Shunqian Zheng
2015-11-05 9:53 ` [PATCH v2 1/2] ASoC: codec: Inno codec driver for " Shunqian Zheng
2015-11-05 12:47 ` LABBE Corentin
2015-11-06 8:06 ` Shunqian Zheng
2015-11-05 16:13 ` Mark Brown [this message]
2015-11-06 8:15 ` Shunqian Zheng
2015-11-06 9:28 ` Mark Brown
2015-11-05 9:53 ` [PATCH v2 2/2] ASoC: RK3036: Add binding doc of inno-rk3036 codec driver Shunqian Zheng
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=20151105161311.GR18409@sirena.org.uk \
--to=broonie@kernel.org \
--cc=benzh@chromium.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=zhengsq@rock-chips.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
all inboxes | Powered by JetHome®