diff options
Diffstat (limited to 'en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml')
-rw-r--r-- | en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml b/en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml index 2f7089b164..ce578f7228 100644 --- a/en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml +++ b/en_US.ISO8859-1/books/arch-handbook/sound/chapter.sgml @@ -18,12 +18,12 @@ </chapterinfo> <title>Sound subsystem</title> - + <sect1 id="oss-intro"> <title>Introduction</title> <indexterm><primary>sound subsystem</primary></indexterm> - + <para>The FreeBSD sound subsystem cleanly separates generic sound handling issues from device-specific ones. This makes it easier to add support for new hardware.</para> @@ -53,7 +53,7 @@ <listitem> <para>Additional support for some common hardware interfaces (ac97), or shared hardware-specific code (ex: ISA DMA - routines).</para> + routines).</para> </listitem> </itemizedlist> @@ -103,7 +103,7 @@ linkend="isa-driver"> ISA</link> or <link linkend="pci">PCI</link> specific sections of the handbook for more information.</para> - + <para>However, sound drivers differ in some ways:</para> <itemizedlist> @@ -169,7 +169,7 @@ resources.</para> </listitem> </itemizedlist> - + <para>There are two possible methods to handle non-PnP devices:</para> <itemizedlist> <listitem> @@ -205,7 +205,7 @@ <para>There are two main interfaces that a sound driver will usually provide: <emphasis>CHANNEL</emphasis> and either <emphasis>MIXER</emphasis> or <emphasis>AC97</emphasis>.</para> - + <para>The <emphasis>AC97</emphasis> interface is a very small hardware access (register read/write) interface, implemented by drivers for hardware with an AC97 codec. In this case, the @@ -250,7 +250,7 @@ <function>sndbuf_getsize()</function> and is divided into fixed size blocks of <function>sndbuf_getblksz()</function> bytes.</para> - + <para>When playing, the general transfer mechanism is as follows (reverse the idea for recording):</para> @@ -294,9 +294,9 @@ are initiated from the sound driver attach routine. (See the <link linkend="pcm-probe-and-attach">probe and attach section</link>).</para> - + <programlisting> static void * - xxxchannel_init(kobj_t obj, void *data, + xxxchannel_init(kobj_t obj, void *data, struct snd_dbuf *b, struct pcm_channel *c, int dir)<co id="co-chinit-params"/> { struct xxx_info *sc = data; @@ -343,7 +343,7 @@ <para><function>xxxchannel_setformat()</function> should set up the hardware for the specified channel for the specified sound format.</para> - + <programlisting> static int xxxchannel_setformat(kobj_t obj, void *data, u_int32_t format)<co id="co-chsetformat-params"/> { @@ -395,7 +395,7 @@ <para>Most sound drivers only take note of the block size here, to be used when an actual transfer will be started.</para> - + <programlisting> static int xxxchannel_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) { @@ -409,7 +409,7 @@ <para>The function returns the possibly adjusted block size. In case the block size is indeed changed, <function>sndbuf_resize()</function> should be called to - adjust the buffer.</para> + adjust the buffer.</para> </callout> </calloutlist> @@ -421,8 +421,8 @@ <para><function>xxxchannel_trigger()</function> is called by <devicename>pcm</devicename> to control data transfer - operations in the driver.</para> - + operations in the driver.</para> + <programlisting> static int xxxchannel_trigger(kobj_t obj, void *data, int go)<co id="co-chtrigger-params"/> { @@ -461,7 +461,7 @@ </listitem> </itemizedlist> - </callout> + </callout> </calloutlist> <note><para>If the driver uses ISA DMA, @@ -480,7 +480,7 @@ be called by <function>chn_intr()</function>, and this is how <devicename>pcm</devicename> knows where it can transfer new data.</para> - + </sect3> <sect3> @@ -491,7 +491,7 @@ unloaded, and should be implemented if the channel data structures are dynamically allocated or if <function>sndbuf_alloc()</function> was not used for buffer - allocation.</para> + allocation.</para> </sect3> @@ -536,7 +536,7 @@ <sect2> <title>The MIXER interface</title> - + <sect3 id="xxxmixer-init"> <title>mixer_init</title> @@ -557,7 +557,7 @@ [Set appropriate bits in v for record mixers] mix_setrecdevs(m, v) - return 0; + return 0; }</programlisting> <calloutlist> @@ -583,7 +583,7 @@ level for one mixer device.</para> <programlisting> static int - xxxmixer_set(struct snd_mixer *m, unsigned dev, + xxxmixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right)<co id="co-mxset-params"/> { struct sc_info *sc = mix_getdevinfo(m); @@ -614,7 +614,7 @@ <para><function>xxxmixer_setrecsrc()</function> sets the recording source device.</para> - + <programlisting> static int xxxmixer_setrecsrc(struct snd_mixer *m, u_int32_t src)<co id="co-mxsr-params"/> { @@ -650,7 +650,7 @@ <para><function>xxxmixer_reinit()</function> should ensure that the mixer hardware is powered up and any settings not controlled by <function>mixer_set()</function> or - <function>mixer_setrecsrc()</function> are restored.</para> + <function>mixer_setrecsrc()</function> are restored.</para> </sect3> </sect2> |