Lines Matching defs:unit

215 static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit)
220 if(p->unit_minor==unit)
227 printk(KERN_ERR "Sound device %d went missing!\n", unit);
266 * to the next unit; otherwise, -EBUSY.
293 * Remove a unit. Acquires locks as needed. The drivers MUST have
298 static void sound_remove_unit(struct sound_unit **list, int unit)
303 p = __sound_remove_unit(list, unit);
340 * @unit: Unit number to allocate
350 int register_sound_special_device(const struct file_operations *fops, int unit,
353 const int chain = unit % SOUND_STEP;
364 if (unit >= SOUND_STEP)
366 max_unit = unit + 1;
382 if (unit >= SOUND_STEP)
384 max_unit = unit + 1;
405 if (unit >= SOUND_STEP)
411 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit,
417 int register_sound_special(const struct file_operations *fops, int unit)
419 return register_sound_special_device(fops, unit, NULL);
430 * Pass -1 to request the next free mixer unit.
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)
484 sound_remove_unit(&chains[unit % SOUND_STEP], unit);
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)
499 sound_remove_unit(&chains[0], unit);
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)
516 sound_remove_unit(&chains[3], unit);
522 static struct sound_unit *__look_for_unit(int chain, int unit)
527 while(s && s->unit_minor <= unit)
529 if(s->unit_minor==unit)
539 int unit = iminor(inode);
543 chain=unit&0x0F;
546 unit&=0xF0;
547 unit|=3;
552 s = __look_for_unit(chain, unit);
565 request_module("sound-slot-%i", unit>>4);
566 request_module("sound-service-%i-%i", unit>>4, chain);
575 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0)
579 s = __look_for_unit(chain, unit);