Lines Matching refs:subs

42 static void free_substream(struct snd_usb_substream *subs)  in free_substream()  argument
46 if (!subs->num_formats) in free_substream()
48 list_for_each_entry_safe(fp, n, &subs->fmt_list, list) in free_substream()
50 kfree(subs->str_pd); in free_substream()
51 snd_media_stream_delete(subs); in free_substream()
84 struct snd_usb_substream *subs = &as->substream[stream]; in snd_usb_init_substream() local
86 INIT_LIST_HEAD(&subs->fmt_list); in snd_usb_init_substream()
87 spin_lock_init(&subs->lock); in snd_usb_init_substream()
89 subs->stream = as; in snd_usb_init_substream()
90 subs->direction = stream; in snd_usb_init_substream()
91 subs->dev = as->chip->dev; in snd_usb_init_substream()
92 subs->txfr_quirk = !!(as->chip->quirk_flags & QUIRK_FLAG_ALIGN_TRANSFER); in snd_usb_init_substream()
93 subs->tx_length_quirk = !!(as->chip->quirk_flags & QUIRK_FLAG_TX_LENGTH); in snd_usb_init_substream()
94 subs->speed = snd_usb_get_speed(subs->dev); in snd_usb_init_substream()
95 subs->pkt_offset_adj = 0; in snd_usb_init_substream()
96 subs->stream_offset_adj = 0; in snd_usb_init_substream()
100 list_add_tail(&fp->list, &subs->fmt_list); in snd_usb_init_substream()
101 subs->formats |= fp->formats; in snd_usb_init_substream()
102 subs->num_formats++; in snd_usb_init_substream()
103 subs->fmt_type = fp->fmt_type; in snd_usb_init_substream()
104 subs->ep_num = fp->endpoint; in snd_usb_init_substream()
105 if (fp->channels > subs->channels_max) in snd_usb_init_substream()
106 subs->channels_max = fp->channels; in snd_usb_init_substream()
109 subs->str_pd = pd; in snd_usb_init_substream()
111 snd_usb_power_domain_set(subs->stream->chip, pd, in snd_usb_init_substream()
115 snd_usb_preallocate_buffer(subs); in snd_usb_init_substream()
123 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_info() local
126 uinfo->count = subs->channels_max; in usb_chmap_ctl_info()
133 static bool have_dup_chmap(struct snd_usb_substream *subs, in have_dup_chmap() argument
138 list_for_each_entry_continue_reverse(prev, &subs->fmt_list, list) { in have_dup_chmap()
150 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_tlv() local
161 list_for_each_entry(fp, &subs->fmt_list, list) { in usb_chmap_ctl_tlv()
166 if (have_dup_chmap(subs, fp)) in usb_chmap_ctl_tlv()
193 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_get() local
197 if (subs->cur_audiofmt) in usb_chmap_ctl_get()
198 chmap = subs->cur_audiofmt->chmap; in usb_chmap_ctl_get()
203 for (; i < subs->channels_max; i++) in usb_chmap_ctl_get()
210 struct snd_usb_substream *subs) in add_chmap() argument
217 list_for_each_entry(fp, &subs->fmt_list, list) in add_chmap()
229 chmap->private_data = subs; in add_chmap()
483 struct snd_usb_substream *subs; in __snd_usb_add_audio_stream() local
490 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
491 if (subs->ep_num == fp->endpoint) { in __snd_usb_add_audio_stream()
492 list_add_tail(&fp->list, &subs->fmt_list); in __snd_usb_add_audio_stream()
493 subs->num_formats++; in __snd_usb_add_audio_stream()
494 subs->formats |= fp->formats; in __snd_usb_add_audio_stream()
502 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
503 if (subs->ep_num) in __snd_usb_add_audio_stream()
512 return add_chmap(as->pcm, stream, subs); in __snd_usb_add_audio_stream()