Lines Matching refs:pcm
68 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream);
99 if (substream->pcm->nonatomic) { in snd_pcm_stream_lock()
117 if (substream->pcm->nonatomic) { in snd_pcm_stream_unlock()
137 if (!substream->pcm->nonatomic) in snd_pcm_stream_lock_irq()
152 if (!substream->pcm->nonatomic) in snd_pcm_stream_unlock_irq()
160 if (!substream->pcm->nonatomic) in _snd_pcm_stream_lock_irqsave()
178 if (!substream->pcm->nonatomic) in snd_pcm_stream_unlock_irqrestore()
200 struct snd_pcm *pcm = substream->pcm; in snd_pcm_info() local
204 info->card = pcm->card->number; in snd_pcm_info()
205 info->device = pcm->device; in snd_pcm_info()
208 strlcpy(info->id, pcm->id, sizeof(info->id)); in snd_pcm_info()
209 strlcpy(info->name, pcm->name, sizeof(info->name)); in snd_pcm_info()
210 info->dev_class = pcm->dev_class; in snd_pcm_info()
211 info->dev_subclass = pcm->dev_subclass; in snd_pcm_info()
889 if (s->pcm->nonatomic) in snd_pcm_action_group()
921 if (s1->pcm->nonatomic) in snd_pcm_action_group()
965 if (substream->pcm->nonatomic) { in snd_pcm_action()
1328 int snd_pcm_suspend_all(struct snd_pcm *pcm) in snd_pcm_suspend_all() argument
1333 if (! pcm) in snd_pcm_suspend_all()
1337 for (substream = pcm->streams[stream].substream; in snd_pcm_suspend_all()
1402 struct snd_card *card = substream->pcm->card; in snd_pcm_resume()
1428 struct snd_card *card = substream->pcm->card; in snd_pcm_xrun()
1557 struct snd_card *card = substream->pcm->card; in snd_pcm_prepare()
1661 card = substream->pcm->card; in snd_pcm_drain()
1746 dev_dbg(substream->pcm->card->dev, in snd_pcm_drain()
1835 substream->pcm->nonatomic != substream1->pcm->nonatomic) { in snd_pcm_link()
1859 snd_card_unref(substream1->pcm->card); in snd_pcm_link()
2257 int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, in snd_pcm_open_substream() argument
2264 err = snd_pcm_attach_substream(pcm, stream, file, &substream); in snd_pcm_open_substream()
2274 pcm_dbg(pcm, "snd_pcm_hw_constraints_init failed\n"); in snd_pcm_open_substream()
2285 pcm_dbg(pcm, "snd_pcm_hw_constraints_complete failed\n"); in snd_pcm_open_substream()
2300 struct snd_pcm *pcm, in snd_pcm_open_file() argument
2307 err = snd_pcm_open_substream(pcm, stream, file, &substream); in snd_pcm_open_file()
2328 struct snd_pcm *pcm; in snd_pcm_playback_open() local
2332 pcm = snd_lookup_minor_data(iminor(inode), in snd_pcm_playback_open()
2334 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); in snd_pcm_playback_open()
2335 if (pcm) in snd_pcm_playback_open()
2336 snd_card_unref(pcm->card); in snd_pcm_playback_open()
2342 struct snd_pcm *pcm; in snd_pcm_capture_open() local
2346 pcm = snd_lookup_minor_data(iminor(inode), in snd_pcm_capture_open()
2348 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); in snd_pcm_capture_open()
2349 if (pcm) in snd_pcm_capture_open()
2350 snd_card_unref(pcm->card); in snd_pcm_capture_open()
2354 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) in snd_pcm_open() argument
2359 if (pcm == NULL) { in snd_pcm_open()
2363 err = snd_card_file_add(pcm->card, file); in snd_pcm_open()
2366 if (!try_module_get(pcm->card->module)) { in snd_pcm_open()
2371 add_wait_queue(&pcm->open_wait, &wait); in snd_pcm_open()
2372 mutex_lock(&pcm->open_mutex); in snd_pcm_open()
2374 err = snd_pcm_open_file(file, pcm, stream); in snd_pcm_open()
2385 mutex_unlock(&pcm->open_mutex); in snd_pcm_open()
2387 mutex_lock(&pcm->open_mutex); in snd_pcm_open()
2388 if (pcm->card->shutdown) { in snd_pcm_open()
2397 remove_wait_queue(&pcm->open_wait, &wait); in snd_pcm_open()
2398 mutex_unlock(&pcm->open_mutex); in snd_pcm_open()
2404 module_put(pcm->card->module); in snd_pcm_open()
2406 snd_card_file_remove(pcm->card, file); in snd_pcm_open()
2413 struct snd_pcm *pcm; in snd_pcm_release() local
2421 pcm = substream->pcm; in snd_pcm_release()
2422 mutex_lock(&pcm->open_mutex); in snd_pcm_release()
2425 mutex_unlock(&pcm->open_mutex); in snd_pcm_release()
2426 wake_up(&pcm->open_wait); in snd_pcm_release()
2427 module_put(pcm->card->module); in snd_pcm_release()
2428 snd_card_file_remove(pcm->card, file); in snd_pcm_release()
2817 pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); in snd_pcm_common_ioctl1()