linux/sound/sound_core.c
<<
tion.14/spa > .14/form> .14a tion.1 href="../linux+v331.1=/sound/sound_core.c">tion.14img src="../.static/gfx/right.png" alt=">>">ti4/spa > ti4spa class="lxr_search">tiontion.14input typ> hidden" nam> navtarget" tion> ">tion.14input typ> text" nam> search" id search">tion.14butt/optyp> submit">Search .14/form> 4/spa > ti4spa class="lxr_prefs"> .14a href="+prefs?return=sound/sound_core.c"tion.1 onclick="return ajax_prefs();">tion.1Prefs .14/a>ti4/spa > on.1 14/div> on.1 14form ac ="ajax+*" method="post" onsubmit="return false;">ti4input typ> hidden" nam> ajax_lookup" id ajax_lookup" tion> ">ton.1 14/form> ton.1 14div class="headingbott/m">
on.1
on.1 .1 14div id search_results" class="search_results" .> on.1 14/div> 4div id content"> 4div id file_contents">

 L1">1 114/a>4spa  class="comment">/*4/spa > 
 L2">1 124/a>4spa  class="comment"> *on.1 1Sound core.  This file is composed of two parts.  sound_class4/spa > 
 L3">1 134/a>4spa  class="comment"> *on.1 1which is comm/opto both OSS and ALSA and OSS sound core1which4/spa > 
 L4">1 144/a>4spa  class="comment"> *on.1 1is used OSS or emula2 
 L5">1 154/a>4spa  class="comment"> */4/spa > 
 L6">1 164/a>t
 L7">1 174/a>4spa  class="comment">/*4/spa > 
 L8">1 184/a>4spa  class="comment"> *oFirst, the comm/oppart.4/spa > 
 L9">1 194/a>4spa  class="comment"> */4/spa > 
 L10">1 18.1a>#include <linux/module.h.1a>> 
 L11">1 11.1a>#include <linux/device.h.1a>> 
 L12">1 12.1a>#include <linux/err.h.1a>> 
 L13">1 13.1a>#include <linux/kdev_t.h.1a>> 
 L14">1 14.1a>#include <linux/major.h.1a>> 
 L15">1 15.1a>#include <sound/core.h.1a>> 
 L16">1 164/a>t
 L17">1 17.1a>#ifdef14a href="+code=CONFIG_SOUND_OSS_CORE" class="sref">CONFIG_SOUND_OSS_CORE4/a>t
 L18">1 184/a>static int14a href="+code=__init" class="sref">__init4/a>14a href="+code=init_oss_soundcore" class="sref">init_oss_soundcore4/a>(void); 
 L19">1 194/a>static void14a href="+code=cleanup_oss_soundcore" class="sref">cleanup_oss_soundcore4/a>(void); 
 L20">1 28.1a>#else 
 L21">1 214/a>static 4a href="+code=inline" class="sref">inline4/a>1int14a href="+code=init_oss_soundcore" class="sref">init_oss_soundcore4/a>(void)on.1 1{ return 0; } 
 L22">1 224/a>static 4a href="+code=inline" class="sref">inline4/a>1void14a href="+code=cleanup_oss_soundcore" class="sref">cleanup_oss_soundcore4/a>(void) 1{ } 
 L23">1 23.1a>#endif 
 L24">1 244/a>t
 L25">1 254/a>struct14a href="+code=class" class="sref">class4/a>1*4a href="+code=sound_class" class="sref">sound_class4/a>; 
 L26">1 264/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>); 
 L27">1 274/a>t
 L28">1 284/a>4a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION4/a>(4spa  class="string">"Core1sound module"4/spa >); 
 L29">1 294/a>4a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR4/a>(4spa  class="string">"Ala  Cox"4/spa >); 
 L30">1 304/a>4a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE4/a>(4spa  class="string">"GPL"4/spa >); 
 L31">1 314/a>t
 L32">1 324/a>static char1*4a href="+code=sound_devnode" class="sref">sound_devnode4/a>(struct14a href="+code=device" class="sref">device4/a>1*4a href="+code=dev" class="sref">dev4/a>,14a href="+code=umode_t" class="sref">umode_t4/a>1*4a href="+code=mode" class="sref">mode4/a>)t
 L33">1 33.1a>{t
 L34">1 344/a>        if (4a href="+code=MAJOR" class="sref">MAJOR4/a>(4a href="+code=dev" class="sref">dev4/a>->4a href="+code=devt" class="sref">devt4/a>) ==14a href="+code=SOUND_MAJOR" class="sref">SOUND_MAJOR4/a>)t
 L35">1 354/a>                return 4a href="+code=NULL" class="sref">NULL4/a>; 
 L36">1 364/a>        return 4a href="+code=kasprintf" class="sref">kasprintf4/a>(4a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL4/a>,14spa  class="string">"snd/%s"4/spa >,14a href="+code=dev_nam>" class="sref">dev_nam>4/a>(4a href="+code=dev" class="sref">dev4/a>)); 
 L37">1 374/a>} 
 L38">1 384/a>t
 L39">1 394/a>static int14a href="+code=__init" class="sref">__init4/a>14a href="+code=init_soundcore" class="sref">init_soundcore4/a>(void) 
 L40">1 40.1a>{t
 L41">1 414/a>        int14a href="+code=rc" class="sref">rc4/a>; 
 L42">1 424/a>t
 L43">1 434/a>        4a href="+code=rc" class="sref">rc4/a> =14a href="+code=init_oss_soundcore" class="sref">init_oss_soundcore4/a>(); 
 L44">1 444/a>        if (4a href="+code=rc" class="sref">rc4/a>) 
 L45">1 454/a>                return 4a href="+code=rc" class="sref">rc4/a>; 
 L46">1 464/a>t
 L47">1 474/a>        4a href="+code=sound_class" class="sref">sound_class4/a> =14a href="+code=class_create" class="sref">class_create4/a>(4a href="+code=THIS_MODULE" class="sref">THIS_MODULE4/a>,14spa  class="string">"sound"4/spa >); 
 L48">1 484/a>        if (4a href="+code=IS_ERR" class="sref">IS_ERR4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>)) {t
 L49">1 494/a>                4a href="+code=cleanup_oss_soundcore" class="sref">cleanup_oss_soundcore4/a>(); 
 L50">1 504/a>                return 4a href="+code=PTR_ERR" class="sref">PTR_ERR4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>); 
 L51">1 514/a>        } 
 L52">1 524/a>t
 L53">1 534/a>        4a href="+code=sound_class" class="sref">sound_class4/a>->4a href="+code=devnode" class="sref">devnode4/a> =14a href="+code=sound_devnode" class="sref">sound_devnode4/a>; 
 L54">1 544/a>t
 L55">1 554/a>        return 0;t
 L56">1 564/a>} 
 L57">1 574/a>t
 L58">1 584/a>static void14a href="+code=__exit" class="sref">__exit4/a>14a href="+code=cleanup_soundcore" class="sref">cleanup_soundcore4/a>(void) 
 L59">1 59.1a>{t
 L60">1 604/a>        4a href="+code=cleanup_oss_soundcore" class="sref">cleanup_oss_soundcore4/a>(); 
 L61">1 614/a>        4a href="+code=class_destroy" class="sref">class_destroy4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>); 
 L62">1 624/a>} 
 L63">1 634/a>t
 L64">1 644/a>4a href="+code=subsys_initcall" class="sref">subsys_initcall4/a>(4a href="+code=init_soundcore" class="sref">init_soundcore4/a>); 
 L65">1 654/a>4a href="+code=module_exit" class="sref">module_exit4/a>(4a href="+code=cleanup_soundcore" class="sref">cleanup_soundcore4/a>); 
 L66">1 664/a>t
 L67">1 674/a>t
 L68">1 68.1a>#ifdef14a href="+code=CONFIG_SOUND_OSS_CORE" class="sref">CONFIG_SOUND_OSS_CORE4/a>t
 L69">1 694/a>4spa  class="comment">/*4/spa > 
 L70">1 704/a>4spa  class="comment"> *ooooooOSS sound core1handling. Breaks out sound func
	  spto submodules4/spa > 
 L71">1 714/a>4spa  class="comment"> *oooooo4/spa > 
 L72">1 724/a>4spa  class="comment"> *on.1 1Author:         Ala  Cox <ala @lxorguk.ukuu.org.uk>4/spa > 
 L73">1 734/a>4spa  class="comment"> *4/spa > 
 L74">1 744/a>4spa  class="comment"> *on.1 1Fixes:4/spa > 
 L75">1 754/a>4spa  class="comment"> *4/spa > 
 L76">1 764/a>4spa  class="comment"> *4/spa > 
 L77">1 774/a>4spa  class="comment"> *on.1 1This program1is free1software; you ca  redistribute it and/or4/spa > 
 L78">1 784/a>4spa  class="comment"> *oooooomodify it under the terms of the GNU General Public License4/spa > 
 L79">1 794/a>4spa  class="comment"> *ooooooas published by the Free1Software Founda2 
 L80">1 804/a>4spa  class="comment"> *oooooo2 of the License, or (at your 2"
	  ) any later vers 
 L81">1 814/a>4spa  class="comment"> *4/spa > 
 L82">1 824/a>4spa  class="comment"> *on.1 11111111111111111111--------------------4/spa > 
 L83">1 834/a>4spa  class="comment"> *o4/spa > 
 L84">1 844/a>4spa  class="comment"> *on.1 1Top level1handler for the sound subsystem. Various devices ca 4/spa > 
 L85">1 854/a>4spa  class="comment"> *on.1 1plug into this.1The fact they don't all go viaoOSS doesn't meano4/spa > 
 L86">1 864/a>4spa  class="comment"> *on.1 1they don't havepto implement the OSS API.1There is a lot of logic4/spa > 
 L87">1 874/a>4spa  class="comment"> *on.1 1to keeping much of the OSS weight out of the code in a compa2 
 L88">1 884/a>4spa  class="comment"> *oooooomodule, but it's up to the driver to rember to load it...4/spa > 
 L89">1 894/a>4spa  class="comment"> *4/spa > 
 L90">1 904/a>4spa  class="comment"> *ooooooThe code provides a set of func
	  spfor registra2 
 L91">1 914/a>4spa  class="comment"> *ooooooby type.1This is done ra2her tha  providing a single call so that4/spa > 
 L92">1 924/a>4spa  class="comment"> *on.1 1we ca  hide any future cha ges in the internals (eg when1we go to4/spa > 
 L93">1 934/a>4spa  class="comment"> *on.1 132bit dev_t) from the modules and their interface.4/spa > 
 L94">1 944/a>4spa  class="comment"> *4/spa > 
 L95">1 954/a>4spa  class="comment"> *on.1 1Secondly1we need to allocate the dsp, dsp16 and audio devices as4/spa > 
 L96">1 964/a>4spa  class="comment"> *on.1 1one.1Thus we misuse the chains a bit to simplify this.4/spa > 
 L97">1 974/a>4spa  class="comment"> *4/spa > 
 L98">1 984/a>4spa  class="comment"> *ooooooThirdly1to make it more1fun and for 2.3.x and abovepwe do all4/spa > 
 L99">1 994/a>4spa  class="comment"> *ooooooof this using fine grained locking.4/spa > 
 L100">11004/a>4spa  class="comment"> *4/spa > 
 L101">11014/a>4spa  class="comment"> *ooooooFIXME:pwe havepto resolve modules and fine grained load/unload4/spa > 
 L102">11024/a>4spa  class="comment"> *on.1 1locking at some point1in 2.3.x.4/spa > 
 L103">11034/a>4spa  class="comment"> */4/spa > 
 L104">11044/a>t
 L105">1105.1a>#include <linux/init.h.1a>> 
 L106">1106.1a>#include <linux/slab.h.1a>> 
 L107">1107.1a>#include <linux/types.h.1a>> 
 L108">1108.1a>#include <linux/kernel.h.1a>> 
 L109">1109.1a>#include <linux/sound.h.1a>> 
 L110">1118.1a>#include <linux/kmod.h.1a>> 
 L111">11114/a>t
 L112">1112.1a>#define 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a> 16t
 L113">11134/a>t
 L114">1114.1a>struct14a href="+code=sound_unit" class="sref">sound_unit4/a>t
 L115">1115.1a>{t
 L116">11164/a>        int14a href="+code=unit_minor" class="sref">unit_minor4/a>; 
 L117">11174/a>        const struct14a href="+code=file_opera2file_opera2 *4a href="+code=unit_fops" class="sref">unit_fops4/a>; 
 L118">11184/a>        struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=next" class="sref">next4/a>; 
 L119">11194/a>        char14a href="+code=nam>" class="sref">nam>4/a>[32]; 
 L120">1128.1a>}; 
 L121">11214/a>t
 L122">1122.1a>#ifdef14a href="+code=CONFIG_SOUND_MSNDCLAS" class="sref">CONFIG_SOUND_MSNDCLAS4/a>t
 L123">1123.1a>extern int14a href="+code=msnd_classic_init" class="sref">msnd_classic_init4/a>(void); 
 L124">11244/a>#endif 
 L125">1125.1a>#ifdef14a href="+code=CONFIG_SOUND_MSNDPIN" class="sref">CONFIG_SOUND_MSNDPIN4/a>t
 L126">11264/a>extern int14a href="+code=msnd_pinnacle_init" class="sref">msnd_pinnacle_init4/a>(void); 
 L127">11274/a>#endif 
 L128">11284/a>t
 L129">11294/a>4spa  class="comment">/*4/spa > 
 L130">11304/a>4spa  class="comment"> *oBy default,oOSS sound_core claims full legacy minor ra ge (0-255)4/spa > 
 L131">11314/a>4spa  class="comment"> *oof SOUND_MAJOR to trap open attemptspto any sound minor and4/spa > 
 L132">11324/a>4spa  class="comment"> *orequestspmodules using custom sound-slot/service-*pmodule aliases.4/spa > 
 L133">11334/a>4spa  class="comment"> *oThe only benefit of doing this is allowing use of custom module4/spa > 
 L134">11344/a>4spa  class="comment"> *oaliases instead of the standard char-major-*pones.  This behavior4/spa > 
 L135">11354/a>4spa  class="comment"> *oprevents alternative OSS implementa2 
 L136">11364/a>4spa  class="comment"> *oremoved.4/spa > 
 L137">11374/a>4spa  class="comment"> *4/spa > 
 L138">11384/a>4spa  class="comment"> *oCONFIG_SOUND_OSS_CORE_PRECLAIMpand soundcore.preclaim_oss kernel4/spa > 
 L139">11394/a>4spa  class="comment"> *oparam>ter are added to allow distros and developers to try and4/spa > 
 L140">11404/a>4spa  class="comment"> *oswitch to alternative implementa2 
 L141">11414/a>4spa  class="comment"> *othe kernel in the meantime.  If preclaim_oss is non-zero, the4/spa > 
 L142">11424/a>4spa  class="comment"> *okernel will behave the sam>oas before.  All SOUND_MAJOR minors are4/spa > 
 L143">11434/a>4spa  class="comment"> *opreclaimed and the custom moduleoaliases along with standard chrdev4/spa > 
 L144">11444/a>4spa  class="comment"> *oones are emitted if a missing device is opened.  If preclaim_oss is4/spa > 
 L145">11454/a>4spa  class="comment"> *ozero, sound_core only grabs what's actually in use and for missing4/spa > 
 L146">11464/a>4spa  class="comment"> *odevices only the standard chrdevoaliases are requested.4/spa > 
 L147">11474/a>4spa  class="comment"> *4/spa > 
 L148">11484/a>4spa  class="comment"> *oAll these clutters are scheduled to beoremoved along with4/spa > 
 L149">11494/a>4spa  class="comment"> *osound-slot/service-*pmodule aliases.4/spa > 
 L150">11504/a>4spa  class="comment"> */4/spa > 
 L151">1151.1a>#ifdef14a href="+code=CONFIG_SOUND_OSS_CORE_PRECLAIM" class="sref">CONFIG_SOUND_OSS_CORE_PRECLAIM4/a>t
 L152">11524/a>static int14a href="+code=preclaim_oss" class="sref">preclaim_oss4/a> = 1; 
 L153">1153.1a>#else 
 L154">11544/a>static int14a href="+code=preclaim_oss" class="sref">preclaim_oss4/a> = 0;t
 L155">11554/a>#endif 
 L156">11564/a>t
 L157">11574/a>4a href="+code=module_param" class="sref">module_param4/a>(4a href="+code=preclaim_oss" class="sref">preclaim_oss4/a>, int, 0444); 
 L158">11584/a>t
 L159">11594/a>static int14a href="+code=soundcore_open" class="sref">soundcore_open4/a>(struct14a href="+code=inode" class="sref">inode4/a> *, struct14a href="+code=file" class="sref">file4/a> *); 
 L160">11604/a> 
 L161">11614/a>static const struct14a href="+code=file_opera2file_opera2 4a href="+code=soundcore_fops" class="sref">soundcore_fops4/a> = 
 L162">11624/a>{t
 L163">11634/a>        4spa  class="comment">/* We must havepa  owner or the module locking fails */4/spa > 
 L164">11644/a>        .4a href="+code=owner" class="sref">owner4/a>  =14a href="+code=THIS_MODULE" class="sref">THIS_MODULE4/a>, 
 L165">11654/a>        .4a href="+code=open" class="sref">open4/a>   =14a href="+code=soundcore_open" class="sref">soundcore_open4/a>, 
 L166">11664/a>        .4a href="+code=llseek" class="sref">llseek4/a> = 4a href="+code=noop_llseek" class="sref">noop_llseek4/a>, 
 L167">11674/a>}; 
 L168">11684/a>t
 L169">11694/a>4spa  class="comment">/*4/spa > 
 L170">11704/a>4spa  class="comment"> *ooooooLow level1list opera2or. Sca  the ordered list, find a hole and4/spa > 
 L171">11714/a>4spa  class="comment"> *oooooojoin into it. Called with the lock asserted4/spa > 
 L172">11724/a>4spa  class="comment"> */4/spa > 
 L173">11734/a>t
 L174">11744/a>static int14a href="+code=__sound_insert_unit" class="sref">__sound_insert_unit4/a>(struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *14a href="+code=s" class="sref">s4/a>, struct14a href="+code=sound_unit" class="sref">sound_unit4/a> **4a href="+code=list" class="sref">list4/a>, const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=index" class="sref">index4/a>,1int14a href="+code=low" class="sref">low4/a>,1int14a href="+code=top" class="sref">top4/a>) 
 L175">1175.1a>{t
 L176">11764/a>        int14a href="+code=n" class="sref">n4/a>=4a href="+code=low" class="sref">low4/a>; 
 L177">11774/a>t
 L178">11784/a>        if (4a href="+code=index" class="sref">index4/a> < 0) {        4spa  class="comment">/* first free1*/4/spa > 
 L179">11794/a> 
 L180">11804/a>                while (*4a href="+code=list" class="sref">list4/a> && (*4a href="+code=list" class="sref">list4/a>)->4a href="+code=unit_minor" class="sref">unit_minor4/a><n4/a>) 
 L181">11814/a>                        4a href="+code=list" class="sref">list4/a>=&((*4a href="+code=list" class="sref">list4/a>)->4a href="+code=next" class="sref">next4/a>); 
 L182">11824/a>t
 L183">11834/a>                while(4a href="+code=n" class="sref">n4/a><top4/a>) 
 L184">11844/a>                {t
 L185">11854/a>                        4spa  class="comment">/* Found a hole ?1*/4/spa > 
 L186">11864/a>                        if(*4a href="+code=list" class="sref">list4/a>==4a href="+code=NULL" class="sref">NULL4/a> || (*4a href="+code=list" class="sref">list4/a>)->4a href="+code=unit_minor" class="sref">unit_minor4/a>>4a href="+code=n" class="sref">n4/a>) 
 L187">11874/a>                                break; 
 L188">11884/a>                        4a href="+code=list" class="sref">list4/a>=&((*4a href="+code=list" class="sref">list4/a>)->4a href="+code=next" class="sref">next4/a>); 
 L189">11894/a>                        4a href="+code=n" class="sref">n4/a>+=4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>; 
 L190">11904/a>                } 
 L191">11914/a>t
 L192">11924/a>                if(4a href="+code=n" class="sref">n4/a>>=4a href="+code=top" class="sref">top4/a>) 
 L193">11934/a>                        return -4a href="+code=ENOENT" class="sref">ENOENT4/a>; 
 L194">11944/a>        } else {t
 L195">11954/a>                4a href="+code=n" class="sref">n4/a> = 4a href="+code=low" class="sref">low4/a>+(4a href="+code=index" class="sref">index4/a>*16); 
 L196">11964/a>                while (*4a href="+code=list" class="sref">list4/a>) {t
 L197">11974/a>                        if ((*4a href="+code=list" class="sref">list4/a>)->4a href="+code=unit_minor" class="sref">unit_minor4/a>==4a href="+code=n" class="sref">n4/a>) 
 L198">11984/a>                                return -4a href="+code=EBUSY" class="sref">EBUSY4/a>; 
 L199">11994/a>                        if ((*4a href="+code=list" class="sref">list4/a>)->4a href="+code=unit_minor" class="sref">unit_minor4/a>>4a href="+code=n" class="sref">n4/a>) 
 L200">12004/a>                                break; 
 L201">12014/a>                        4a href="+code=list" class="sref">list4/a>=&((*4a href="+code=list" class="sref">list4/a>)->4a href="+code=next" class="sref">next4/a>); 
 L202">12024/a>                } 
 L203">12034/a>        }        
 L204">12044/a>                 
 L205">12054/a>        4spa  class="comment">/*4/spa > 
 L206">12064/a>4spa  class="comment">         *on.1 1Fill it i 4/spa > 
 L207">12074/a>4spa  class="comment">         */4/spa > 
 L208">12084/a>          
 L209">12094/a>        4a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>=4a href="+code=n" class="sref">n4/a>; 
 L210">12104/a>        4a href="+code=s" class="sref">s4/a>->4a href="+code=unit_fops" class="sref">unit_fops4/a>=4a href="+code=fops" class="sref">fops4/a>; 
 L211">12114/a>         
 L212">12124/a>        4spa  class="comment">/*4/spa > 
 L213">12134/a>4spa  class="comment">         *on.1 1Link it4/spa > 
 L214">12144/a>4spa  class="comment">         */4/spa > 
 L215">12154/a>          
 L216">12164/a>        4a href="+code=s" class="sref">s4/a>->4a href="+code=next" class="sref">next4/a>=*4a href="+code=list" class="sref">list4/a>; 
 L217">12174/a>        *4a href="+code=list" class="sref">list4/a>=4a href="+code=s" class="sref">s4/a>; 
 L218">12184/a>         
 L219">12194/a>         
 L220">12204/a>        return 4a href="+code=n" class="sref">n4/a>; 
 L221">12214/a>} 
 L222">12224/a>t
 L223">12234/a>4spa  class="comment">/*4/spa > 
 L224">12244/a>4spa  class="comment"> *on.1 1Remove a node from the chain. Called with the lock asserted4/spa > 
 L225">12254/a>4spa  class="comment"> */4/spa > 
 L226">12264/a>  
 L227">12274/a>static struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=__sound_remove_unit" class="sref">__sound_remove_unit4/a>(struct14a href="+code=sound_unit" class="sref">sound_unit4/a> **4a href="+code=list" class="sref">list4/a>, int14a href="+code=unit" class="sref">unit4/a>) 
 L228">12284/a>{t
 L229">12294/a>        while(*4a href="+code=list" class="sref">list4/a>)t
 L230">12304/a>        {t
 L231">12314/a>                struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=p" class="sref">p4/a>=*4a href="+code=list" class="sref">list4/a>; 
 L232">12324/a>                if(4a href="+code=p" class="sref">p4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>==4a href="+code=unit" class="sref">unit4/a>) 
 L233">12334/a>                {t
 L234">12344/a>                        *4a href="+code=list" class="sref">list4/a>=4a href="+code=p" class="sref">p4/a>->4a href="+code=next" class="sref">next4/a>; 
 L235">12354/a>                        return 4a href="+code=p" class="sref">p4/a>; 
 L236">12364/a>                } 
 L237">12374/a>                4a href="+code=list" class="sref">list4/a>=&(4a href="+code=p" class="sref">p4/a>->4a href="+code=next" class="sref">next4/a>); 
 L238">12384/a>        } 
 L239">12394/a>        4a href="+code=printk" class="sref">printk4/a>(4a href="+code=KERN_ERR" class="sref">KERN_ERR4/a> 4spa  class="string">"Sound device %d went missing!\n"4/spa >,14a href="+code=unit" class="sref">unit4/a>); 
 L240">12404/a>        return 4a href="+code=NULL" class="sref">NULL4/a>; 
 L241">12414/a>} 
 L242">12424/a>t
 L243">12434/a>4spa  class="comment">/*4/spa > 
 L244">12444/a>4spa  class="comment"> *ooooooThis lock guards the sound loader list.4/spa > 
 L245">12454/a>4spa  class="comment"> */4/spa > 
 L246">12464/a>t
 L247">12474/a>static 4a href="+code=DEFINE_SPINLOCK" class="sref">DEFINE_SPINLOCK4/a>(4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L248">12484/a>t
 L249">12494/a>4spa  class="comment">/*4/spa > 
 L250">12504/a>4spa  class="comment"> *ooooooAllocate the controlling structure and add it to the sound driver4/spa > 
 L251">12514/a>4spa  class="comment"> *oooooolist. Acquires locks as needed4/spa > 
 L252">12524/a>4spa  class="comment"> */4/spa > 
 L253">12534/a>t
 L254">12544/a>static int14a href="+code=sound_insert_unit" class="sref">sound_insert_unit4/a>(struct14a href="+code=sound_unit" class="sref">sound_unit4/a> **4a href="+code=list" class="sref">list4/a>, const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=index" class="sref">index4/a>,1int14a href="+code=low" class="sref">low4/a>,1int14a href="+code=top" class="sref">top4/a>, const char1*4a href="+code=nam>" class="sref">nam>4/a>,14a href="+code=umode_t" class="sref">umode_t4/a> 4a href="+code=mode" class="sref">mode4/a>, struct14a href="+code=device" class="sref">device4/a> *4a href="+code=dev" class="sref">dev4/a>)t
 L255">1255.1a>{t
 L256">12564/a>        struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=s" class="sref">s4/a> = 4a href="+code=kmalloc" class="sref">kmalloc4/a>(sizeof(*4a href="+code=s" class="sref">s4/a>),14a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL4/a>); 
 L257">12574/a>        int14a href="+code=r" class="sref">r4/a>; 
 L258">12584/a>t
 L259">12594/a>        if (!4a href="+code=s" class="sref">s4/a>)t
 L260">12604/a>                return -4a href="+code=ENOMEM" class="sref">ENOMEM4/a>; 
 L261">12614/a>t
 L262">12624/a>        4a href="+code=spin_lock" class="sref">spin_lock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L263">12634/a>4a href="+code=retry" class="sref">retry4/a>: 
 L264">12644/a>        4a href="+code=r" class="sref">r4/a> = 4a href="+code=__sound_insert_unit" class="sref">__sound_insert_unit4/a>(4a href="+code=s" class="sref">s4/a>,14a href="+code=list" class="sref">list4/a>, 4a href="+code=fops" class="sref">fops4/a>,14a href="+code=index" class="sref">index4/a>,14a href="+code=low" class="sref">low4/a>,14a href="+code=top" class="sref">top4/a>); 
 L265">12654/a>        4a href="+code=spin_unlock" class="sref">spin_unlock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L266">12664/a>         
 L267">12674/a>        if (4a href="+code=r" class="sref">r4/a> < 0) 
 L268">12684/a>                goto 4a href="+code=fail" class="sref">fail4/a>; 
 L269">12694/a>        else if (4a href="+code=r" class="sref">r4/a> < 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>) 
 L270">12704/a>                4a href="+code=sprintf" class="sref">sprintf4/a>(4a href="+code=s" class="sref">s4/a>->4a href="+code=nam>" class="sref">nam>4/a>,14spa  class="string">"sound/%s"4/spa >,14a href="+code=nam>" class="sref">nam>4/a>); 
 L271">12714/a>        else 
 L272">12724/a>                4a href="+code=sprintf" class="sref">sprintf4/a>(4a href="+code=s" class="sref">s4/a>->4a href="+code=nam>" class="sref">nam>4/a>,14spa  class="string">"sound/%s%d"4/spa >,14a href="+code=nam>" class="sref">nam>4/a>,14a href="+code=r" class="sref">r4/a> / 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>); 
 L273">12734/a>t
 L274">12744/a>        if (!4a href="+code=preclaim_oss" class="sref">preclaim_oss4/a>) {t
 L275">12754/a>                4spa  class="comment">/*4/spa > 
 L276">12764/a>4spa  class="comment">                 * Something else might havepgrabbed the minor.  If4/spa > 
 L277">12774/a>4spa  class="comment">                 * first free1slot is requested, resca  with @low set4/spa > 
 L278">12784/a>4spa  class="comment">                 * to the next unit; o2herwise, -EBUSY.4/spa > 
 L279">12794/a>4spa  class="comment">                 */4/spa > 
 L280">12804/a>                4a href="+code=r" class="sref">r4/a> = 4a href="+code=__register_chrdev" class="sref">__register_chrdev4/a>(4a href="+code=SOUND_MAJOR" class="sref">SOUND_MAJOR4/a>,14a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>, 1,14a href="+code=s" class="sref">s4/a>->4a href="+code=nam>" class="sref">nam>4/a>, 
 L281">12814/a>                                      &4a href="+code=soundcore_fops" class="sref">soundcore_fops4/a>); 
 L282">12824/a>                if (4a href="+code=r" class="sref">r4/a> < 0) {t
 L283">12834/a>                        4a href="+code=spin_lock" class="sref">spin_lock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L284">12844/a>                        4a href="+code=__sound_remove_unit" class="sref">__sound_remove_unit4/a>(4a href="+code=list" class="sref">list4/a>, 4a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>); 
 L285">12854/a>                        if (4a href="+code=index" class="sref">index4/a> < 0) { 
 L286">12864/a>                                4a href="+code=low" class="sref">low4/a> =14a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a> + 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>; 
 L287">12874/a>                                goto 4a href="+code=retry" class="sref">retry4/a>; 
 L288">12884/a>                        } 
 L289">12894/a>                        4a href="+code=spin_unlock" class="sref">spin_unlock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L290">12904/a>                        return -4a href="+code=EBUSY" class="sref">EBUSY4/a>; 
 L291">12914/a>                } 
 L292">12924/a>        } 
 L293">12934/a>t
 L294">12944/a>        4a href="+code=device_create" class="sref">device_create4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>, 4a href="+code=dev" class="sref">dev4/a>, 4a href="+code=MKDEV" class="sref">MKDEV4/a>(4a href="+code=SOUND_MAJOR" class="sref">SOUND_MAJOR4/a>,14a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>), 
 L295">12954/a>                      4a href="+code=NULL" class="sref">NULL4/a>,14spa  class="string">"%s"4/spa >,14a href="+code=s" class="sref">s4/a>->4a href="+code=nam>" class="sref">nam>4/a>+6); 
 L296">12964/a>        return 4a href="+code=s" class="sref">s4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>; 
 L297">12974/a>t
 L298">12984/a>4a href="+code=fail" class="sref">fail4/a>: 
 L299">12994/a>        4a href="+code=kfree" class="sref">kfree4/a>(4a href="+code=s" class="sref">s4/a>); 
 L300">13004/a>        return 4a href="+code=r" class="sref">r4/a>; 
 L301">13014/a>} 
 L302">13024/a>t
 L303">13034/a>4spa  class="comment">/*4/spa > 
 L304">13044/a>4spa  class="comment"> *on.1 1Remove a unit. Acquires locks as needed.oThe drivers MUST have4/spa > 
 L305">13054/a>4spa  class="comment"> *oooooocompleted the removal before their file opera2 
 L306">13064/a>4spa  class="comment"> *ooooooinvalid.4/spa > 
 L307">13074/a>4spa  class="comment"> */4/spa > 
 L308">13084/a>         
 L309">13094/a>static void14a href="+code=sound_remove_unit" class="sref">sound_remove_unit4/a>(struct14a href="+code=sound_unit" class="sref">sound_unit4/a> **4a href="+code=list" class="sref">list4/a>, int14a href="+code=unit" class="sref">unit4/a>) 
 L310">13104/a>{ 
 L311">13114/a>        struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=p" class="sref">p4/a>; 
 L312">13124/a>t
 L313">13134/a>        4a href="+code=spin_lock" class="sref">spin_lock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L314">13144/a>        4a href="+code=p" class="sref">p4/a> = 4a href="+code=__sound_remove_unit" class="sref">__sound_remove_unit4/a>(4a href="+code=list" class="sref">list4/a>, 4a href="+code=unit" class="sref">unit4/a>); 
 L315">13154/a>        4a href="+code=spin_unlock" class="sref">spin_unlock4/a>(&4a href="+code=sound_loader_lock" class="sref">sound_loader_lock4/a>); 
 L316">13164/a>        if (4a href="+code=p" class="sref">p4/a>) { 
 L317">13174/a>                if (!4a href="+code=preclaim_oss" class="sref">preclaim_oss4/a>) 
 L318">13184/a>                        4a href="+code=__unregister_chrdev" class="sref">__unregister_chrdev4/a>(4a href="+code=SOUND_MAJOR" class="sref">SOUND_MAJOR4/a>,14a href="+code=p" class="sref">p4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>, 1, 
 L319">13194/a>                                            4a href="+code=p" class="sref">p4/a>->4a href="+code=nam>" class="sref">nam>4/a>); 
 L320">13204/a>                4a href="+code=device_destroy" class="sref">device_destroy4/a>(4a href="+code=sound_class" class="sref">sound_class4/a>, 4a href="+code=MKDEV" class="sref">MKDEV4/a>(4a href="+code=SOUND_MAJOR" class="sref">SOUND_MAJOR4/a>,14a href="+code=p" class="sref">p4/a>->4a href="+code=unit_minor" class="sref">unit_minor4/a>)); 
 L321">13214/a>                4a href="+code=kfree" class="sref">kfree4/a>(4a href="+code=p" class="sref">p4/a>); 
 L322">13224/a>        } 
 L323">13234/a>} 
 L324">13244/a> 
 L325">13254/a>4spa  class="comment">/*4/spa > 
 L326">13264/a>4spa  class="comment"> *ooooooAllocat 
 L327">13274/a>4spa  class="comment"> *4/spa > 
 L328">13284/a>4spa  class="comment"> *oooooo0       *16             Mixers4/spa > 
 L329">13294/a>4spa  class="comment"> *oooooo1       *8              Sequencers4/spa > 
 L330">13304/a>4spa  class="comment"> *oooooo2       *16             Midi4/spa > 
 L331">13314/a>4spa  class="comment"> *oooooo3       *16             DSP4/spa > 
 L332">13324/a>4spa  class="comment"> *oooooo4       *16             SunDSP4/spa > 
 L333">13334/a>4spa  class="comment"> *oooooo5       *16             DSP164/spa > 
 L334">13344/a>4spa  class="comment"> *on.1 16       --              sndstat (obsolete)4/spa > 
 L335">13354/a>4spa  class="comment"> *oooooo7       *16             unused4/spa > 
 L336">13364/a>4spa  class="comment"> *oooooo8       --              alternate sequencer (see above)4/spa > 
 L337">13374/a>4spa  class="comment"> *      9       *16             raw synthesizer access4/spa > 
 L338">13384/a>4spa  class="comment"> *oooooo10      *16             unused4/spa > 
 L339">13394/a>4spa  class="comment"> *oooooo11      *16             unused4/spa > 
 L340">13404/a>4spa  class="comment"> *oooooo12      *16             unused4/spa > 
 L341">13414/a>4spa  class="comment"> *oooooo13      *16             unused4/spa > 
 L342">13424/a>4spa  class="comment"> *oooooo14      *16             unused4/spa > 
 L343">13434/a>4spa  class="comment"> *oooooo15      *16             unused4/spa > 
 L344">13444/a>4spa  class="comment"> */4/spa > 
 L345">13454/a> 
 L346">13464/a>static struct14a href="+code=sound_unit" class="sref">sound_unit4/a> *4a href="+code=chains" class="sref">chains4/a>[4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>]; 
 L347">13474/a>t
 L348">13484/a>4spa  class="comment">/**4/spa > 
 L349">13494/a>4spa  class="comment"> *o     register_sound_special_device - register a special sound node4/spa > 
 L350">13504/a>4spa  class="comment"> *oooooo@fops:1File opera2 
 L351">13514/a>4spa  class="comment"> *oooooo@unit: Unit number to allocate4/spa > 
 L352">13524/a>4spa  class="comment"> *oooooo@dev: device pointer4/spa > 
 L353">13534/a>4spa  class="comment"> *4/spa > 
 L354">13544/a>4spa  class="comment"> *on.1 1Allocate a special sound device by minor number from the sound4/spa > 
 L355">13554/a>4spa  class="comment"> *oooooosubsystem.4/spa > 
 L356">13564/a>4spa  class="comment"> *4/spa > 
 L357">13574/a>4spa  class="comment"> *      Return:oThe allocated number is returned onosuccess. On failure,4/spa > 
 L358">13584/a>4spa  class="comment"> *ooooooa nega2 
 L359">13594/a>4spa  class="comment"> */4/spa > 
 L360">13604/a>  
 L361">13614/a>int14a href="+code=register_sound_special_device" class="sref">register_sound_special_device4/a>(const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=unit" class="sref">unit4/a>, 
 L362">13624/a>                                  struct14a href="+code=device" class="sref">device4/a> *4a href="+code=dev" class="sref">dev4/a>)t
 L363">13634/a>{ 
 L364">13644/a>        const int14a href="+code=chain" class="sref">chain4/a> = 4a href="+code=unit" class="sref">unit4/a> % 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>; 
 L365">13654/a>        int14a href="+code=max_unit" class="sref">max_unit4/a> = 256; 
 L366">13664/a>        const char1*4a href="+code=nam>" class="sref">nam>4/a>; 
 L367">13674/a>        char14a href="+code=_nam>" class="sref">_nam>4/a>[16]; 
 L368">13684/a>t
 L369">13694/a>        switch (4a href="+code=chain" class="sref">chain4/a>) { 
 L370">13704/a>            case 0: 
 L371">13714/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"mixer"4/spa >; 
 L372">13724/a>                break; 
 L373">13734/a>            case 1: 
 L374">13744/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"sequencer"4/spa >; 
 L375">13754/a>                if (4a href="+code=unit" class="sref">unit4/a> >= 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>) 
 L376">13764/a>                        goto 4a href="+code=__unknown" class="sref">__unknown4/a>; 
 L377">13774/a>                4a href="+code=max_unit" class="sref">max_unit4/a> = 4a href="+code=unit" class="sref">unit4/a> + 1; 
 L378">13784/a>                break; 
 L379">13794/a>            case 2: 
 L380">13804/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"midi"4/spa >; 
 L381">13814/a>                break; 
 L382">13824/a>            case 3: 
 L383">13834/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"dsp"4/spa >; 
 L384">13844/a>                break; 
 L385">13854/a>            case 4: 
 L386">13864/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"audio"4/spa >; 
 L387">13874/a>                break; 
 L388">13884/a>            case 5: 
 L389">13894/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"dspW"4/spa >; 
 L390">13904/a>                break; 
 L391">13914/a>            case 8: 
 L392">13924/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"sequencer2"4/spa >; 
 L393">13934/a>                if (4a href="+code=unit" class="sref">unit4/a> >= 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>) 
 L394">13944/a>                        goto 4a href="+code=__unknown" class="sref">__unknown4/a>; 
 L395">13954/a>                4a href="+code=max_unit" class="sref">max_unit4/a> = 4a href="+code=unit" class="sref">unit4/a> + 1; 
 L396">13964/a>                break; 
 L397">13974/a>            case 9: 
 L398">13984/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"dmmidi"4/spa >; 
 L399">13994/a>                break; 
 L400">14004/a>            case 10: 
 L401">14014/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"dmfm"4/spa >; 
 L402">14024/a>                break; 
 L403">14034/a>            case 12: 
 L404">14044/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"adsp"4/spa >; 
 L405">14054/a>                break; 
 L406">14064/a>            case 13: 
 L407">14074/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"amidi"4/spa >; 
 L408">14084/a>                break; 
 L409">14094/a>            case 14: 
 L410">14104/a>                4a href="+code=nam>" class="sref">nam>4/a> = 4spa  class="string">"admmidi"4/spa >; 
 L411">14114/a>                break; 
 L412">14124/a>            default: 
 L413">14134/a>                { 
 L414">14144/a>                    4a href="+code=__unknown" class="sref">__unknown4/a>: 
 L415">14154/a>                        4a href="+code=sprintf" class="sref">sprintf4/a>(4a href="+code=_nam>" class="sref">_nam>4/a>,14spa  class="string">"unknown%d"4/spa >,14a href="+code=chain" class="sref">chain4/a>); 
 L416">14164/a>                        if (4a href="+code=unit" class="sref">unit4/a> >= 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>) 
 L417">14174/a>                                4a href="+code=strcat" class="sref">strcat4/a>(4a href="+code=_nam>" class="sref">_nam>4/a>,14spa  class="string">"-"4/spa >); 
 L418">14184/a>                        4a href="+code=nam>" class="sref">nam>4/a> = 4a href="+code=_nam>" class="sref">_nam>4/a>; 
 L419">14194/a>                } 
 L420">14204/a>                break; 
 L421">14214/a>        } 
 L422">14224/a>        return 4a href="+code=sound_insert_unit" class="sref">sound_insert_unit4/a>(&4a href="+code=chains" class="sref">chains4/a>[4a href="+code=chain" class="sref">chain4/a>], 4a href="+code=fops" class="sref">fops4/a>,1-1,14a href="+code=unit" class="sref">unit4/a>, 4a href="+code=max_unit" class="sref">max_unit4/a>, 
 L423">14234/a>                                 4a href="+code=nam>" class="sref">nam>4/a>, 4a href="+code=S_IRUSR" class="sref">S_IRUSR4/a> | 4a href="+code=S_IWUSR" class="sref">S_IWUSR4/a>, 4a href="+code=dev" class="sref">dev4/a>); 
 L424">14244/a>} 
 L425">14254/a>  
 L426">14264/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=register_sound_special_device" class="sref">register_sound_special_device4/a>); 
 L427">14274/a>t
 L428">14284/a>int14a href="+code=register_sound_special" class="sref">register_sound_special4/a>(const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=unit" class="sref">unit4/a>) 
 L429">14294/a>{ 
 L430">14304/a>        return 4a href="+code=register_sound_special_device" class="sref">register_sound_special_device4/a>(4a href="+code=fops" class="sref">fops4/a>,14a href="+code=unit" class="sref">unit4/a>, 4a href="+code=NULL" class="sref">NULL4/a>); 
 L431">14314/a>} 
 L432">14324/a>t
 L433">14334/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=register_sound_special" class="sref">register_sound_special4/a>); 
 L434">14344/a> 
 L435">14354/a>4spa  class="comment">/**4/spa > 
 L436">14364/a>4spa  class="comment"> *ooooooregister_sound_mixer - register a mixer device4/spa > 
 L437">14374/a>4spa  class="comment"> *      @fops:1File opera2 
 L438">14384/a>4spa  class="comment"> *oooooo@dev: Unit number to allocate4/spa > 
 L439">14394/a>4spa  class="comment"> *4/spa > 
 L440">14404/a>4spa  class="comment"> *ooooooAllocate a mixer device. Unit is the number of the mixer requested.4/spa > 
 L441">14414/a>4spa  class="comment"> *ooooooPass1-1 to request the next free1mixer unit.4/spa > 
 L442">14424/a>4spa  class="comment"> *4/spa > 
 L443">14434/a>4spa  class="comment"> *ooooooReturn:oOnosuccess, the allocated number is returned. On failure,4/spa > 
 L444">14444/a>4spa  class="comment"> *ooooooa nega2 
 L445">14454/a>4spa  class="comment"> */4/spa > 
 L446">14464/a>t
 L447">14474/a>int14a href="+code=register_sound_mixer" class="sref">register_sound_mixer4/a>(const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=dev" class="sref">dev4/a>)t
 L448">14484/a>{ 
 L449">14494/a>        return 4a href="+code=sound_insert_unit" class="sref">sound_insert_unit4/a>(&4a href="+code=chains" class="sref">chains4/a>[0], 4a href="+code=fops" class="sref">fops4/a>,14a href="+code=dev" class="sref">dev4/a>, 0, 128, 
 L450">14504/a>                                 4spa  class="string">"mixer"4/spa >, 4a href="+code=S_IRUSR" class="sref">S_IRUSR4/a> | 4a href="+code=S_IWUSR" class="sref">S_IWUSR4/a>, 4a href="+code=NULL" class="sref">NULL4/a>); 
 L451">14514/a>} 
 L452">14524/a>t
 L453">14534/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=register_sound_mixer" class="sref">register_sound_mixer4/a>); 
 L454">14544/a> 
 L455">14554/a>4spa  class="comment">/**4/spa > 
 L456">14564/a>4spa  class="comment"> *ooooooregister_sound_midi - register a midi device4/spa > 
 L457">14574/a>4spa  class="comment"> *      @fops:1File opera2 
 L458">14584/a>4spa  class="comment"> *oooooo@dev: Unit number to allocate4/spa > 
 L459">14594/a>4spa  class="comment"> *4/spa > 
 L460">14604/a>4spa  class="comment"> *ooooooAllocate a midi device. Unit is the number of the midi device requested.4/spa > 
 L461">14614/a>4spa  class="comment"> *ooooooPass1-1 to request the next free1midi unit.4/spa > 
 L462">14624/a>4spa  class="comment"> *4/spa > 
 L463">14634/a>4spa  class="comment"> *ooooooReturn:oOnosuccess, the allocated number is returned. On failure,4/spa > 
 L464">14644/a>4spa  class="comment"> *ooooooa nega2 
 L465">14654/a>4spa  class="comment"> */4/spa > 
 L466">14664/a>t
 L467">14674/a>int14a href="+code=register_sound_midi" class="sref">register_sound_midi4/a>(const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=dev" class="sref">dev4/a>)t
 L468">14684/a>{ 
 L469">14694/a>        return 4a href="+code=sound_insert_unit" class="sref">sound_insert_unit4/a>(&4a href="+code=chains" class="sref">chains4/a>[2], 4a href="+code=fops" class="sref">fops4/a>,14a href="+code=dev" class="sref">dev4/a>, 2, 130, 
 L470">14704/a>                                 4spa  class="string">"midi"4/spa >, 4a href="+code=S_IRUSR" class="sref">S_IRUSR4/a> | 4a href="+code=S_IWUSR" class="sref">S_IWUSR4/a>, 4a href="+code=NULL" class="sref">NULL4/a>); 
 L471">14714/a>} 
 L472">14724/a>t
 L473">14734/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=register_sound_midi" class="sref">register_sound_midi4/a>); 
 L474">14744/a> 
 L475">14754/a>4spa  class="comment">/*4/spa > 
 L476">14764/a>4spa  class="comment"> *ooooooDSP's are registered as a triple. Register only one and cheat4/spa > 
 L477">14774/a>4spa  class="comment"> *ooooooin open - see below.4/spa > 
 L478">14784/a>4spa  class="comment"> */4/spa > 
 L479">14794/a>  
 L480">14804/a>4spa  class="comment">/**4/spa > 
 L481">14814/a>4spa  class="comment"> *ooooooregister_sound_dsp - register a DSP device4/spa > 
 L482">14824/a>4spa  class="comment"> *oooooo@fops:1File opera2 
 L483">14834/a>4spa  class="comment"> *oooooo@dev: Unit number to allocate4/spa > 
 L484">14844/a>4spa  class="comment"> *4/spa > 
 L485">14854/a>4spa  class="comment"> *ooooooAllocate a DSP device. Unit is the number of the DSP requested.4/spa > 
 L486">14864/a>4spa  class="comment"> *ooooooPass1-1 to request the next free1DSP unit.4/spa > 
 L487">14874/a>4spa  class="comment"> *4/spa > 
 L488">14884/a>4spa  class="comment"> *ooooooThis func2 
 L489">14894/a>4spa  class="comment"> *o     and will always allocate them as a matching pair - eg dsp3/audio34/spa > 
 L490">14904/a>4spa  class="comment"> *4/spa > 
 L491">14914/a>4spa  class="comment"> *ooooooReturn:oOnosuccess, the allocated number is returned. On failure,4/spa > 
 L492">14924/a>4spa  class="comment"> *ooooooa nega2 
 L493">14934/a>4spa  class="comment"> */4/spa > 
 L494">14944/a> 
 L495">14954/a>int14a href="+code=register_sound_dsp" class="sref">register_sound_dsp4/a>(const struct14a href="+code=file_opera2file_opera2 *4a href="+code=fops" class="sref">fops4/a>,1int14a href="+code=dev" class="sref">dev4/a>)t
 L496">14964/a>{ 
 L497">14974/a>        return 4a href="+code=sound_insert_unit" class="sref">sound_insert_unit4/a>(&4a href="+code=chains" class="sref">chains4/a>[3], 4a href="+code=fops" class="sref">fops4/a>,14a href="+code=dev" class="sref">dev4/a>, 3, 131, 
 L498">14984/a>                                 4spa  class="string">"dsp"4/spa >, 4a href="+code=S_IWUSR" class="sref">S_IWUSR4/a> | 4a href="+code=S_IRUSR" class="sref">S_IRUSR4/a>, 4a href="+code=NULL" class="sref">NULL4/a>); 
 L499">14994/a>} 
 L500">15004/a> 
 L501">15014/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=register_sound_dsp" class="sref">register_sound_dsp4/a>); 
 L502">15024/a>t
 L503">15034/a>4spa  class="comment">/**4/spa > 
 L504">15044/a>4spa  class="comment"> *on.1 1unregister_sound_special -1unregister a special sound device4/spa > 
 L505">15054/a>4spa  class="comment"> *oooooo@unit: unit number to allocate4/spa > 
 L506">15064/a>4spa  class="comment"> *4/spa > 
 L507">15074/a>4spa  class="comment"> *ooooooRelease a sound device that was allocated with4/spa > 
 L508">15084/a>4spa  class="comment"> *ooooooregister_sound_special().oThe unit passed is the return value from4/spa > 
 L509">15094/a>4spa  class="comment"> *o     the register func2 
 L510">15104/a>4spa  class="comment"> */4/spa > 
 L511">15114/a> 
 L512">15124/a>t
 L513">15134/a>void14a href="+code=unregister_sound_special" class="sref">unregister_sound_special4/a>(int14a href="+code=unit" class="sref">unit4/a>) 
 L514">15144/a>{ 
 L515">15154/a>        4a href="+code=sound_remove_unit" class="sref">sound_remove_unit4/a>(&4a href="+code=chains" class="sref">chains4/a>[4a href="+code=unit" class="sref">unit4/a> % 4a href="+code=SOUND_STEP" class="sref">SOUND_STEP4/a>], 4a href="+code=unit" class="sref">unit4/a>); 
 L516">15164/a>} 
 L517">15174/a>  
 L518">15184/a>4a href="+code=EXPORT_SYMBOL" class="sref">EXPORT_SYMBOL4/a>(4a href="+code=unregister_sound_special" class="sref">unregister_sound_special4/a>); 
 L519">15194/a> 
 L520">15204/a>4spa  class="comment">/**4/spa > 
 L521">15214/a>4spa  class="comment"> *oooooounregister_sound_mixer - unregister a mixer4/spa > 
 L522">15224/a>4spa  class="comment"> *oooooo@unit: unit number to allocate4/spa > 
 L523">15234/a>4spa  class="comment"> *4/spa > 
 L524">15244/a>4spa  class="comment"> *on.1 1Release a sound device that was allocated withoregister_sound_mixer().4/spa > 
 L525">15254/a>4spa  class="comment"> *ooooooThe unit passed is the return value from the register func2 
 L526">15264/a>4spa  class="comment"> */4/spa > 
 L527">15274/a>t
 L528">15284/a>void14a href="+code=unregister_sound_mixer" class="sref">unregister_sound_mixer4/a>(int14a href="+code=unit" class="sref">unit4/a>) 
 L529">15umber is returned. On failure,4/spa >530" id
 L5om the register func2unit4/a> % 4a href="+c,14a href5"+code=unit" class="sref5>unit5/a>, 4a href="+code=NULL" class="sref5>NULL4/a>5; 
 L451">14314/5>} 
 L432">14324/a>t
 L527">15274/a>tunit4/a> % 4a href="+c,d_core.c#4a href="+code=register_5ound_5pecial" class="sref">register_sound_5pecial4/a5); 
 L434">14344/a> 
 L435">14354/a>4spa  class="commend/sound_core.c#L528href=und/sound_core.core.c#L456" id
 L456" class="line" nam>
 L45654364/a>4s5a  class="comment"> *ooo5ooreg5ster_sound_mixer - register a mixer dmixer4/spa > 15374/a>4spa  class="comme5t"> *5     @fops:1File opera214384/a>4spa  clas5="com5nt"> *oooooo10      *16             nt"> *4/spa > 
 L524">15244/a>4spa  class="commnd_core.c5L439" id
 L439" class="l5ne" n5m>
 L439">14394/a>4spa  class="commexer().4/spa > 
 L525">15254/a>4spa  clasomment"> 5ooooooAllocate a mixer d5vice.5Unit is the number of the mixeer func2  *o5ooooP5431" id
 L431" class="line" nam>
 L45nd_core.c5L442" id
 L442" class="l5ne" n54512" id
 L512" class="line" nam>
 L512">15ss="line" nam>
 L47e" nam>
 L512">15ss="d
 L528" class="line" nam>
 L528">15284/a>void14a href="+code=unregister_sound_mixe"comment"5 *ooooooReturn:oOnosucce5s, th54(int14a href="+code=unit" class="srefam>
 L4445>14444/a>4spa  class="co5ment"5414" id
 L514" class="line" nam>
 L514">15144/a>{ 
 L515">15154/a>        4a href="+code=soun4a href="+code=unit" class="sref">unit4/a> % 4a href="+cd_core.c#5445" id
 L445" class="li5e" na54>], 4a href="+code=unit" class="sref""> */4/sp5 > SOU5*4a href=5+code=fops" class="sref"5fops45417" id
 L517" class="line" nam>
 L517">15174/a>  
 L47e" nam>
 L512">15ss="d
 L"sref">unit4/a> % 4a href="+cd" class=")tunregister_sound_shref="+co5e=fops" class="sref">fop54/a>,5ial_device - register a spec nam>
 L434">14344/a> S5IWUSR5ooooo@fops:1File opera2
 L512">15a hrefund/sound_cornd_core.c#L481" id
 L481" class="line" nam>
 L45>NULL4/a>5;  *oooooo@unit: Unit number to allmixer4/spa > 14514/5>}  *oooooo@dev: device pointer4/spa > 
 L353">13534/a>4spa  class="comment"> *4/spa > 
 L524">15244/a>4spa  class="comm_mixer4/a5); 
 L525">15254/a>4spa  clasd_core.c#5455" id
 L455" class="li5e" na5a>4spa  class="comment"> *oooooosubsystem.4/spa >  *o5oooor5gister_sound_midi - register a midi Bund/L485" ind_core.c#).4/spa >  *4dss="line" autom
 L3nd_ys="line" nam>
 L525">15254/a>4spa  clasd4a href=5574/a>4spa  class="comme5t"> *5     @fops:1File opera2 
5L458">14584/a>4spa  clas5="com55ial" class="sref">unregister_sound_snd_core.c5L459" id
 L459" class="l5ne" n5m>
 L4id
 L512" class="line" nam>
 L512">15ss="line" nam>
 L5e" nam>
 L512">15ss=d
 L528" class="line" nam>
 L528">15284/a>void14a href="+code=unregister_sound_mixet"> *oooo5oAllocate a midi device.5Unit 5s the 4a href="+code=unit" class="sref">14614/a54spa  class="comment"> *5ooooo5,1int14a href= class="line" nam>
 L514">15144/a>{ 
 L515">15154/a>        4a href="+code=soun4a href="+code=unit" class="sref">unit4/a> % 4a href="+cnd_core.c5L462" id
 L462" class="l5ne" n5m>
 L4a href="+code=unit" class="sref""comment"5 *ooooooReturn:oOnosucce5s, th56ecial" class="sref">register_sound_5am>
 L4645>14644/a>4spa  class="co5ment"56
 L344">13444/a>4spa  class="commen5d_core.c#5465" id
 L465" class="li5e" na5625" id
 L425" class="line" nam>
 L425">14254/a>  
 L512">15ss="line" nam>
 L5e" nam>
 L512">15ss=d
 L"sref">unit4/a> % 4a href="+cn14564/a>5 > SOU5*4a href=5+code=fops" class="sref"5fops45a>,1inst
 L3
 L495" class="line" naass="s144/a>{ file_opera2 *5f">dev4/a5)tfop54/a>,54a href="+code L495" class="line" naass="s144/a>{ 15154     sref">unit4/a> % 4a href="+cref="+cod5=S_IWUSR" class="sref">S5IWUSR5ss="line" nam>ref">unit4/a> % 4a href="+cr>14614/a5; 
 L515">15154     =L515" class="line" nam>
 L515">15154/a>        4a href="+code=sound_insert_unit" class="srefsref">unit4/a> % 4a href="+crd_core.c5>} 
 Lwhileound_core.c#L426am>
 L515">15154       id
  id
 = class="line" nam>
 L515">15154     -#L41struct14a href="+co_core.de=file_opera2file_opera2 *5PORT_SYMB5L4/a>(4a href="+code=reg5ster_5ss="line" nam>4a href="+code=unit" class="srefhm>
 L4645); &quoound_core.c#L426am>
 L515">15154     -#L41struct14a href="+co_core.de=file_opera2file_opera2 *5P_core.c#5L475" id
 L475" class="l5ne" n5f="+code=SOUND_STEP" class="sr class="line" nam>
 L49m>
 L515">15154     sref">unit4/a> % 4a href="+cr14564/a>5 *ooooooDSP's are re5ister5ref="+code=__unknown" class="sref">__am>
 L515">15154     =L515" class="liam>
 L515">15154     -#L41struct14a href=sounm>
 L515">15154soun    sref">unit4/a> % 4a href="+cr4a href=5e" nam>
 L477">14774/a>45pa  c5= 4a href="+coa href="+code=unit" class="sref"d_core.c#5478" id
 L478" class="li5e" na5768" id
 L468" class="line" nam>
 L4a >, 4a href="+code=S_IWUSRsref">unit4/a> % 4a href="+c> */4/spa5> 15104/a>4spa  class="comment1">14814/5>4spa  class="comment"> 5ooooo5registst
 L3
nst struct14a href= clas="code=rd_insert_unit" c clas="code=rdd
 L5 L495" class="line" naorede_insert_unit" coredes="srd_dsp" class="srorede_insert_unit" coredes="s,
 L495" class="line" nam>
 _insert_unit" cm>
 s="srd_dsp" class="srm>
 _insert_unit" cm>
 s="sss="sref">file_opera2 *5
 L482">15824/a>4spa  class="comme5t"> *5ooooo@4a href="+code=unit" class="srefne" nam>
5L483">14834/a>4spa  clas5="com5a> = 4spa  cla28" class="line" nasound_insert_unit" class="sresref">unit4/a> % 4a href="+c>m>
 L4645L484" id
 L484" class="l5ne" n5"line" nam>
 Lnst struct14a href="+code=file_opera2unit4/a> % 4a href="+cs="commen5"> *ooooooAllocate a DSP5devic5ss="line" nam> L495" class="line" naass="s144/a>{ 15154     sref">unit4/a> % 4a href="+c6">14864/5>4spa  class="comment"> 5ooooo5 = 4spa  class5" id
 L495" class="line" nam>
 L495">14954/a>int14a href="+code=register_sound_dsp" class="srnew_d_insert_unit" clasnew_d_in claore.c#L418" id
 L4a >, 4a href="+code=S_IWUSRsref">unit4/a> % 4a href="+c>4a href=5L487" id
 L487" class="l5ne" n5m>
 L4ref">unit4/a> % 4a href="+c>_core.c#5oooThis func2class="line" nasound_insert_unit" class="sre=L515" class="li"+code=file_opera2unit4/a> % 4a href="+c"comment"5 *o     and will always 5lloca5> = 4spa  clasuoound_core.c#L426sound_insert_unit" class="sre==4 |                 sound_insert_unit" class="sre==5)ne" nam>cice - register a spec n489"class=/89"16foer func2 
 L4a href="+code=unit" class="sref"comment"5 *ooooooReturn:oOnosucce5s, th5ss="line" nam>
 L391">13914/a>       "+code=file_opera2unit4/a> % 4a href="+c" L482">15>14924/a>4spa  class="co5ment"5pa  class="string">&qu13914/a>       "+code=file_opera2unit4/a> % 4a href="+c"e" nam>
5493" id
 L493" class="li5e" na5f="+code=SOUND_STEP" c               sound_insert_unit" class="sre=3sref">unit4/a> % 4a href="+c"m>
 L4645 > 14864/5)t15154 pin_lockL515" id
 L515" class="lit" claloader_lockm>
 L515">15154 " claloader_locks="s"sref">unit4/a> % 4a href="+chref="+co5e=fops" class="sref">fop54/a>,54a href="+codeund_core.c#L426am>
 L515">15154      re.c#L418" id
 L41_look_fors144/a>{ unit4/a> % 4a href="+cref="+cod5=S_IRUSR" class="sref">S5IRUSR5= 4spa  class=="sref">chain4/a>);am>
 L515">15154     ss="sref">file_opera2 *6>NULL4/a>6; 
 L399"codeund_core.c#L426new_d_insert_unit" clasnew_d_in claore.c#L418" id
 L4d_in_gehref="+code=unitd_in_gehd
 L5class="line" naam>
 L515">15154     -#L41struct14a href="+co_d_insert_unit" clas"+co_d_inass="sref">unit4/a> % 4a href="+69">14994/6>} 
="sref">chain4/a>);prea him_osnsert_unit" clasprea him_osn      id
  id
 =!und_core.c#L426new_d_insert_unit" clasnew_d_in cla)L4a href="+code=unit" class="sre6EXPORT_SY6BOL4/a>(4a href="+code=r6giste6> = 4spa  class="strin_dsp" class="srapin_unlockm>
 L515">15154 pin_unlockL515" id
 L515" class="lit" claloader_lockm>
 L515">15154 " claloader_locks="s"sref">unit4/a> % 4a href="+6nd_dsp4/a6); unit4/a> % 4a href="+6n4_dsp4/a6)93" id
 L493" class="li6e" na6s="line" nam>
 L403">14d
 L474" class="line" nam>
 L474">14744/a>  *on.1 1unregister_6ound_6pecial -1unregister a specialllllllllllllllll*  P"> *4, don>/*4/t lasng="sois ord.c#Lr hrefs="line" nam>
 L525">15254/a>4spa  cla6e" nam>
 6505">15054/a>4spa  class6"comm6nt"> *oooooo@unit: unit numbellllllllllllllll*  FLr ALSA slot meanspa > 
 L525">15254/a>4spa  cla6e7 nam>
 65t
 L506">15064/a>4spa  classllllllllllllllll*  spaessounddd-te modulesswhichpa >n>/*4/t depee2hon="line" nam>
 L525">15254/a>4spa  cla6e8 nam>
 65=fops" class="sref">fop6ooRel6ase a sound device that was allllllllllllllll*  ALSA toplevel modulesssouna > 
 L525">15254/a>4spa  cla6e9 nam>
 65S_IRUSR" class="sref">S6cial(6.oThe unit passed is the retullllllllllllllll*  loadound/sot first.lll[Jaroslav Kysela  l41=reex@jcu.cz#L41]="line" nam>
 L525">15254/a>4spa  cla6ass="line6 nam>
 L509">15094/a>4sp6  cla6s="comment"> *o     the regisllllllllllllllll*er func2 L515" class="li > 
 L515">15154 > sd_core.c#L470" id
 L470" class="+code=file_opera2unit4/a> % 4a href="+6"> */4/sp6 > 
 L411"ng">L515" class="li > 
 L515">15154 > sd-ef">sd_core.c#L470" id
 L470" class="+code=file_opera2sprintf4/a>(4a href="+code=_nam>" class="sref">_nam>4/a>,14spa  clas611">151146a> unit4/a> % 4a href="+6 class="s6ef">unregister_sound_spe6ial4/6lass="line" nam>
 L4134d
 L474" class="line" nam>
 L474">14744/a> unit4/a6)  scheduled="line" nam>
 L525">15254/a>4spa  cla6ode=SOUND6STEP" class="sref">SOUND6STEP461t"> *oooooo@unit: unit numbellllllllllllllll* sounund_cald chfavoc#L485" istge2ardo_nar-major-nam>
 L474">14744/a> 
 6; 15064/a>4spa  classllllllllllllllll* module ali *4s.  FLr 5" itim> 
 L474">14744/a> 
 6}  *4am>
 L474">14744/a> 
 6ref="+code=unregister_so6nd_sp61oThe unit passed is the retullllllllllllllll* transiclass="line" nam>
 L525">15254/a>4spa  cla6pecial4/a6);  ="sref">chain4/a>); > 
 L515">15154 > sprintfchainsMAJO    4spa  class="hainsMAJO "srecoref="+code=soun4a href="+code=unit" class="c#L41 0ss="sref">file_opera2 *6">15214/a64spa  class="comment"> *6ooooo62line" nam>
 L411"ng">m>
 L4134f">chain4/a>); > 
 L515">15154 > sprintfchainsMAJO    4spa  class="hainsMAJO "sreass="sref">_nam>4/a>,14spa  clas6e" nam>
 6522">15224/a>4spa  class6"comm62502" ref">unit4/a> % 4a href="+6nd_core.c6L523" id
 L523" class="l6ne" n62="+code=SOUND_STEP" c               apin_lockm>
 L515">15154 pin_lockL515" id
 L515" class="lit" claloader_lockm>
 L515">15154 " claloader_locks="s"sref">unit4/a> % 4a href="+6ent"> *on61 1Release a sound devic6 that62pa  class="string">&qund_core.c#L426am>
 L515">15154      re.c#L418" id
 L41_look_fors144/a>{ unit4/a> % 4a href="+6s="commen6"> *ooooooThe unit passe6 is t62="+code=SOUND_STEP" c="sref">chain4/a>);am>
 L515">15154     ss="sref">file_opera2 *6d_core.c#6526" id
 L526" class="li6e" na62ef="+code=__unknown" ring">&qund_core.c#L426new_d_insert_unit" clasnew_d_in claore.c#L418" id
 L4d_in_gehref="+code=unitd_in_gehd
 L5class="line" naam>
 L515">15154     -#L41struct14a href="+co_d_insert_unit" clas"+co_d_inass="sref">unit4/a> % 4a href="+6"> */4/sp6 > unregister_sound_m6xer4/62 4spa  class=="sref">chain4/a>);new_d_insert_unit" clasnew_d_in cla)L4a href="+code=unit" class="sre6">unit4/a6) 
 L399"codeud
 L474" class="line" nam>
 L474">14744/a> /*4/t br().loadedLwhile 5" am>
 L474">14744/a>  *oooooo@unit: Unit numbeffffffffffffffff* subund_coa href=re, re=="s-#L41e=rd()a hr > 
 L474">14744/a> 
 6>}  *oooooo@dev: dffffffffffffffff* safa"y dropc#L525"f=rence crefnd_coe2h="sund/sonotd/e canam>
 L474">14744/a> 
 L353">13534/a>4spa  classffffffffffffffff* re_cotpto olds-#L41f_op. Uglyconsdeed, but"soun>/*4/sp#L52cost#L4am>
 L474">14744/a>  *on6); 
 L525">15254/a>4spa  cla6d_core.c#6435" id
 L435" class="li6e" na6>
 L435">14354/a>4spa  class=ffffffffffffffff*er func2  *ooo6ooreg63ef="+code=__unknown" nst struct14a href=er.de=file_opera2unit4/a> % 4a href="+6
 L437">16374/a>4spa  class="comme6t"> *63a href="+code=dev" cl5" id
 L495" class="line" nam>
 L495">14954/a>int14a href="+code=register_sound_dsp" class="srold_d_insert_unit" clasold_d_in claore.c#L418" id
 L4d>
 _insert_unit" cm>
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSRsref">unit4/a> % 4a href="+6
" class=6L438">14384/a>4spa  clas6="com639a  class="string">&qund_core.c#L426d>
 _insert_unit" cm>
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSRore.c#L418" id
 L4new_d_insert_unit" clasnew_d_in clasref">unit4/a> % 4a href="+6nd_core.c6L439" id
 L439" class="l6ne" n64line" nam>
 L399"codeund_core.c#L426apin_unlockm>
 L515">15154 pin_unlockL515" id
 L515" class="lit" claloader_lockm>
 L515">15154 " claloader_locks="s"sref">unit4/a> % 4a href="+6omment"> 6ooooooAllocate a mixer d6vice.64
 L510">15104/a>4spa  class="commen6>14414/a>6spa  class="comment"> *o6ooooP64line" nam>
 L411"ng">="sref">chain4/a>);d>
 _insert_unit" cm>
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSR-#L41struct14a href=e=rd_insert_unit" ce=rdd
 Lss="sref">file_opera2 *6nd_core.c6L442" id
 L442" class="l6ne" n64a  class="string">&qu399"codeund_core.c#L426er.de=file_opera2chain4/a>);d>
 _insert_unit" cm>
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSR-#L41struct14a href=e=rd_insert_unit" ce=rdd
 Lound_core.c#L426orede_insert_unit" coredes="s,ef">chain4/a>);d>
 _insert_unit" cm>
 s="s"sref">unit4/a> % 4a href="+6od_core.c6 *ooooooReturn:oOnosucce6s, th64ecial" class="sref">register_sound_6am>
 L4446>14444/a>4spa  class="co6ment"64pa  class="string">&quosref">chain4/a>);er.de=file_opera2
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSR"sref">unit4/a> % 4a href="+6o364/a>4s6 > &qund_core.c#L426d>
 _insert_unit" cm>
 s="s-#L41struct14a href=f_op_insert_unit" cm_opWUSRore.c#L418" id
 L4d_in_gehref="+code=unitd_in_gehd
 L5class="line" naold_d_insert_unit" clasold_d_in cla"sref">unit4/a> % 4a href="+6o L437">16+code=fops" class="sref"6fops464a href="+code=dev" cla href="+code=unit" class="sref6d" class=6)tunregister_sound_6href="+co6e=fops" class="sref">fop64/a>,64a href="+code=dev" cl.c#L418" id
 L4d_in_puhref="+code=unitd_in_puhd
 Lound_core.c#L426old_d_insert_unit" clasold_d_in cla"sref">unit4/a> % 4a href="+6ref="+cod6=S_IWUSR" class="sref">S6IWUSR654spa  class="string"> class="line" nam>
 L4er.de=file_opera2unit4/a> % 4a href="+6r14414/a>6; 
 La href="+code=unit" class="sref61">14514/6>} 
 L515">15154 pin_unlockL515" id
 L515" class="lit" claloader_lockm>
 L515">15154 " claloader_locks="s"sref">unit4/a> % 4a href="+6RT_SYMBOL6/a>(4a href="+code=regis6er_so65="+code=SOUND class=-L515" class="liENODEVm>
 L515">15154ENODEV clasref">unit4/a> % 4a href="+6rm>
 L4446); 14654/a>4spa  class="commen6>14564/a>6spa  class="comment"> *o6oooor6gister_515" class="liMODULE_ALIAS_CHARDEVsMAJO    4spa  class=MODULE_ALIAS_CHARDEVsMAJO d
 Lound_core.c#L426chainsMAJO    4spa  class="hainsMAJO "sreass="sref">_nam>4/a>,14spa  clas6d4a href=6574/a>4spa  class="comme6t"> *65>
 L4ref">unit4/a> % 4a href="+6ne" nam>
6L458">14584/a>4spa  clas6="com65ial" st
 L3
id
 L512" class="lincleanup_osn512">1 hre_insert_unit" clleanup_osn512">1 hred
 Loid
 ss="sref">file_opera2 *6nd_core.c6L459" id
 L459" class="l6ne" n6m>
 L44a href="+code=unit" class="sre6t"> *oooo6oAllocate a midi device.6Unit 664spa  class="cice - register a spec n4We haveonot.c#L4spa >nd_y do f=re -d/e know 5" ilists must brr func2 14614/a64spa  class="comment"> *6ooooo6ass1-1 to request the next frrrrrrrrrrremptyf*er func2 
 L5chrt4/a>(&4a hrefe" nam>
 L5chrt4/d
 Lound_core.c#L426chainsMAJO    4spa  class="hainsMAJO "sre,a>, 3, 131, _nam>4/a>,14spa  clas6"comment"6 *ooooooReturn:oOnosucce6s, th66eciala href="+code=unit" class="sref6am>
 L4646>14644/a>4spa  class="co6ment"66
 L344">13444/a>4spa  class="commen6d_core.c#6465" id
 L465" class="li6e" na6625" ist
 L3
nst struct14a href=__i44/a>{ 1 hre_insert_unit" corit_osn512">1 hred
 Loid
 ss="sref">file_opera2 *6n14564/a>6 > chain4/a>);prea him_osnsert_unit" clasprea him_osn      id
  id
 a href="+code=unit" class="sre6te" nam>
6)tchain4/a>); >am>
 L5chrt4/a>(&4a href nam>
 L5chrt4/d
 Lound_core.c#L426chainsMAJO    4spa  class="hainsMAJO "sre,a>, 3, 131, fop64/a>,64a href="+code=dev" clef">chain4/a>);prnstkm>
 L515">15154prnstkd
 Lound_core.c#L426KERN_ER    4spa  class=KERN_ER s="sru, 3, 131,  _nam>4/a>,14spa  clas6ref="+cod6=S_IWUSR" class="sref">S6IWUSR674spa  class="string"> class=-L515" class="liEBUSYm>
 L515">15154EBUSY clasref">unit4/a> % 4a href="+6r>14614/a6; 
 La href="+code=unit" class="sref6rd_core.c6>} unit4/a> % 4a href="+6PORT_SYMB6L4/a>(4a href="+code=reg6ster_67="+code=SOUND class=0sref">unit4/a> % 4a href="+6hm>
 L4646); 14654/a>4spa  class="commen6r14564/a>6 *ooooooDSP's are re6ister6ref="+#end="scice - register a spec n4CONFIG_"hainsOSS_COREf*er func2 
 L477">14774/a>46pa  c6ass="co/preco/div>


o/div>


 L4foo
 L">
xer(original LXRpa ftwa > by 5" i/o.4/spa http:/hrefrceforge.net/projects/lxL">LXRper a"+coy"sre,asois experia spal versste by /o.4/spa mailto:lxL@77"ux.no">lxL@77"ux.no"sre.
o/div>

 L4subfoo
 L">
lxL.77"ux.no kind_y hoclas by /o.4/spa http:/hwww.redpill-77"pro.no">Redpill L7"pro AS"sre,aprovid.c#L48L7"uxl5" iultc#L4oe2h>