Lines Matching refs:unit
212 static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit)
217 if(p->unit_minor==unit)
224 printk(KERN_ERR "Sound device %d went missing!\n", unit);
263 * to the next unit; otherwise, -EBUSY.
290 * Remove a unit. Acquires locks as needed. The drivers MUST have
295 static void sound_remove_unit(struct sound_unit **list, int unit)
300 p = __sound_remove_unit(list, unit);
337 * @unit: Unit number to allocate
347 int register_sound_special_device(const struct file_operations *fops, int unit,
350 const int chain = unit % SOUND_STEP;
361 if (unit >= SOUND_STEP)
363 max_unit = unit + 1;
379 if (unit >= SOUND_STEP)
381 max_unit = unit + 1;
402 if (unit >= SOUND_STEP)
408 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit,
414 int register_sound_special(const struct file_operations *fops, int unit)
416 return register_sound_special_device(fops, unit, NULL);
427 * Pass -1 to request the next free mixer unit.
452 * Pass -1 to request the next free DSP unit.
471 * @unit: unit number to allocate
474 * register_sound_special(). The unit passed is the return value from
479 void unregister_sound_special(int unit)
481 sound_remove_unit(&chains[unit % SOUND_STEP], unit);
488 * @unit: unit number to allocate
491 * The unit passed is the return value from the register function.
494 void unregister_sound_mixer(int unit)
496 sound_remove_unit(&chains[0], unit);
503 * @unit: unit number to allocate
506 * The unit passed is the return value from the register function.
511 void unregister_sound_dsp(int unit)
513 sound_remove_unit(&chains[3], unit);
519 static struct sound_unit *__look_for_unit(int chain, int unit)
524 while(s && s->unit_minor <= unit)
526 if(s->unit_minor==unit)
536 int unit = iminor(inode);
540 chain=unit&0x0F;
543 unit&=0xF0;
544 unit|=3;
549 s = __look_for_unit(chain, unit);
562 request_module("sound-slot-%i", unit>>4);
563 request_module("sound-service-%i-%i", unit>>4, chain);
572 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0)
576 s = __look_for_unit(chain, unit);