Lines Matching full:minor
70 static void snd_request_other(int minor) in snd_request_other() argument
74 switch (minor) { in snd_request_other()
86 * @minor: the minor number
89 * Checks that a minor device with the specified type is registered, and returns
93 * if an associated instance with the given minor number and type is found.
99 void *snd_lookup_minor_data(unsigned int minor, int type) in snd_lookup_minor_data() argument
104 if (minor >= ARRAY_SIZE(snd_minors)) in snd_lookup_minor_data()
107 mreg = snd_minors[minor]; in snd_lookup_minor_data()
119 static struct snd_minor *autoload_device(unsigned int minor) in autoload_device() argument
123 dev = SNDRV_MINOR_DEVICE(minor); in autoload_device()
126 int card = SNDRV_MINOR_CARD(minor); in autoload_device()
134 snd_request_other(minor); in autoload_device()
137 return snd_minors[minor]; in autoload_device()
140 #define autoload_device(minor) NULL argument
145 unsigned int minor = iminor(inode); in snd_open() local
150 if (minor >= ARRAY_SIZE(snd_minors)) in snd_open()
153 mptr = snd_minors[minor]; in snd_open()
155 mptr = autoload_device(minor); in snd_open()
180 int minor; in snd_find_free_minor() local
188 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_find_free_minor()
190 if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL) in snd_find_free_minor()
192 if (minor == SNDRV_MINOR_SEQUENCER || in snd_find_free_minor()
193 minor == SNDRV_MINOR_TIMER) in snd_find_free_minor()
195 if (!snd_minors[minor]) in snd_find_free_minor()
196 return minor; in snd_find_free_minor()
203 int minor; in snd_find_free_minor() local
208 minor = type; in snd_find_free_minor()
213 minor = SNDRV_MINOR(card->number, type); in snd_find_free_minor()
222 minor = SNDRV_MINOR(card->number, type + dev); in snd_find_free_minor()
227 if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OS_MINORS)) in snd_find_free_minor()
229 if (snd_minors[minor]) in snd_find_free_minor()
231 return minor; in snd_find_free_minor()
253 int minor; in snd_register_device() local
270 minor = snd_find_free_minor(type, card, dev); in snd_register_device()
271 if (minor < 0) { in snd_register_device()
272 err = minor; in snd_register_device()
277 device->devt = MKDEV(major, minor); in snd_register_device()
282 snd_minors[minor] = preg; in snd_register_device()
301 int minor; in snd_unregister_device() local
305 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_unregister_device()
306 preg = snd_minors[minor]; in snd_unregister_device()
308 snd_minors[minor] = NULL; in snd_unregister_device()
314 if (minor >= ARRAY_SIZE(snd_minors)) in snd_unregister_device()
350 int minor; in snd_minor_info_read() local
354 for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) { in snd_minor_info_read()
355 mptr = snd_minors[minor]; in snd_minor_info_read()
361 minor, mptr->card, mptr->device, in snd_minor_info_read()
365 minor, mptr->card, in snd_minor_info_read()
368 snd_iprintf(buffer, "%3i: : %s\n", minor, in snd_minor_info_read()