[alsa-devel] [PATCH V3 2/4] ASoC: STA529: Add support for STA529 Audio Codec
Mark Brown
broonie at opensource.wolfsonmicro.com
Thu Jun 28 14:21:31 CEST 2012
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120628/00bfd350/attachment-0001.sig
More information about the Alsa-devel
mailing list