Lines Matching +full:fine +full:- +full:grained

1 // SPDX-License-Identifier: GPL-2.0-or-later
32 if (MAJOR(dev->devt) == SOUND_MAJOR) in sound_devnode()
78 * --------------------
95 * of this using fine grained locking.
97 * FIXME: we have to resolve modules and fine grained load/unload
119 * By default, OSS sound_core claims full legacy minor range (0-255)
121 * requests modules using custom sound-slot/service-* module aliases.
123 * aliases instead of the standard char-major-* ones. This behavior
130 * the kernel in the meantime. If preclaim_oss is non-zero, the
138 * sound-slot/service-* module aliases.
165 while (*list && (*list)->unit_minor<n) in __sound_insert_unit()
166 list=&((*list)->next); in __sound_insert_unit()
171 if(*list==NULL || (*list)->unit_minor>n) in __sound_insert_unit()
173 list=&((*list)->next); in __sound_insert_unit()
178 return -ENOENT; in __sound_insert_unit()
182 if ((*list)->unit_minor==n) in __sound_insert_unit()
183 return -EBUSY; in __sound_insert_unit()
184 if ((*list)->unit_minor>n) in __sound_insert_unit()
186 list=&((*list)->next); in __sound_insert_unit()
194 s->unit_minor=n; in __sound_insert_unit()
195 s->unit_fops=fops; in __sound_insert_unit()
201 s->next=*list; in __sound_insert_unit()
217 if(p->unit_minor==unit) in __sound_remove_unit()
219 *list=p->next; in __sound_remove_unit()
222 list=&(p->next); in __sound_remove_unit()
245 return -ENOMEM; in sound_insert_unit()
255 sprintf(s->name, "sound/%s", name); in sound_insert_unit()
257 sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); in sound_insert_unit()
263 * to the next unit; otherwise, -EBUSY. in sound_insert_unit()
265 r = __register_chrdev(SOUND_MAJOR, s->unit_minor, 1, s->name, in sound_insert_unit()
269 __sound_remove_unit(list, s->unit_minor); in sound_insert_unit()
271 low = s->unit_minor + SOUND_STEP; in sound_insert_unit()
275 r = -EBUSY; in sound_insert_unit()
280 device_create(&sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), in sound_insert_unit()
281 NULL, "%s", s->name+6); in sound_insert_unit()
282 return s->unit_minor; in sound_insert_unit()
304 __unregister_chrdev(SOUND_MAJOR, p->unit_minor, 1, in sound_remove_unit()
305 p->name); in sound_remove_unit()
306 device_destroy(&sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); in sound_remove_unit()
320 * 6 -- sndstat (obsolete)
322 * 8 -- alternate sequencer (see above)
335 * register_sound_special_device - register a special sound node
403 strcat(_name, "-"); in register_sound_special_device()
408 return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit, in register_sound_special_device()
422 * register_sound_mixer - register a mixer device
427 * Pass -1 to request the next free mixer unit.
443 * in open - see below.
447 * register_sound_dsp - register a DSP device
452 * Pass -1 to request the next free DSP unit.
455 * and will always allocate them as a matching pair - eg dsp3/audio3
470 * unregister_sound_special - unregister a special sound device
487 * unregister_sound_mixer - unregister a mixer
502 * unregister_sound_dsp - unregister a DSP device
524 while(s && s->unit_minor <= unit) in __look_for_unit()
526 if(s->unit_minor==unit) in __look_for_unit()
528 s=s->next; in __look_for_unit()
551 new_fops = fops_get(s->unit_fops); in soundcore_open()
558 * comes as add-on modules which aren't depend on in soundcore_open()
562 request_module("sound-slot-%i", unit>>4); in soundcore_open()
563 request_module("sound-service-%i-%i", unit>>4, chain); in soundcore_open()
566 * sound-slot/service-* module aliases are scheduled in soundcore_open()
567 * for removal in favor of the standard char-major-* in soundcore_open()
572 if (request_module("char-major-%d-%d", SOUND_MAJOR, unit) > 0) in soundcore_open()
573 request_module("char-major-%d", SOUND_MAJOR); in soundcore_open()
578 new_fops = fops_get(s->unit_fops); in soundcore_open()
583 return -ENODEV; in soundcore_open()
591 if (!file->f_op->open) in soundcore_open()
592 return -ENODEV; in soundcore_open()
594 return file->f_op->open(inode, file); in soundcore_open()
601 /* We have nothing to really do here - we know the lists must be in cleanup_oss_soundcore()
611 return -EBUSY; in init_oss_soundcore()