Lines Matching defs:device

12 #include <linux/device.h>
34 static int snd_pcm_dev_free(struct snd_device *device);
35 static int snd_pcm_dev_register(struct snd_device *device);
36 static int snd_pcm_dev_disconnect(struct snd_device *device);
38 static struct snd_pcm *snd_pcm_get(struct snd_card *card, int device)
43 if (pcm->card == card && pcm->device == device)
49 static int snd_pcm_next(struct snd_card *card, int device)
54 if (pcm->card == card && pcm->device > device)
55 return pcm->device;
70 if (pcm->card == newpcm->card && pcm->device == newpcm->device)
74 pcm->device > newpcm->device)) {
90 int device;
92 if (get_user(device, (int __user *)arg))
95 device = snd_pcm_next(card, device);
97 if (put_user(device, (int __user *)arg))
104 unsigned int device, subdevice;
112 if (get_user(device, &info->device))
122 pcm = snd_pcm_get(card, device);
351 snd_iprintf(buffer, "device: %d\n", info->device);
510 sprintf(name, "pcm%i%c", pcm->device,
604 static int do_pcm_suspend(struct device *dev)
618 /* device type for PCM -- basically only for passing PM callbacks */
655 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device,
704 static int _snd_pcm_new(struct snd_card *card, const char *id, int device,
727 pcm->device = device;
762 * @device: the device index (zero based)
774 int snd_pcm_new(struct snd_card *card, const char *id, int device,
777 return _snd_pcm_new(card, id, device, playback_count, capture_count,
786 * @device: the device index (zero based - shared with normal PCMs)
791 * Creates a new internal PCM instance with no userspace device or procfs
802 int snd_pcm_new_internal(struct snd_card *card, const char *id, int device,
806 return _snd_pcm_new(card, id, device, playback_count, capture_count,
878 static int snd_pcm_dev_free(struct snd_device *device)
880 struct snd_pcm *pcm = device->device_data;
1015 static ssize_t show_pcm_class(struct device *dev,
1050 static int snd_pcm_dev_register(struct snd_device *device)
1056 if (snd_BUG_ON(!device || !device->device_data))
1058 pcm = device->device_data;
1077 err = snd_register_device(devtype, pcm->card, pcm->device,
1096 static int snd_pcm_dev_disconnect(struct snd_device *device)
1098 struct snd_pcm *pcm = device->device_data;
1184 pcm->card->number, pcm->device, pcm->id, pcm->name);