From: Ashish Chavan <ashish.chavan@kpitcummins.com>
To: "Girdwood, Liam" <lrg@ti.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
"kuninori.morimoto.gx" <kuninori.morimoto.gx@renesas.com>,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [PATCH v5 2/2] ASoC: da7210: Add support for ALC and Noise suppression
Date: Wed, 19 Oct 2011 14:13:30 +0530 [thread overview]
Message-ID: <1319013810.7230.40.camel@matrix> (raw)
In-Reply-To: <CABS+qY3qw7YpeNwK2JJav4tR23uPCp19BPeE2E2KL3FnZ8zJ=g@mail.gmail.com>
> > + if (ucontrol->value.integer.value[0]) {
> > + /* Check if noise suppression is enabled */
> > + if (snd_soc_read(codec, DA7210_CONTROL) & DA7210_NOISE_SUP_EN) {
> > + dev_dbg(codec->dev,
> > + "Disable noise suppression to enable ALC\n");
> > + return -EPERM;
>
> -EINVAL
>
>
> > + /* Check ZC for HP and AUX1 PGA */
> > + if ((snd_soc_read(codec, DA7210_ZERO_CROSS) &
> > + (DA7210_AUX1_L_ZC | DA7210_AUX1_R_ZC | DA7210_HP_L_ZC |
> > + DA7210_HP_R_ZC)) != 0xc3)
>
> It may be clearer if you don't use the magic number here and specify
> the bits you are checking.
>
> > + /* If all conditions are met or we are actually disabling Noise sup */
> > + return snd_soc_put_volsw(kcontrol, ucontrol);
> > +
> > +err:
> > + return -EPERM;
>
> -EINVAL
>
Thanks. Updating and reposting the patch set.
prev parent reply other threads:[~2011-10-19 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 13:43 [PATCH v5 2/2] ASoC: da7210: Add support for ALC and Noise suppression Ashish Chavan
2011-10-19 7:57 ` [alsa-devel] " Girdwood, Liam
2011-10-19 8:43 ` Ashish Chavan [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=1319013810.7230.40.camel@matrix \
--to=ashish.chavan@kpitcummins.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=david.chen@diasemi.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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