diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
commit | 7a9787e1eba95a166265e6a260cf30af04ef0a99 (patch) | |
tree | e730a4565e0318140d2fbd2f0415d18a339d7336 /Documentation/sound/alsa/DocBook | |
parent | 41b9eb264c8407655db57b60b4457fe1b2ec9977 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) |
Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
Diffstat (limited to 'Documentation/sound/alsa/DocBook')
-rw-r--r-- | Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl | 2 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 65 |
2 files changed, 40 insertions, 27 deletions
diff --git a/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl b/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl index c4d2e3507af9..9d644f7e241e 100644 --- a/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl +++ b/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl | |||
@@ -42,7 +42,7 @@ | |||
42 | <sect1><title>Device Components</title> | 42 | <sect1><title>Device Components</title> |
43 | !Esound/core/device.c | 43 | !Esound/core/device.c |
44 | </sect1> | 44 | </sect1> |
45 | <sect1><title>KMOD and Device File Entries</title> | 45 | <sect1><title>Module requests and Device File Entries</title> |
46 | !Esound/core/sound.c | 46 | !Esound/core/sound.c |
47 | </sect1> | 47 | </sect1> |
48 | <sect1><title>Memory Management Helpers</title> | 48 | <sect1><title>Memory Management Helpers</title> |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index e13c4e67029f..87a7c07ab658 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -5073,8 +5073,7 @@ struct _snd_pcm_runtime { | |||
5073 | with <constant>SNDRV_DMA_TYPE_CONTINUOUS</constant> type and the | 5073 | with <constant>SNDRV_DMA_TYPE_CONTINUOUS</constant> type and the |
5074 | <function>snd_dma_continuous_data(GFP_KERNEL)</function> device pointer, | 5074 | <function>snd_dma_continuous_data(GFP_KERNEL)</function> device pointer, |
5075 | where <constant>GFP_KERNEL</constant> is the kernel allocation flag to | 5075 | where <constant>GFP_KERNEL</constant> is the kernel allocation flag to |
5076 | use. For the SBUS, <constant>SNDRV_DMA_TYPE_SBUS</constant> and | 5076 | use. |
5077 | <function>snd_dma_sbus_data(sbus_dev)</function> are used instead. | ||
5078 | For the PCI scatter-gather buffers, use | 5077 | For the PCI scatter-gather buffers, use |
5079 | <constant>SNDRV_DMA_TYPE_DEV_SG</constant> with | 5078 | <constant>SNDRV_DMA_TYPE_DEV_SG</constant> with |
5080 | <function>snd_dma_pci_data(pci)</function> | 5079 | <function>snd_dma_pci_data(pci)</function> |
@@ -6135,44 +6134,58 @@ struct _snd_pcm_runtime { | |||
6135 | </para> | 6134 | </para> |
6136 | </section> | 6135 | </section> |
6137 | 6136 | ||
6138 | <section id="useful-functions-snd-assert"> | 6137 | <section id="useful-functions-snd-bug"> |
6139 | <title><function>snd_assert()</function></title> | 6138 | <title><function>snd_BUG()</function></title> |
6140 | <para> | 6139 | <para> |
6141 | <function>snd_assert()</function> macro is similar with the | 6140 | It shows the <computeroutput>BUG?</computeroutput> message and |
6142 | normal <function>assert()</function> macro. For example, | 6141 | stack trace as well as <function>snd_BUG_ON</function> at the point. |
6142 | It's useful to show that a fatal error happens there. | ||
6143 | </para> | ||
6144 | <para> | ||
6145 | When no debug flag is set, this macro is ignored. | ||
6146 | </para> | ||
6147 | </section> | ||
6148 | |||
6149 | <section id="useful-functions-snd-bug-on"> | ||
6150 | <title><function>snd_BUG_ON()</function></title> | ||
6151 | <para> | ||
6152 | <function>snd_BUG_ON()</function> macro is similar with | ||
6153 | <function>WARN_ON()</function> macro. For example, | ||
6143 | 6154 | ||
6144 | <informalexample> | 6155 | <informalexample> |
6145 | <programlisting> | 6156 | <programlisting> |
6146 | <![CDATA[ | 6157 | <![CDATA[ |
6147 | snd_assert(pointer != NULL, return -EINVAL); | 6158 | snd_BUG_ON(!pointer); |
6148 | ]]> | 6159 | ]]> |
6149 | </programlisting> | 6160 | </programlisting> |
6150 | </informalexample> | 6161 | </informalexample> |
6151 | </para> | ||
6152 | 6162 | ||
6153 | <para> | 6163 | or it can be used as the condition, |
6154 | The first argument is the expression to evaluate, and the | 6164 | <informalexample> |
6155 | second argument is the action if it fails. When | 6165 | <programlisting> |
6156 | <constant>CONFIG_SND_DEBUG</constant>, is set, it will show an | 6166 | <![CDATA[ |
6157 | error message such as <computeroutput>BUG? (xxx)</computeroutput> | 6167 | if (snd_BUG_ON(non_zero_is_bug)) |
6158 | together with stack trace. | 6168 | return -EINVAL; |
6159 | </para> | 6169 | ]]> |
6160 | <para> | 6170 | </programlisting> |
6161 | When no debug flag is set, this macro is ignored. | 6171 | </informalexample> |
6162 | </para> | ||
6163 | </section> | ||
6164 | 6172 | ||
6165 | <section id="useful-functions-snd-bug"> | ||
6166 | <title><function>snd_BUG()</function></title> | ||
6167 | <para> | ||
6168 | It shows the <computeroutput>BUG?</computeroutput> message and | ||
6169 | stack trace as well as <function>snd_assert</function> at the point. | ||
6170 | It's useful to show that a fatal error happens there. | ||
6171 | </para> | 6173 | </para> |
6174 | |||
6172 | <para> | 6175 | <para> |
6173 | When no debug flag is set, this macro is ignored. | 6176 | The macro takes an conditional expression to evaluate. |
6177 | When <constant>CONFIG_SND_DEBUG</constant>, is set, the | ||
6178 | expression is actually evaluated. If it's non-zero, it shows | ||
6179 | the warning message such as | ||
6180 | <computeroutput>BUG? (xxx)</computeroutput> | ||
6181 | normally followed by stack trace. It returns the evaluated | ||
6182 | value. | ||
6183 | When no <constant>CONFIG_SND_DEBUG</constant> is set, this | ||
6184 | macro always returns zero. | ||
6174 | </para> | 6185 | </para> |
6186 | |||
6175 | </section> | 6187 | </section> |
6188 | |||
6176 | </chapter> | 6189 | </chapter> |
6177 | 6190 | ||
6178 | 6191 | ||