28 Jun
2012
28 Jun
'12
3:21 p.m.
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.