1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>snd_ac97_bus</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The ALSA Driver API"><link rel="up" href="ch03s02.html" title="AC97 Codec API"><link rel="prev" href="API-snd-ac97-get-short-name.html" title="snd_ac97_get_short_name"><link rel="next" href="API-snd-ac97-mixer.html" title="snd_ac97_mixer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">snd_ac97_bus</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-snd-ac97-get-short-name.html">Prev</a> </td><th width="60%" align="center">AC97 Codec API</th><td width="20%" align="right"> <a accesskey="n" href="API-snd-ac97-mixer.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-snd-ac97-bus"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>snd_ac97_bus — 2 create an AC97 bus component 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">snd_ac97_bus </b>(</code></td><td>struct snd_card * <var class="pdparam">card</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">num</var>, </td></tr><tr><td> </td><td>struct snd_ac97_bus_ops * <var class="pdparam">ops</var>, </td></tr><tr><td> </td><td>void * <var class="pdparam">private_data</var>, </td></tr><tr><td> </td><td>struct snd_ac97_bus ** <var class="pdparam">rbus</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1094705940"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>card</code></em></span></dt><dd><p> 4 the card instance 5 </p></dd><dt><span class="term"><em class="parameter"><code>num</code></em></span></dt><dd><p> 6 the bus number 7 </p></dd><dt><span class="term"><em class="parameter"><code>ops</code></em></span></dt><dd><p> 8 the bus callbacks table 9 </p></dd><dt><span class="term"><em class="parameter"><code>private_data</code></em></span></dt><dd><p> 10 private data pointer for the new instance 11 </p></dd><dt><span class="term"><em class="parameter"><code>rbus</code></em></span></dt><dd><p> 12 the pointer to store the new AC97 bus instance. 13 </p></dd></dl></div></div><div class="refsect1"><a name="idp1094711668"></a><h2>Description</h2><p> 14 Creates an AC97 bus component. An struct snd_ac97_bus instance is newly 15 allocated and initialized. 16 </p><p> 17 18 The ops table must include valid callbacks (at least read and 19 write). The other callbacks, wait and reset, are not mandatory. 20 </p><p> 21 22 The clock is set to 48000. If another clock is needed, set 23 (*rbus)->clock manually. 24 </p><p> 25 26 The AC97 bus instance is registered as a low-level device, so you don't 27 have to release it manually. 28</p></div><div class="refsect1"><a name="idp1094713188"></a><h2>Return</h2><p> 29 Zero if successful, or a negative error code on failure. 30</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-snd-ac97-get-short-name.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-snd-ac97-mixer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">snd_ac97_get_short_name</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">snd_ac97_mixer</span></td></tr></table></div></body></html> 31