Lines Matching refs:device
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) in snd_pcm_get() argument
43 if (pcm->card == card && pcm->device == device) in snd_pcm_get()
49 static int snd_pcm_next(struct snd_card *card, int device) in snd_pcm_next() argument
54 if (pcm->card == card && pcm->device > device) in snd_pcm_next()
55 return pcm->device; in snd_pcm_next()
70 if (pcm->card == newpcm->card && pcm->device == newpcm->device) in snd_pcm_add()
74 pcm->device > newpcm->device)) { in snd_pcm_add()
90 int device; in snd_pcm_control_ioctl() local
92 if (get_user(device, (int __user *)arg)) in snd_pcm_control_ioctl()
95 device = snd_pcm_next(card, device); in snd_pcm_control_ioctl()
97 if (put_user(device, (int __user *)arg)) in snd_pcm_control_ioctl()
104 unsigned int device, subdevice; in snd_pcm_control_ioctl() local
112 if (get_user(device, &info->device)) in snd_pcm_control_ioctl()
122 pcm = snd_pcm_get(card, device); in snd_pcm_control_ioctl()
351 snd_iprintf(buffer, "device: %d\n", info->device); in snd_pcm_proc_info_read()
510 sprintf(name, "pcm%i%c", pcm->device, in snd_pcm_stream_proc_init()
604 static int do_pcm_suspend(struct device *dev) in do_pcm_suspend()
655 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
704 static int _snd_pcm_new(struct snd_card *card, const char *id, int device, in _snd_pcm_new() argument
727 pcm->device = device; in _snd_pcm_new()
774 int snd_pcm_new(struct snd_card *card, const char *id, int device, in snd_pcm_new() argument
777 return _snd_pcm_new(card, id, device, playback_count, capture_count, in snd_pcm_new()
802 int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, in snd_pcm_new_internal() argument
806 return _snd_pcm_new(card, id, device, playback_count, capture_count, in snd_pcm_new_internal()
878 static int snd_pcm_dev_free(struct snd_device *device) in snd_pcm_dev_free() argument
880 struct snd_pcm *pcm = device->device_data; in snd_pcm_dev_free()
1015 static ssize_t pcm_class_show(struct device *dev, in pcm_class_show()
1050 static int snd_pcm_dev_register(struct snd_device *device) in snd_pcm_dev_register() argument
1056 if (snd_BUG_ON(!device || !device->device_data)) in snd_pcm_dev_register()
1058 pcm = device->device_data; in snd_pcm_dev_register()
1077 err = snd_register_device(devtype, pcm->card, pcm->device, in snd_pcm_dev_register()
1096 static int snd_pcm_dev_disconnect(struct snd_device *device) in snd_pcm_dev_disconnect() argument
1098 struct snd_pcm *pcm = device->device_data; in snd_pcm_dev_disconnect()
1181 pcm->card->number, pcm->device, pcm->id, pcm->name); in snd_pcm_proc_read()