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