Lines Matching refs:pstr
121 struct snd_pcm_str *pstr; in snd_pcm_control_ioctl() local
140 pstr = &pcm->streams[stream]; in snd_pcm_control_ioctl()
141 if (pstr->substream_count == 0) { in snd_pcm_control_ioctl()
145 if (subdevice >= pstr->substream_count) { in snd_pcm_control_ioctl()
149 for (substream = pstr->substream; substream; in snd_pcm_control_ioctl()
502 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_read() local
503 snd_iprintf(buffer, "%d\n", pstr->xrun_debug); in snd_pcm_xrun_debug_read()
509 struct snd_pcm_str *pstr = entry->private_data; in snd_pcm_xrun_debug_write() local
512 pstr->xrun_debug = simple_strtoul(line, NULL, 10); in snd_pcm_xrun_debug_write()
516 static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_init() argument
518 struct snd_pcm *pcm = pstr->pcm; in snd_pcm_stream_proc_init()
523 pstr->stream == SNDRV_PCM_STREAM_PLAYBACK ? 'p' : 'c'); in snd_pcm_stream_proc_init()
533 pstr->proc_root = entry; in snd_pcm_stream_proc_init()
534 entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root); in snd_pcm_stream_proc_init()
536 snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); in snd_pcm_stream_proc_init()
542 pstr->proc_info_entry = entry; in snd_pcm_stream_proc_init()
546 pstr->proc_root); in snd_pcm_stream_proc_init()
551 entry->private_data = pstr; in snd_pcm_stream_proc_init()
557 pstr->proc_xrun_debug_entry = entry; in snd_pcm_stream_proc_init()
562 static int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) in snd_pcm_stream_proc_done() argument
565 snd_info_free_entry(pstr->proc_xrun_debug_entry); in snd_pcm_stream_proc_done()
566 pstr->proc_xrun_debug_entry = NULL; in snd_pcm_stream_proc_done()
568 snd_info_free_entry(pstr->proc_info_entry); in snd_pcm_stream_proc_done()
569 pstr->proc_info_entry = NULL; in snd_pcm_stream_proc_done()
570 snd_info_free_entry(pstr->proc_root); in snd_pcm_stream_proc_done()
571 pstr->proc_root = NULL; in snd_pcm_stream_proc_done()
585 substream->pstr->proc_root); in snd_pcm_substream_proc_init()
676 static inline int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_init() argument
677 static inline int snd_pcm_stream_proc_done(struct snd_pcm_str *pstr) { return 0; } in snd_pcm_stream_proc_done() argument
700 struct snd_pcm_str *pstr = &pcm->streams[stream]; in snd_pcm_new_stream() local
704 mutex_init(&pstr->oss.setup_mutex); in snd_pcm_new_stream()
706 pstr->stream = stream; in snd_pcm_new_stream()
707 pstr->pcm = pcm; in snd_pcm_new_stream()
708 pstr->substream_count = substream_count; in snd_pcm_new_stream()
712 snd_device_initialize(&pstr->dev, pcm->card); in snd_pcm_new_stream()
713 pstr->dev.groups = pcm_dev_attr_groups; in snd_pcm_new_stream()
714 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, in snd_pcm_new_stream()
718 err = snd_pcm_stream_proc_init(pstr); in snd_pcm_new_stream()
730 substream->pstr = pstr; in snd_pcm_new_stream()
736 pstr->substream = substream; in snd_pcm_new_stream()
746 pstr->substream = NULL; in snd_pcm_new_stream()
872 static void free_chmap(struct snd_pcm_str *pstr) in free_chmap() argument
874 if (pstr->chmap_kctl) { in free_chmap()
875 snd_ctl_remove(pstr->pcm->card, pstr->chmap_kctl); in free_chmap()
876 pstr->chmap_kctl = NULL; in free_chmap()
880 static void snd_pcm_free_stream(struct snd_pcm_str * pstr) in snd_pcm_free_stream() argument
886 substream = pstr->substream; in snd_pcm_free_stream()
894 snd_pcm_stream_proc_done(pstr); in snd_pcm_free_stream()
896 for (setup = pstr->oss.setup_list; setup; setup = setupn) { in snd_pcm_free_stream()
902 free_chmap(pstr); in snd_pcm_free_stream()
903 if (pstr->substream_count) in snd_pcm_free_stream()
904 put_device(&pstr->dev); in snd_pcm_free_stream()
943 struct snd_pcm_str * pstr; in snd_pcm_attach_substream() local
956 pstr = &pcm->streams[stream]; in snd_pcm_attach_substream()
957 if (pstr->substream == NULL || pstr->substream_count == 0) in snd_pcm_attach_substream()
975 if (pstr->substream_count > 1) in snd_pcm_attach_substream()
977 substream = pstr->substream; in snd_pcm_attach_substream()
979 for (substream = pstr->substream; substream; in snd_pcm_attach_substream()
993 for (substream = pstr->substream; substream; substream = substream->next) { in snd_pcm_attach_substream()
1034 pstr->substream_opened++; in snd_pcm_attach_substream()
1062 substream->pstr->substream_opened--; in snd_pcm_detach_substream()
1068 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev); in show_pcm_class() local
1069 struct snd_pcm *pcm = pstr->pcm; in show_pcm_class()