From: rajeev <rajeev-dlh.kumar@st.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH V2 1/5] sound: asoc: Adding support for STA529 Audio Codec
Date: Fri, 8 Apr 2011 11:09:09 +0530 [thread overview]
Message-ID: <4D9E9F7D.2030809@st.com> (raw)
In-Reply-To: <20110329232750.GK30482@opensource.wolfsonmicro.com>
Hi Mark
Please find my answer inlined
On 3/30/2011 4:57 AM, Mark Brown wrote:
> On Tue, Mar 29, 2011 at 04:46:59PM +0530, Rajeev Kumar wrote:
>
>> +static const struct snd_kcontrol_new sta529_snd_controls[] = {
>> + SOC_SINGLE("Master Playback Volume", STA529_MVOL, 0, 127, 1),
>> + SOC_SINGLE("Left Playback Volume", STA529_LVOL, 0, 127, 1),
>> + SOC_SINGLE("Right Playback Volume", STA529_RVOL, 0, 127, 1),
>> +};
>
> Left and Right should be a single stereo control (usually done with
> SOC_DOUBLE). It'd also be better to provide gain information with the
> _TLV variants of the controls.
>
ok
> Does the master control actually provide a separate control or does it
> update both left and right channels simultaneously? If the latter then
> normally you'd just omit it from the driver as the driver can easily do
> the stereo updates?
master control provide a separate control.
>
>> + val = snd_soc_read(codec, STA529_S2PCFG0);
>> + val |= mode;
>> + /*this setting will be used with actual h/w */
>> + snd_soc_write(codec, STA529_S2PCFG0, val);
>
> snd_soc_update_bits() - you're not clearing any bits here so if you
> change modes things will go wrong.
OK
>
>> + case SND_SOC_BIAS_STANDBY:
>> + case SND_SOC_BIAS_OFF:
>> + snd_soc_update_bits(codec, STA529_FFXCFG0, POWER_CNTLMSAK,
>> + POWER_STDBY);
>> + snd_soc_update_bits(codec, STA529_FFXCFG0, MUTE_ON_MASK,
>> + MUTE_OFF);
>
> Managing the mute in these states seems odd - could do with some
> comments in the code if nothing else.
>
OK,Macro name in in-correct.
>> +static void sta529_init(struct snd_soc_codec *codec)
>> +{
>> + /* DAC default master volume */
>> + snd_soc_write(codec, STA529_MVOL, DEFAULT_MASTER_VOL);
>> + /* DAC default left volume */
>> + snd_soc_write(codec, STA529_LVOL, DEFAULT_VOL);
>> + /* DAC default right volume */
>> + snd_soc_write(codec, STA529_RVOL, DEFAULT_VOL);
>> + /* By default route to binary headphones */
>> + snd_soc_write(codec, STA529_FFXCFG1, DEFAULT_BIN_HEADPHONE);
>> + /* default value for Serial-to-parallel audio interface configuration */
>
>> + /* select microphone input by default*/
>> + snd_soc_write(codec, STA529_ADCCFG, DEFAULT_MIC_SEL);
>
> None of the above should be configured here, leave them at the default
> values (and offer them as runtime controls if they're not there
> already). The settings appropriate for one machine may not be
> appropriate for another.
>
Ok
>> +static int sta529_resume(struct snd_soc_codec *codec)
>> +{
>> +
>> + sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
>> + sta529_set_bias_level(codec, codec->suspend_bias_level);
>> + return 0;
>> +}
>
> I'd expect this to restore the register cache somewhere.
>
Ok
>> +MODULE_DESCRIPTION("ASoC STA529 codec driver");
>> +MODULE_AUTHOR("Rajeev Kumar <rajeev-dlh.kumar@st.com>");
>> +MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("platform:sta529-codec");
>
> This isn't a platform driver, remove the MODULE_ALIAS.
> .
Ooops,
>
Best Regards
Rajeev
prev parent reply other threads:[~2011-04-08 5:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 11:16 [PATCH V2 0/5] Adding ASoC drivers for SPEAr13XX platform Rajeev Kumar
2011-03-29 11:16 ` [PATCH V2 1/5] sound: asoc: Adding support for STA529 Audio Codec Rajeev Kumar
2011-03-29 11:17 ` [PATCH V2 2/5] sound: asoc: Adding support for SPEAr13XX ASoC platform driver Rajeev Kumar
2011-03-29 11:17 ` [PATCH V2 3/5] sound: asoc: Adding support for SPEAr13XX ASoC machine driver Rajeev Kumar
2011-03-29 11:17 ` [PATCH V2 4/5] sound: asoc: Adding Kconfig and Makefile to support SPEAr13XX ASoC driver Rajeev Kumar
2011-03-29 11:17 ` [PATCH V2 5/5] sound: asoc: Adding support for SPEAr13XX in soc Rajeev Kumar
2011-03-29 23:33 ` [PATCH V2 4/5] sound: asoc: Adding Kconfig and Makefile to support SPEAr13XX ASoC driver Mark Brown
2011-03-30 4:22 ` rajeev
2011-03-29 23:32 ` [PATCH V2 3/5] sound: asoc: Adding support for SPEAr13XX ASoC machine driver Mark Brown
2011-03-30 4:55 ` rajeev
2011-04-08 5:16 ` rajeev
2011-03-29 23:27 ` [PATCH V2 1/5] sound: asoc: Adding support for STA529 Audio Codec Mark Brown
2011-04-08 5:39 ` rajeev [this message]
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=4D9E9F7D.2030809@st.com \
--to=rajeev-dlh.kumar@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).