Lines Matching refs:pstr
116 struct snd_pcm_str *pstr; in snd_pcm_control_ioctl() local
135 pstr = &pcm->streams[stream]; in snd_pcm_control_ioctl()
136 if (pstr->substream_count == 0) { in snd_pcm_control_ioctl()
140 if (subdevice >= pstr->substream_count) { in snd_pcm_control_ioctl()
144 for (substream = pstr->substream; substream; in snd_pcm_control_ioctl()
500 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_read() local
501 snd_iprintf(buffer, "%d\n", pstr->xrun_debug); in snd_pcm_xrun_debug_read()
507 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_write() local
510 pstr->xrun_debug = simple_strtoul(line, NULL, 10); in snd_pcm_xrun_debug_write()
514 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_init() argument
516 struct snd_pcm *pcm = pstr->pcm; in snd_pcm_stream_proc_init()
521 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); in snd_pcm_stream_proc_init()
529 pstr->proc_root = entry; in snd_pcm_stream_proc_init()
531 if ((entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root)) != NULL) { in snd_pcm_stream_proc_init()
532 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); in snd_pcm_stream_proc_init()
538 pstr->proc_info_entry = entry; in snd_pcm_stream_proc_init()
542 pstr->proc_root)) != NULL) { in snd_pcm_stream_proc_init()
546 entry->private_data = pstr; in snd_pcm_stream_proc_init()
552 pstr->proc_xrun_debug_entry = entry; in snd_pcm_stream_proc_init()
557 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_done() argument
560 snd_info_free_entry(pstr->proc_xrun_debug_entry); in snd_pcm_stream_proc_done()
561 pstr->proc_xrun_debug_entry = NULL; in snd_pcm_stream_proc_done()
563 snd_info_free_entry(pstr->proc_info_entry); in snd_pcm_stream_proc_done()
564 pstr->proc_info_entry = NULL; in snd_pcm_stream_proc_done()
565 snd_info_free_entry(pstr->proc_root); in snd_pcm_stream_proc_done()
566 pstr->proc_root = NULL; in snd_pcm_stream_proc_done()
579 if ((entry = snd_info_create_card_entry(card, name, substream->pstr->proc_root)) == NULL) in snd_pcm_substream_proc_init()
666 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_init() argument
667 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_done() argument
690 struct snd_pcm_str *pstr = &pcm->streams[stream]; in snd_pcm_new_stream() local
694 mutex_init(&pstr->oss.setup_mutex); in snd_pcm_new_stream()
696 pstr->stream = stream; in snd_pcm_new_stream()
697 pstr->pcm = pcm; in snd_pcm_new_stream()
698 pstr->substream_count = substream_count; in snd_pcm_new_stream()
702 snd_device_initialize(&pstr->dev, pcm->card); in snd_pcm_new_stream()
703 pstr->dev.groups = pcm_dev_attr_groups; in snd_pcm_new_stream()
704 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
708 err = snd_pcm_stream_proc_init(pstr); in snd_pcm_new_stream()
720 substream->pstr = pstr; in snd_pcm_new_stream()
726 pstr->substream = substream; in snd_pcm_new_stream()
736 pstr->substream = NULL; in snd_pcm_new_stream()
852 static void snd_pcm_free_stream(struct snd_pcm_str * pstr) in snd_pcm_free_stream() argument
858 substream = pstr->substream; in snd_pcm_free_stream()
866 snd_pcm_stream_proc_done(pstr); in snd_pcm_free_stream()
868 for (setup = pstr->oss.setup_list; setup; setup = setupn) { in snd_pcm_free_stream()
874 if (pstr->substream_count) in snd_pcm_free_stream()
875 put_device(&pstr->dev); in snd_pcm_free_stream()
907 struct snd_pcm_str * pstr; in snd_pcm_attach_substream() local
920 pstr = &pcm->streams[stream]; in snd_pcm_attach_substream()
921 if (pstr->substream == NULL || pstr->substream_count == 0) in snd_pcm_attach_substream()
939 if (pstr->substream_count > 1) in snd_pcm_attach_substream()
941 substream = pstr->substream; in snd_pcm_attach_substream()
943 for (substream = pstr->substream; substream; in snd_pcm_attach_substream()
957 for (substream = pstr->substream; substream; substream = substream->next) { in snd_pcm_attach_substream()
998 pstr->substream_opened++; in snd_pcm_attach_substream()
1021 substream->pstr->substream_opened--; in snd_pcm_detach_substream()
1027 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev); in show_pcm_class() local
1028 struct snd_pcm *pcm = pstr->pcm; in show_pcm_class()