Lines Matching full:minor
64 static void snd_request_other(int minor) in snd_request_other() argument
68 switch (minor) { in snd_request_other()
80 * @minor: the minor number
83 * Checks that a minor device with the specified type is registered, and returns
87 * if an associated instance with the given minor number and type is found.
93 void *snd_lookup_minor_data(unsigned int minor, int type) in snd_lookup_minor_data() argument
98 if (minor >= ARRAY_SIZE(snd_minors)) in snd_lookup_minor_data()
101 mreg = snd_minors[minor]; in snd_lookup_minor_data()
114 static struct snd_minor *autoload_device(unsigned int minor) in autoload_device() argument
118 dev = SNDRV_MINOR_DEVICE(minor); in autoload_device()
121 int card = SNDRV_MINOR_CARD(minor); in autoload_device()
129 snd_request_other(minor); in autoload_device()
132 return snd_minors[minor]; in autoload_device()
135 #define autoload_device(minor) NULL argument
140 unsigned int minor = iminor(inode); in snd_open() local
145 if (minor >= ARRAY_SIZE(snd_minors)) in snd_open()
148 mptr = snd_minors[minor]; in snd_open()
150 mptr = autoload_device(minor); in snd_open()
177 int minor; in snd_find_free_minor() local
185 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_find_free_minor()
187 if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL) in snd_find_free_minor()
189 if (minor == SNDRV_MINOR_SEQUENCER || in snd_find_free_minor()
190 minor == SNDRV_MINOR_TIMER) in snd_find_free_minor()
192 if (!snd_minors[minor]) in snd_find_free_minor()
193 return minor; in snd_find_free_minor()
200 int minor; in snd_find_free_minor() local
205 minor = type; in snd_find_free_minor()
210 minor = SNDRV_MINOR(card->number, type); in snd_find_free_minor()
219 minor = SNDRV_MINOR(card->number, type + dev); in snd_find_free_minor()
224 if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OS_MINORS)) in snd_find_free_minor()
226 if (snd_minors[minor]) in snd_find_free_minor()
228 return minor; in snd_find_free_minor()
250 int minor; in snd_register_device() local
267 minor = snd_find_free_minor(type, card, dev); in snd_register_device()
268 if (minor < 0) { in snd_register_device()
269 err = minor; in snd_register_device()
274 device->devt = MKDEV(major, minor); in snd_register_device()
279 snd_minors[minor] = preg; in snd_register_device()
299 int minor; in snd_unregister_device() local
303 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_unregister_device()
304 preg = snd_minors[minor]; in snd_unregister_device()
306 snd_minors[minor] = NULL; in snd_unregister_device()
313 if (minor >= ARRAY_SIZE(snd_minors)) in snd_unregister_device()
347 int minor; in snd_minor_info_read() local
351 for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) { in snd_minor_info_read()
352 if (!(mptr = snd_minors[minor])) in snd_minor_info_read()
357 minor, mptr->card, mptr->device, in snd_minor_info_read()
361 minor, mptr->card, in snd_minor_info_read()
364 snd_iprintf(buffer, "%3i: : %s\n", minor, in snd_minor_info_read()