Lines Matching refs:pstr

107 			struct snd_pcm_str *pstr;  in snd_pcm_control_ioctl()  local
127 pstr = &pcm->streams[stream]; in snd_pcm_control_ioctl()
128 if (pstr->substream_count == 0) { in snd_pcm_control_ioctl()
132 if (subdevice >= pstr->substream_count) { in snd_pcm_control_ioctl()
136 for (substream = pstr->substream; substream; in snd_pcm_control_ioctl()
491 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_read() local
492 snd_iprintf(buffer, "%d\n", pstr->xrun_debug); in snd_pcm_xrun_debug_read()
498 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_write() local
501 pstr->xrun_debug = simple_strtoul(line, NULL, 10); in snd_pcm_xrun_debug_write()
505 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_init() argument
507 struct snd_pcm *pcm = pstr->pcm; in snd_pcm_stream_proc_init()
512 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); in snd_pcm_stream_proc_init()
518 pstr->proc_root = entry; in snd_pcm_stream_proc_init()
519 entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root); in snd_pcm_stream_proc_init()
521 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); in snd_pcm_stream_proc_init()
524 pstr->proc_root); in snd_pcm_stream_proc_init()
526 snd_info_set_text_ops(entry, pstr, snd_pcm_xrun_debug_read); in snd_pcm_stream_proc_init()
534 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_done() argument
536 snd_info_free_entry(pstr->proc_root); in snd_pcm_stream_proc_done()
537 pstr->proc_root = NULL; in snd_pcm_stream_proc_done()
566 substream->pstr->proc_root); in snd_pcm_substream_proc_init()
593 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_init() argument
594 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_done() argument
607 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in do_pcm_suspend() local
609 if (!pstr->pcm->no_device_suspend) in do_pcm_suspend()
610 snd_pcm_suspend_all(pstr->pcm); in do_pcm_suspend()
641 struct snd_pcm_str *pstr = &pcm->streams[stream]; in snd_pcm_new_stream() local
645 mutex_init(&pstr->oss.setup_mutex); in snd_pcm_new_stream()
647 pstr->stream = stream; in snd_pcm_new_stream()
648 pstr->pcm = pcm; in snd_pcm_new_stream()
649 pstr->substream_count = substream_count; in snd_pcm_new_stream()
653 err = snd_device_alloc(&pstr->dev, pcm->card); in snd_pcm_new_stream()
656 dev_set_name(pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
658 pstr->dev->groups = pcm_dev_attr_groups; in snd_pcm_new_stream()
659 pstr->dev->type = &pcm_dev_type; in snd_pcm_new_stream()
660 dev_set_drvdata(pstr->dev, pstr); in snd_pcm_new_stream()
663 err = snd_pcm_stream_proc_init(pstr); in snd_pcm_new_stream()
675 substream->pstr = pstr; in snd_pcm_new_stream()
681 pstr->substream = substream; in snd_pcm_new_stream()
691 pstr->substream = NULL; in snd_pcm_new_stream()
815 static void free_chmap(struct snd_pcm_str *pstr) in free_chmap() argument
817 if (pstr->chmap_kctl) { in free_chmap()
818 struct snd_card *card = pstr->pcm->card; in free_chmap()
820 snd_ctl_remove(card, pstr->chmap_kctl); in free_chmap()
821 pstr->chmap_kctl = NULL; in free_chmap()
825 static void snd_pcm_free_stream(struct snd_pcm_str * pstr) in snd_pcm_free_stream() argument
833 snd_pcm_stream_proc_done(pstr); in snd_pcm_free_stream()
835 substream = pstr->substream; in snd_pcm_free_stream()
843 for (setup = pstr->oss.setup_list; setup; setup = setupn) { in snd_pcm_free_stream()
849 free_chmap(pstr); in snd_pcm_free_stream()
850 if (pstr->substream_count) in snd_pcm_free_stream()
851 put_device(pstr->dev); in snd_pcm_free_stream()
890 struct snd_pcm_str * pstr; in snd_pcm_attach_substream() local
903 pstr = &pcm->streams[stream]; in snd_pcm_attach_substream()
904 if (pstr->substream == NULL || pstr->substream_count == 0) in snd_pcm_attach_substream()
922 if (pstr->substream_count > 1) in snd_pcm_attach_substream()
924 substream = pstr->substream; in snd_pcm_attach_substream()
926 for (substream = pstr->substream; substream; in snd_pcm_attach_substream()
940 for (substream = pstr->substream; substream; substream = substream->next) { in snd_pcm_attach_substream()
983 pstr->substream_opened++; in snd_pcm_attach_substream()
1015 substream->pstr->substream_opened--; in snd_pcm_detach_substream()
1021 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in pcm_class_show() local
1022 struct snd_pcm *pcm = pstr->pcm; in pcm_class_show()