Lines Matching refs:pstr

106 			struct snd_pcm_str *pstr;  in snd_pcm_control_ioctl()  local
123 pstr = &pcm->streams[stream]; in snd_pcm_control_ioctl()
124 if (pstr->substream_count == 0) in snd_pcm_control_ioctl()
126 if (subdevice >= pstr->substream_count) in snd_pcm_control_ioctl()
128 for (substream = pstr->substream; substream; in snd_pcm_control_ioctl()
482 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_read() local
483 snd_iprintf(buffer, "%d\n", pstr->xrun_debug); in snd_pcm_xrun_debug_read()
489 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_write() local
492 pstr->xrun_debug = simple_strtoul(line, NULL, 10); in snd_pcm_xrun_debug_write()
496 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_init() argument
498 struct snd_pcm *pcm = pstr->pcm; in snd_pcm_stream_proc_init()
503 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); in snd_pcm_stream_proc_init()
509 pstr->proc_root = entry; in snd_pcm_stream_proc_init()
510 entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root); in snd_pcm_stream_proc_init()
512 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); in snd_pcm_stream_proc_init()
515 pstr->proc_root); in snd_pcm_stream_proc_init()
517 snd_info_set_text_ops(entry, pstr, snd_pcm_xrun_debug_read); in snd_pcm_stream_proc_init()
525 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_done() argument
527 snd_info_free_entry(pstr->proc_root); in snd_pcm_stream_proc_done()
528 pstr->proc_root = NULL; in snd_pcm_stream_proc_done()
557 substream->pstr->proc_root); in snd_pcm_substream_proc_init()
584 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_init() argument
585 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_done() argument
597 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in do_pcm_suspend() local
599 if (!pstr->pcm->no_device_suspend) in do_pcm_suspend()
600 snd_pcm_suspend_all(pstr->pcm); in do_pcm_suspend()
630 struct snd_pcm_str *pstr = &pcm->streams[stream]; in snd_pcm_new_stream() local
634 mutex_init(&pstr->oss.setup_mutex); in snd_pcm_new_stream()
636 pstr->stream = stream; in snd_pcm_new_stream()
637 pstr->pcm = pcm; in snd_pcm_new_stream()
638 pstr->substream_count = substream_count; in snd_pcm_new_stream()
642 err = snd_device_alloc(&pstr->dev, pcm->card); in snd_pcm_new_stream()
645 dev_set_name(pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
647 pstr->dev->groups = pcm_dev_attr_groups; in snd_pcm_new_stream()
648 pstr->dev->type = &pcm_dev_type; in snd_pcm_new_stream()
649 dev_set_drvdata(pstr->dev, pstr); in snd_pcm_new_stream()
652 err = snd_pcm_stream_proc_init(pstr); in snd_pcm_new_stream()
664 substream->pstr = pstr; in snd_pcm_new_stream()
670 pstr->substream = substream; in snd_pcm_new_stream()
680 pstr->substream = NULL; in snd_pcm_new_stream()
804 static void free_chmap(struct snd_pcm_str *pstr) in free_chmap() argument
806 if (pstr->chmap_kctl) { in free_chmap()
807 struct snd_card *card = pstr->pcm->card; in free_chmap()
809 snd_ctl_remove(card, pstr->chmap_kctl); in free_chmap()
810 pstr->chmap_kctl = NULL; in free_chmap()
814 static void snd_pcm_free_stream(struct snd_pcm_str * pstr) in snd_pcm_free_stream() argument
822 snd_pcm_stream_proc_done(pstr); in snd_pcm_free_stream()
824 substream = pstr->substream; in snd_pcm_free_stream()
832 for (setup = pstr->oss.setup_list; setup; setup = setupn) { in snd_pcm_free_stream()
838 free_chmap(pstr); in snd_pcm_free_stream()
839 if (pstr->substream_count) in snd_pcm_free_stream()
840 put_device(pstr->dev); in snd_pcm_free_stream()
879 struct snd_pcm_str * pstr; in snd_pcm_attach_substream() local
892 pstr = &pcm->streams[stream]; in snd_pcm_attach_substream()
893 if (pstr->substream == NULL || pstr->substream_count == 0) in snd_pcm_attach_substream()
911 if (pstr->substream_count > 1) in snd_pcm_attach_substream()
913 substream = pstr->substream; in snd_pcm_attach_substream()
915 for (substream = pstr->substream; substream; in snd_pcm_attach_substream()
929 for (substream = pstr->substream; substream; substream = substream->next) { in snd_pcm_attach_substream()
972 pstr->substream_opened++; in snd_pcm_attach_substream()
1006 substream->pstr->substream_opened--; in snd_pcm_detach_substream()
1012 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in pcm_class_show() local
1013 struct snd_pcm *pcm = pstr->pcm; in pcm_class_show()