All of lore.kernel.org
 help / color / mirror / Atom feed
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 V3 2/4] ASoC: STA529: Add support for STA529 Audio Codec
Date: Thu, 28 Jun 2012 13:21:31 +0100	[thread overview]
Message-ID: <20120628122131.GH28922@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <38096527b25ad66b190e5150457133d0b3e6fd1e.1340862505.git.rajeev-dlh.kumar@st.com>


[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]

On Thu, Jun 28, 2012 at 12:31:38PM +0530, Rajeev Kumar wrote:

> +	val = snd_soc_read(codec, STA529_MISC);
> +	/* set FFX audio frequency range */
> +	val = (((val & 0x83) | (play_freq_val << 4)) | (record_freq_val << 2));
> +	snd_soc_update_bits(codec, STA529_MISC, FREQ_RANGE_MSK, val);

This is really odd, you're using update_bits() like write() - half the
point of update_bits() is that you don't need to do the read to get the
initial value.  It also looks like the frequency range set should be
being done in your playback/capture cases so that instead of 

> +	u8 val = snd_soc_read(dai->codec, STA529_FFXCFG0);
> +
> +	if (mute)
> +		val |= CODEC_MUTE_VAL;
> +
> +	snd_soc_update_bits(dai->codec, STA529_FFXCFG0, AUDIO_MUTE_MSK, val);

This will never disable mute since you're using update_bits() badly
again - once mute has been set then the read will have the bit set and
nothing ever clears it.  You shouldn't have the read at all.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2012-06-28 12:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  7:01 [PATCH V3 0/4] Add support for STA529 codec, spdif_receiver and SPEAr spdif_out controller Rajeev Kumar
2012-06-28  7:01 ` [PATCH V3 1/4] ASoC: spdif_receiver: Add support for spdif in Audio Codec Rajeev Kumar
2012-06-28 12:15   ` Mark Brown
2012-06-28  7:01 ` [PATCH V3 2/4] ASoC: STA529: Add support for STA529 " Rajeev Kumar
2012-06-28 12:21   ` Mark Brown [this message]
2012-06-28  7:01 ` [PATCH V3 3/4] ASoC: SPEAr spdif_out: Add spdif out support Rajeev Kumar
2012-06-28 12:27   ` Mark Brown
2012-06-29  7:35     ` Vipin Kumar
2012-06-30 18:35       ` Mark Brown
2012-07-01  6:32         ` Vipin Kumar
2012-07-02  5:00     ` Rajeev kumar
2012-07-03  4:20       ` Rajeev kumar
2012-07-03 19:09       ` Mark Brown
2012-06-28  7:01 ` [PATCH V3 4/4] ASoC: SPEAr: Add Kconfig and Makefile to support SPEAr audio driver 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=20120628122131.GH28922@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.