ChangeSet 1.2181.25.17, 2005/03/22 09:05:21+01:00, [EMAIL PROTECTED]
[ALSA] documentation - clarify information about atomic callbacks
Documentation
Document that the ack callback is atomic, too, and that the atomic
callbacks are called with disabled interrupts. Additionally, clarify
the description of the rawmidi trigger callback.
Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]>
writing-an-alsa-driver.tmpl | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff -Nru a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
2005-03-30 16:12:46 -08:00
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
2005-03-30 16:12:46 -08:00
@@ -3011,6 +3011,9 @@
current appl_ptr for the internal buffer, and this callback
is useful only for such a purpose.
</para>
+ <para>
+ This callback is atomic.
+ </para>
</section>
<section id="pcm-interface-operators-page-callback">
@@ -3208,6 +3211,11 @@
<function>udelay()</function> or <function>mdelay()</function>.
</para>
+ <para>
+ All three atomic callbacks (trigger, pointer, and ack) are
+ called with local interrupts disabled.
+ </para>
+
</section>
<section id="pcm-interface-constraints">
<title>Constraints</title>
@@ -4598,11 +4606,12 @@
</para>
<para>
- The <function>trigger</function> callback may be called from
- another hardware interrupt handler. This means that all
- spinlocks taken in the <function>trigger</function> callback
- must be taken with <function>spin_lock_irqsave</function>
- everywhere.
+ The <function>trigger</function> callback with nonzero
+ <paramater>up</parameter> parameter may be called from another
+ hardware interrupt handler. This means that all spinlocks
+ taken in the <function>trigger</function> callback must be
+ taken with <function>spin_lock_irqsave</function> even when
+ you are in your own interrupt handler.
</para>
</section>
@@ -4622,6 +4631,12 @@
This is called with a nonzero <parameter>up</parameter>
parameter to enable receiving data, or with a zero
<parameter>up</parameter> parameter do disable receiving data.
+ </para>
+
+ <para>
+ The <function>trigger</function> callback must not sleep; the
+ actual reading of data from the device is usually done in an
+ interrupt handler.
</para>
<para>
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html