Lines Matching full: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()
492 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_read() local
493 snd_iprintf(buffer, "%d\n", pstr->xrun_debug); in snd_pcm_xrun_debug_read()
499 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_write() local
502 pstr->xrun_debug = simple_strtoul(line, NULL, 10); in snd_pcm_xrun_debug_write()
506 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_init() argument
508 struct snd_pcm *pcm = pstr->pcm; in snd_pcm_stream_proc_init()
513 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); in snd_pcm_stream_proc_init()
519 pstr->proc_root = entry; in snd_pcm_stream_proc_init()
520 entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root); in snd_pcm_stream_proc_init()
522 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); in snd_pcm_stream_proc_init()
525 pstr->proc_root); in snd_pcm_stream_proc_init()
527 snd_info_set_text_ops(entry, pstr, snd_pcm_xrun_debug_read); in snd_pcm_stream_proc_init()
535 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_done() argument
537 snd_info_free_entry(pstr->proc_root); in snd_pcm_stream_proc_done()
538 pstr->proc_root = NULL; in snd_pcm_stream_proc_done()
567 substream->pstr->proc_root); in snd_pcm_substream_proc_init()
594 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_init() argument
595 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_done() argument
608 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in do_pcm_suspend() local
610 if (!pstr->pcm->no_device_suspend) in do_pcm_suspend()
611 snd_pcm_suspend_all(pstr->pcm); in do_pcm_suspend()
642 struct snd_pcm_str *pstr = &pcm->streams[stream]; in snd_pcm_new_stream() local
646 mutex_init(&pstr->oss.setup_mutex); in snd_pcm_new_stream()
648 pstr->stream = stream; in snd_pcm_new_stream()
649 pstr->pcm = pcm; in snd_pcm_new_stream()
650 pstr->substream_count = substream_count; in snd_pcm_new_stream()
654 err = snd_device_alloc(&pstr->dev, pcm->card); in snd_pcm_new_stream()
657 dev_set_name(pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
659 pstr->dev->groups = pcm_dev_attr_groups; in snd_pcm_new_stream()
660 pstr->dev->type = &pcm_dev_type; in snd_pcm_new_stream()
661 dev_set_drvdata(pstr->dev, pstr); in snd_pcm_new_stream()
664 err = snd_pcm_stream_proc_init(pstr); in snd_pcm_new_stream()
676 substream->pstr = pstr; in snd_pcm_new_stream()
682 pstr->substream = substream; in snd_pcm_new_stream()
692 pstr->substream = NULL; in snd_pcm_new_stream()
816 static void free_chmap(struct snd_pcm_str *pstr) in free_chmap() argument
818 if (pstr->chmap_kctl) { in free_chmap()
819 struct snd_card *card = pstr->pcm->card; in free_chmap()
821 snd_ctl_remove(card, pstr->chmap_kctl); in free_chmap()
822 pstr->chmap_kctl = NULL; in free_chmap()
826 static void snd_pcm_free_stream(struct snd_pcm_str * pstr) in snd_pcm_free_stream() argument
834 snd_pcm_stream_proc_done(pstr); in snd_pcm_free_stream()
836 substream = pstr->substream; in snd_pcm_free_stream()
844 for (setup = pstr->oss.setup_list; setup; setup = setupn) { in snd_pcm_free_stream()
850 free_chmap(pstr); in snd_pcm_free_stream()
851 if (pstr->substream_count) in snd_pcm_free_stream()
852 put_device(pstr->dev); in snd_pcm_free_stream()
891 struct snd_pcm_str * pstr; in snd_pcm_attach_substream() local
904 pstr = &pcm->streams[stream]; in snd_pcm_attach_substream()
905 if (pstr->substream == NULL || pstr->substream_count == 0) in snd_pcm_attach_substream()
923 if (pstr->substream_count > 1) in snd_pcm_attach_substream()
925 substream = pstr->substream; in snd_pcm_attach_substream()
927 for (substream = pstr->substream; substream; in snd_pcm_attach_substream()
941 for (substream = pstr->substream; substream; substream = substream->next) { in snd_pcm_attach_substream()
984 pstr->substream_opened++; in snd_pcm_attach_substream()
1016 substream->pstr->substream_opened--; in snd_pcm_detach_substream()
1022 struct snd_pcm_str *pstr = dev_get_drvdata(dev); in pcm_class_show() local
1023 struct snd_pcm *pcm = pstr->pcm; in pcm_class_show()