From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Cc: alsa-devel@alsa-project.org, Vladimir Zapolskiy <vzapolskiy@gmail.com>
Subject: Re: [PATCH 2/2 v2] ASoC: uda134x: correct bias level setup for codecs family
Date: Thu, 24 Jun 2010 23:44:24 +0400 [thread overview]
Message-ID: <AANLkTim5e09iw01K28npUmM0Rofmiqx_DLqQwUb0zVGn@mail.gmail.com> (raw)
In-Reply-To: <1277385565-30727-1-git-send-email-vzapolskiy@gmail.com>
Mark, Liam,
do you have more comments about this fix?
On Thu, Jun 24, 2010 at 5:19 PM, Vladimir Zapolskiy
<vzapolskiy@gmail.com> wrote:
> For UDA1341 codec power control is managed in STATUS1 register, and
> for all other codecs in DATA011 register.
>
> Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
> ---
> sound/soc/codecs/uda134x.c | 36 ++++++++++++++++++++++++++++++++----
> 1 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
> index e770029..e8066b6 100644
> --- a/sound/soc/codecs/uda134x.c
> +++ b/sound/soc/codecs/uda134x.c
> @@ -353,8 +353,22 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec,
> switch (level) {
> case SND_SOC_BIAS_ON:
> /* ADC, DAC on */
> - reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1);
> - uda134x_write(codec, UDA134X_STATUS1, reg | 0x03);
> + switch (pd->model) {
> + case UDA134X_UDA1340:
> + case UDA134X_UDA1344:
> + case UDA134X_UDA1345:
> + reg = uda134x_read_reg_cache(codec, UDA134X_DATA011);
> + uda134x_write(codec, UDA134X_DATA011, reg | 0x03);
> + break;
> + case UDA134X_UDA1341:
> + reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1);
> + uda134x_write(codec, UDA134X_STATUS1, reg | 0x03);
> + break;
> + default:
> + printk(KERN_ERR "UDA134X SoC codec: "
> + "unsupported model %d\n", pd->model);
> + return -EINVAL;
> + }
> break;
> case SND_SOC_BIAS_PREPARE:
> /* power on */
> @@ -367,8 +381,22 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec,
> break;
> case SND_SOC_BIAS_STANDBY:
> /* ADC, DAC power off */
> - reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1);
> - uda134x_write(codec, UDA134X_STATUS1, reg & ~(0x03));
> + switch (pd->model) {
> + case UDA134X_UDA1340:
> + case UDA134X_UDA1344:
> + case UDA134X_UDA1345:
> + reg = uda134x_read_reg_cache(codec, UDA134X_DATA011);
> + uda134x_write(codec, UDA134X_DATA011, reg & ~(0x03));
> + break;
> + case UDA134X_UDA1341:
> + reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1);
> + uda134x_write(codec, UDA134X_STATUS1, reg & ~(0x03));
> + break;
> + default:
> + printk(KERN_ERR "UDA134X SoC codec: "
> + "unsupported model %d\n", pd->model);
> + return -EINVAL;
> + }
> break;
> case SND_SOC_BIAS_OFF:
> /* power off */
> --
> 1.7.0.4
>
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2010-06-24 19:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 11:17 [PATCH 1/2] ASoC: uda134x: add DATA011 register found in codecs family Vladimir Zapolskiy
2010-06-24 11:17 ` [PATCH 2/2] ASoC: uda134x: fix bias level setup on initialization and runtime Vladimir Zapolskiy
2010-06-24 11:34 ` Mark Brown
2010-06-24 13:21 ` Vladimir Zapolskiy
2010-06-24 13:19 ` [PATCH 2/2 v2] ASoC: uda134x: correct bias level setup for codecs family Vladimir Zapolskiy
2010-06-24 19:44 ` Vladimir Zapolskiy [this message]
2010-06-28 5:38 ` Vladimir Zapolskiy
2010-06-30 12:58 ` Mark Brown
2010-06-30 13:10 ` Vladimir Zapolskiy
2010-06-30 14:08 ` Mark Brown
2010-06-30 14:59 ` Vladimir Zapolskiy
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=AANLkTim5e09iw01K28npUmM0Rofmiqx_DLqQwUb0zVGn@mail.gmail.com \
--to=vzapolskiy@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/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).