[alsa-devel] [PATCH - try2] ASoC: Codec driver for Texas Instruments tlv320dac33 codec
broonie at opensource.wolfsonmicro.com
Tue Oct 13 14:54:12 CEST 2009
On Tue, Oct 13, 2009 at 03:41:38PM +0300, Eero Nurkkala wrote:
> Mark, aren't all codec bits updated within the snd_soc_update_bits() by
> DAPM? It always takes the io_mutex. Does it make sense if we proposed a
No, actually DAPM is bypassing that (which is probably a bug anyway but
the holding of the CODEC lock helps a lot there). Note also that
io_mutex is only held for bitwise updates.
> new item to struct snd_soc_codec, something like io_mutex? then
> snd_soc_update_bits() would check the presence of this codec->io_mutex,
> and if it was present, it would only use that instead of io_mutex.
> Just an idea... (I'd help here, no need for double locking like now)
Much less convoluted would just be to move io_mutex into the CODEC
unconditionally. However, note that snd_soc_write() doesn't take the
lock - it's currently only used for read/modify/write cycles.
More information about the Alsa-devel