[alsa-devel] synchronized block of register writes
Peter.Hsiang at maxim-ic.com
Thu Apr 7 00:28:10 CEST 2011
Hi Mark and Everyone,
When a codec driver control handling function needs to write a group of registers without any other register of the same codec being written to in parallel by ALSA, what is the best way to do this under the snd-soc codec driver architecture? In the current architecture, does the driver's control handling function execute serially with other ALSA automated activities?
For example, the codec has filter coefficient data registers in a secondary registers "segment" i.e. a portion of the register map is banked, and the secondary bank is purely for coefficients and they do not require caching. The coefficient registers share the same register numbers as those in the normal primary segment. To write the coefficients, one would first write to a register bit to select the desired segment, and then switch back when done. This means when writing the coefficients, I use the un-cached write.
Thanks in advance for your sound advice.
More information about the Alsa-devel