Lines Matching full:unit
220 static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit) in __sound_remove_unit() argument
225 if(p->unit_minor==unit) in __sound_remove_unit()
232 printk(KERN_ERR "Sound device %d went missing!\n", unit); in __sound_remove_unit()
271 * to the next unit; otherwise, -EBUSY. in sound_insert_unit()
298 * Remove a unit. Acquires locks as needed. The drivers MUST have
303 static void sound_remove_unit(struct sound_unit **list, int unit) in sound_remove_unit() argument
308 p = __sound_remove_unit(list, unit); in sound_remove_unit()
345 * @unit: Unit number to allocate
355 int register_sound_special_device(const struct file_operations *fops, int unit, in register_sound_special_device() argument
358 const int chain = unit % SOUND_STEP; in register_sound_special_device()
369 if (unit >= SOUND_STEP) in register_sound_special_device()
371 max_unit = unit + 1; in register_sound_special_device()
387 if (unit >= SOUND_STEP) in register_sound_special_device()
389 max_unit = unit + 1; in register_sound_special_device()
410 if (unit >= SOUND_STEP) in register_sound_special_device()
416 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit, in register_sound_special_device()
422 int register_sound_special(const struct file_operations *fops, int unit) in register_sound_special() argument
424 return register_sound_special_device(fops, unit, NULL); in register_sound_special()
432 * @dev: Unit number to allocate
434 * Allocate a mixer device. Unit is the number of the mixer requested.
435 * Pass -1 to request the next free mixer unit.
457 * @dev: Unit number to allocate
459 * Allocate a DSP device. Unit is the number of the DSP requested.
460 * Pass -1 to request the next free DSP unit.
479 * @unit: unit number to allocate
482 * register_sound_special(). The unit passed is the return value from
487 void unregister_sound_special(int unit) in unregister_sound_special() argument
489 sound_remove_unit(&chains[unit % SOUND_STEP], unit); in unregister_sound_special()
496 * @unit: unit number to allocate
499 * The unit passed is the return value from the register function.
502 void unregister_sound_mixer(int unit) in unregister_sound_mixer() argument
504 sound_remove_unit(&chains[0], unit); in unregister_sound_mixer()
511 * @unit: unit number to allocate
514 * The unit passed is the return value from the register function.
519 void unregister_sound_dsp(int unit) in unregister_sound_dsp() argument
521 sound_remove_unit(&chains[3], unit); in unregister_sound_dsp()
527 static struct sound_unit *__look_for_unit(int chain, int unit) in __look_for_unit() argument
532 while(s && s->unit_minor <= unit) in __look_for_unit()
534 if(s->unit_minor==unit) in __look_for_unit()
544 int unit = iminor(inode); in soundcore_open() local
548 chain=unit&0x0F; in soundcore_open()
551 unit&=0xF0; in soundcore_open()
552 unit|=3; in soundcore_open()
557 s = __look_for_unit(chain, unit); in soundcore_open()
570 request_module("sound-slot-%i", unit>>4); in soundcore_open()
571 request_module("sound-service-%i-%i", unit>>4, chain); in soundcore_open()
580 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0) in soundcore_open()
584 s = __look_for_unit(chain, unit); in soundcore_open()