All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Clemens Ladisch" <cladisch@fastmail.net>
To: John Utz <John.Utz@dmxmusic.com>, alsa-devel@lists.sourceforge.net
Subject: Re: what criteria should be used to choose between snd_ac97_update_bits, snd_ac97_write, snd_ac97_write_cache ?
Date: Thu, 01 Mar 2007 09:25:40 +0100	[thread overview]
Message-ID: <1172737540.9561.1177138781@webmail.messagingengine.com> (raw)
In-Reply-To: <F8FB97052F1BEF409F7842E960E49B5AAAF8BB@sea-exch-01.na.corp.dmxmusic.com>

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

  reply	other threads:[~2007-03-01  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 17:59 what criteria should be used to choose between snd_ac97_update_bits, snd_ac97_write, snd_ac97_write_cache ? John Utz
2007-03-01  8:25 ` Clemens Ladisch [this message]
2007-03-01 19:34   ` John Utz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172737540.9561.1177138781@webmail.messagingengine.com \
    --to=cladisch@fastmail.net \
    --cc=John.Utz@dmxmusic.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.