From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH V2 2/9] sound:asoc: Add support for STA529 Audio Codec
Date: Thu, 21 Jun 2012 13:25:40 +0100 [thread overview]
Message-ID: <20120621122540.GV4037@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <d06e4180229ac4aa0e0f27aa4d444dd7a9634afd.1340273261.git.rajeev-dlh.kumar@st.com>
[-- Attachment #1.1: Type: text/plain, Size: 1627 bytes --]
On Thu, Jun 21, 2012 at 03:54:50PM +0530, Rajeev Kumar wrote:
> This patch adds the support for STA529 audio codec.
As I said last time always use subject lines corresponding to the style
of the subsystem, don't make up your own style.
This is mostly OK, a few things below but nothing terribly major.
> +static int sta529_mute(struct snd_soc_dai *dai, int mute)
> +{
> + u8 val;
> +
> + if (mute)
> + val |= CODEC_MUTE_VAL;
You need to initialise val otherwise it's going to have an undefined
value when you're not muting.
> + codec->control_data = sta529->regmap;
> + ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);
You've got a regmap, you should be using SND_SOC_REGMAP as the control
mode.
> + snd_soc_add_codec_controls(codec, sta529_snd_controls,
> + ARRAY_SIZE(sta529_snd_controls));
> +
> + snd_soc_add_codec_controls(codec, sta529_new_snd_controls,
> + ARRAY_SIZE(sta529_new_snd_controls));
Set these in the CODEC driver structure and merge the two arrays, no
point in having code for this.
> +static int sta529_resume(struct snd_soc_codec *codec)
> +{
> + snd_soc_cache_sync(codec);
You're not using the ASoC cache code.
> + sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> + sta529_set_bias_level(codec, codec->dapm.suspend_bias_level);
The second of these isn't needed, the core will ensure the device is in
standby before suspend.
> + sta529->regmap = regmap_init_i2c(i2c, &sta529_regmap);
> + if (IS_ERR(sta529->regmap)) {
devm_regmap_init_i2c() then you don't need any cleanup code for it.
> +static int __init sta529_modinit(void)
> +{
> + int ret = 0;
module_i2c_driver.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-06-21 11:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 10:24 [PATCH V2 0/9] Add ASoC drivers for SPEAr platform & I2S driver for Designware module Rajeev Kumar
2012-06-21 10:24 ` [PATCH V2 1/9] sound:asoc: Add support for spdif in Audio Codec Rajeev Kumar
2012-06-22 9:21 ` Mark Brown
2012-06-22 9:44 ` Rajeev kumar
2012-06-22 9:49 ` Mark Brown
2012-06-22 9:54 ` Rajeev kumar
2012-06-21 10:24 ` [PATCH V2 2/9] sound:asoc: Add support for STA529 " Rajeev Kumar
2012-06-21 12:25 ` Mark Brown [this message]
2012-06-22 6:26 ` Rajeev kumar
2012-06-22 8:49 ` Mark Brown
2012-06-21 10:24 ` [PATCH V2 3/9] sound:asoc: Add support for synopsys i2s controller as per ASoC framework Rajeev Kumar
2012-06-22 9:25 ` Mark Brown
2012-06-22 9:43 ` Rajeev kumar
2012-06-21 10:24 ` [PATCH V2 4/9] sound:asoc: Add support for SPEAr ASoC pcm layer Rajeev Kumar
2012-06-22 9:28 ` Mark Brown
2012-06-22 9:37 ` Rajeev kumar
2012-06-21 10:24 ` [PATCH V2 5/9] sound:asoc:spdif_in: Add spdif IN support Rajeev Kumar
2012-06-23 10:55 ` Mark Brown
2012-06-21 10:24 ` [PATCH V2 6/9] sound:asoc:spdif_out: Add spdif out support Rajeev Kumar
2012-06-23 10:56 ` Mark Brown
2012-06-21 10:24 ` [PATCH V2 7/9] sound:asoc: Add support for SPEAr ASoC machine driver Rajeev Kumar
2012-06-23 11:01 ` Mark Brown
2012-06-25 10:28 ` Rajeev kumar
2012-06-27 4:37 ` Rajeev kumar
2012-06-27 11:12 ` Mark Brown
2012-06-21 10:24 ` [PATCH V2 8/9] sound:asoc: Add Kconfig and Makefile to support SPEAr audio driver Rajeev Kumar
2012-06-21 10:24 ` [PATCH V2 9/9] sound:asoc: Update Kconfig and Makefile(sound/soc/) to support SPEAr audio Rajeev Kumar
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=20120621122540.GV4037@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=rajeev-dlh.kumar@st.com \
--cc=tiwai@suse.de \
/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