Lines Matching defs:device

33 MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device.");
35 MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device.");
39 static int snd_rawmidi_dev_free(struct snd_device *device);
40 static int snd_rawmidi_dev_register(struct snd_device *device);
41 static int snd_rawmidi_dev_disconnect(struct snd_device *device);
76 static struct snd_rawmidi *snd_rawmidi_search(struct snd_card *card, int device)
81 if (rawmidi->card == card && rawmidi->device == device)
372 int snd_rawmidi_kernel_open(struct snd_card *card, int device, int subdevice,
382 rmidi = snd_rawmidi_search(card, device);
516 * to shut the device up
595 info->device = rmidi->device;
629 rmidi = snd_rawmidi_search(card, info->device);
664 if (get_user(info.device, &_info->device))
931 int device;
933 if (get_user(device, (int __user *)argp))
935 if (device >= SNDRV_RAWMIDI_DEVICES) /* next device is -1 */
936 device = SNDRV_RAWMIDI_DEVICES - 1;
938 device = device < 0 ? 0 : device + 1;
939 while (device < SNDRV_RAWMIDI_DEVICES) {
940 if (snd_rawmidi_search(card, device))
942 device++;
944 if (device == SNDRV_RAWMIDI_DEVICES)
945 device = -1;
947 if (put_user(device, (int __user *)argp))
967 * snd_rawmidi_receive - receive the input data from the device
1302 * snd_rawmidi_transmit - copy from the buffer to the device
1307 * Copies data from the buffer to the device and advances the pointer.
1643 static void release_rawmidi_device(struct device *dev)
1652 * @device: the device index
1662 int snd_rawmidi_new(struct snd_card *card, char *id, int device,
1682 rmidi->device = device;
1693 dev_set_name(&rmidi->dev, "midiC%iD%i", card->number, device);
1750 static int snd_rawmidi_dev_free(struct snd_device *device)
1752 struct snd_rawmidi *rmidi = device->device_data;
1758 static void snd_rawmidi_dev_seq_free(struct snd_seq_device *device)
1760 struct snd_rawmidi *rmidi = device->private_data;
1766 static int snd_rawmidi_dev_register(struct snd_device *device)
1771 struct snd_rawmidi *rmidi = device->device_data;
1773 if (rmidi->device >= SNDRV_RAWMIDI_DEVICES)
1777 if (snd_rawmidi_search(rmidi->card, rmidi->device))
1786 rmidi->card, rmidi->device,
1799 if ((int)rmidi->device == midi_map[rmidi->card->number]) {
1804 "unable to register OSS rawmidi device %i:%i\n",
1813 if ((int)rmidi->device == amidi_map[rmidi->card->number]) {
1818 "unable to register OSS rawmidi device %i:%i\n",
1825 sprintf(name, "midi%d", rmidi->device);
1838 if (snd_seq_device_new(rmidi->card, rmidi->device, SNDRV_SEQ_DEV_ID_MIDISYNTH, 0, &rmidi->seq_dev) >= 0) {
1841 sprintf(rmidi->seq_dev->name, "MIDI %d-%d", rmidi->card->number, rmidi->device);
1857 static int snd_rawmidi_dev_disconnect(struct snd_device *device)
1859 struct snd_rawmidi *rmidi = device->device_data;
1877 if ((int)rmidi->device == midi_map[rmidi->card->number]) {
1883 if ((int)rmidi->device == amidi_map[rmidi->card->number])
1923 /* check device map table */