Re: what criteria should be used to choose between snd_ac97_update_bits, snd_ac97_write, snd_ac97_write_cache ?

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

 



John Utz wrote:
> are there reasons why one might prefer one of these or the other?

Because reading AC'97 registers is rather slow, there is a cache of
register values.

Use snd_ac97_write() for registers that should not be cached.

Use snd_ac97_write_cache() to write to a register that can be cached,
i.e., later reads can take the value from the cache instead of reading
from the codec.

Use snd_ac97_update() to write to a register where writing the same
value would not have any effect.

Use snd_ac97_update_bits() in the same situation as snd_ac97_update(),
but when you want to update only some bits.

Use snd_ac97_read() for uncached reads; and snd_ac97_read_cache() for
reads from the cache, if possible.


HTH
Clemens

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/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