Re: ASoC: about the array to cache registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 24, 2009 at 04:06:43PM +0900, Joonyoung Shim wrote:

> Many ASoC codec drivers have an array to cache registers.
> The array is not used any longer after memcpy to codec->reg_cache.
> I think that memcpy is unnecessary, and it a waste of the memory.

> How about continue using the array instead of memcpy?

There's two reasons we keep the data around at the minute.  One is that
in future we'd like to be able to have more than one CODEC, including
more tha one of the same type.  Obviously there's some devices are more
likely to be used in such a configuration than others but you do see
some unusual hardware designs.

The other is that the default values can be used to reduce the amount of
data that needs to be written back to the CODEC to restore the registers
at resume time by only writing non-default values.  This can speed up
resume, especially on larger devices and where the control bus is
contended, but it's not been widely implemented.

For the devices that don't do the resume operation we should at least
mark the arrays as __devinitdata so they can be discarded.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux