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()
900 if (s->pcm->nonatomic) in snd_pcm_action_group()
932 if (s1->pcm->nonatomic) in snd_pcm_action_group()
976 if (substream->pcm->nonatomic) { in snd_pcm_action()
1327 int snd_pcm_suspend_all(struct snd_pcm *pcm) in snd_pcm_suspend_all() argument
1332 if (! pcm) in snd_pcm_suspend_all()
1336 for (substream = pcm->streams[stream].substream; in snd_pcm_suspend_all()
1399 struct snd_card *card = substream->pcm->card; in snd_pcm_resume()
1425 struct snd_card *card = substream->pcm->card; in snd_pcm_xrun()
1554 struct snd_card *card = substream->pcm->card; in snd_pcm_prepare()
1658 card = substream->pcm->card; in snd_pcm_drain()
1743 dev_dbg(substream->pcm->card->dev, in snd_pcm_drain()
1832 substream->pcm->nonatomic != substream1->pcm->nonatomic) { in snd_pcm_link()
1856 snd_card_unref(substream1->pcm->card); in snd_pcm_link()
2255 int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, in snd_pcm_open_substream() argument
2262 err = snd_pcm_attach_substream(pcm, stream, file, &substream); in snd_pcm_open_substream()
2272 pcm_dbg(pcm, "snd_pcm_hw_constraints_init failed\n"); in snd_pcm_open_substream()
2283 pcm_dbg(pcm, "snd_pcm_hw_constraints_complete failed\n"); in snd_pcm_open_substream()
2298 struct snd_pcm *pcm, in snd_pcm_open_file() argument
2305 err = snd_pcm_open_substream(pcm, stream, file, &substream); in snd_pcm_open_file()
2326 struct snd_pcm *pcm; in snd_pcm_playback_open() local
2330 pcm = snd_lookup_minor_data(iminor(inode), in snd_pcm_playback_open()
2332 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); in snd_pcm_playback_open()
2333 if (pcm) in snd_pcm_playback_open()
2334 snd_card_unref(pcm->card); in snd_pcm_playback_open()
2340 struct snd_pcm *pcm; in snd_pcm_capture_open() local
2344 pcm = snd_lookup_minor_data(iminor(inode), in snd_pcm_capture_open()
2346 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); in snd_pcm_capture_open()
2347 if (pcm) in snd_pcm_capture_open()
2348 snd_card_unref(pcm->card); in snd_pcm_capture_open()
2352 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) in snd_pcm_open() argument
2357 if (pcm == NULL) { in snd_pcm_open()
2361 err = snd_card_file_add(pcm->card, file); in snd_pcm_open()
2364 if (!try_module_get(pcm->card->module)) { in snd_pcm_open()
2369 add_wait_queue(&pcm->open_wait, &wait); in snd_pcm_open()
2370 mutex_lock(&pcm->open_mutex); in snd_pcm_open()
2372 err = snd_pcm_open_file(file, pcm, stream); in snd_pcm_open()
2383 mutex_unlock(&pcm->open_mutex); in snd_pcm_open()
2385 mutex_lock(&pcm->open_mutex); in snd_pcm_open()
2386 if (pcm->card->shutdown) { in snd_pcm_open()
2395 remove_wait_queue(&pcm->open_wait, &wait); in snd_pcm_open()
2396 mutex_unlock(&pcm->open_mutex); in snd_pcm_open()
2402 module_put(pcm->card->module); in snd_pcm_open()
2404 snd_card_file_remove(pcm->card, file); in snd_pcm_open()
2411 struct snd_pcm *pcm; in snd_pcm_release() local
2419 pcm = substream->pcm; in snd_pcm_release()
2420 mutex_lock(&pcm->open_mutex); in snd_pcm_release()
2423 mutex_unlock(&pcm->open_mutex); in snd_pcm_release()
2424 wake_up(&pcm->open_wait); in snd_pcm_release()
2425 module_put(pcm->card->module); in snd_pcm_release()
2426 snd_card_file_remove(pcm->card, file); in snd_pcm_release()
2815 pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); in snd_pcm_common_ioctl1()