Lines Matching full:unit
215 static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit) in __sound_remove_unit() argument
220 if(p->unit_minor==unit) in __sound_remove_unit()
227 printk(KERN_ERR "Sound device %d went missing!\n", unit); in __sound_remove_unit()
266 * to the next unit; otherwise, -EBUSY. in sound_insert_unit()
293 * Remove a unit. Acquires locks as needed. The drivers MUST have
298 static void sound_remove_unit(struct sound_unit **list, int unit) in sound_remove_unit() argument
303 p = __sound_remove_unit(list, unit); in sound_remove_unit()
340 * @unit: Unit number to allocate
350 int register_sound_special_device(const struct file_operations *fops, int unit, in register_sound_special_device() argument
353 const int chain = unit % SOUND_STEP; in register_sound_special_device()
364 if (unit >= SOUND_STEP) in register_sound_special_device()
366 max_unit = unit + 1; in register_sound_special_device()
382 if (unit >= SOUND_STEP) in register_sound_special_device()
384 max_unit = unit + 1; in register_sound_special_device()
405 if (unit >= SOUND_STEP) in register_sound_special_device()
411 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit, in register_sound_special_device()
417 int register_sound_special(const struct file_operations *fops, int unit) in register_sound_special() argument
419 return register_sound_special_device(fops, unit, NULL); in register_sound_special()
427 * @dev: Unit number to allocate
429 * Allocate a mixer device. Unit is the number of the mixer requested.
430 * Pass -1 to request the next free mixer unit.
452 * @dev: Unit number to allocate
454 * Allocate a DSP device. Unit is the number of the DSP requested.
455 * Pass -1 to request the next free DSP unit.
474 * @unit: unit number to allocate
477 * register_sound_special(). The unit passed is the return value from
482 void unregister_sound_special(int unit) in unregister_sound_special() argument
484 sound_remove_unit(&chains[unit % SOUND_STEP], unit); in unregister_sound_special()
491 * @unit: unit number to allocate
494 * The unit passed is the return value from the register function.
497 void unregister_sound_mixer(int unit) in unregister_sound_mixer() argument
499 sound_remove_unit(&chains[0], unit); in unregister_sound_mixer()
506 * @unit: unit number to allocate
509 * The unit passed is the return value from the register function.
514 void unregister_sound_dsp(int unit) in unregister_sound_dsp() argument
516 sound_remove_unit(&chains[3], unit); in unregister_sound_dsp()
522 static struct sound_unit *__look_for_unit(int chain, int unit) in __look_for_unit() argument
527 while(s && s->unit_minor <= unit) in __look_for_unit()
529 if(s->unit_minor==unit) in __look_for_unit()
539 int unit = iminor(inode); in soundcore_open() local
543 chain=unit&0x0F; in soundcore_open()
546 unit&=0xF0; in soundcore_open()
547 unit|=3; in soundcore_open()
552 s = __look_for_unit(chain, unit); in soundcore_open()
565 request_module("sound-slot-%i", unit>>4); in soundcore_open()
566 request_module("sound-service-%i-%i", unit>>4, chain); in soundcore_open()
575 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0) in soundcore_open()
579 s = __look_for_unit(chain, unit); in soundcore_open()