Lines Matching refs:pstr

107 			struct snd_pcm_str *pstr;
127 pstr = &pcm->streams[stream];
128 if (pstr->substream_count == 0) {
132 if (subdevice >= pstr->substream_count) {
136 for (substream = pstr->substream; substream;
490 struct snd_pcm_str *pstr = entry->private_data;
491 snd_iprintf(buffer, "%d\n", pstr->xrun_debug);
497 struct snd_pcm_str *pstr = entry->private_data;
500 pstr->xrun_debug = simple_strtoul(line, NULL, 10);
504 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr)
506 struct snd_pcm *pcm = pstr->pcm;
511 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c');
517 pstr->proc_root = entry;
518 entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root);
520 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read);
523 pstr->proc_root);
525 snd_info_set_text_ops(entry, pstr, snd_pcm_xrun_debug_read);
533 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr)
535 snd_info_free_entry(pstr->proc_root);
536 pstr->proc_root = NULL;
565 substream->pstr->proc_root);
592 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; }
593 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; }
606 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev);
608 if (!pstr->pcm->no_device_suspend)
609 snd_pcm_suspend_all(pstr->pcm);
640 struct snd_pcm_str *pstr = &pcm->streams[stream];
644 mutex_init(&pstr->oss.setup_mutex);
646 pstr->stream = stream;
647 pstr->pcm = pcm;
648 pstr->substream_count = substream_count;
652 snd_device_initialize(&pstr->dev, pcm->card);
653 pstr->dev.groups = pcm_dev_attr_groups;
654 pstr->dev.type = &pcm_dev_type;
655 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device,
659 err = snd_pcm_stream_proc_init(pstr);
671 substream->pstr = pstr;
677 pstr->substream = substream;
687 pstr->substream = NULL;
811 static void free_chmap(struct snd_pcm_str *pstr)
813 if (pstr->chmap_kctl) {
814 struct snd_card *card = pstr->pcm->card;
817 snd_ctl_remove(card, pstr->chmap_kctl);
819 pstr->chmap_kctl = NULL;
823 static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
831 snd_pcm_stream_proc_done(pstr);
833 substream = pstr->substream;
841 for (setup = pstr->oss.setup_list; setup; setup = setupn) {
847 free_chmap(pstr);
848 if (pstr->substream_count)
849 put_device(&pstr->dev);
888 struct snd_pcm_str * pstr;
901 pstr = &pcm->streams[stream];
902 if (pstr->substream == NULL || pstr->substream_count == 0)
920 if (pstr->substream_count > 1)
922 substream = pstr->substream;
924 for (substream = pstr->substream; substream;
938 for (substream = pstr->substream; substream; substream = substream->next) {
981 pstr->substream_opened++;
1012 substream->pstr->substream_opened--;
1018 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev);
1019 struct snd_pcm *pcm = pstr->pcm;