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->rate_list.list); in free_substream()
51 kfree(subs->str_pd); in free_substream()
52 snd_media_stream_delete(subs); in free_substream()
85 struct snd_usb_substream *subs = &as->substream[stream]; in snd_usb_init_substream() local
87 INIT_LIST_HEAD(&subs->fmt_list); in snd_usb_init_substream()
88 spin_lock_init(&subs->lock); in snd_usb_init_substream()
90 subs->stream = as; in snd_usb_init_substream()
91 subs->direction = stream; in snd_usb_init_substream()
92 subs->dev = as->chip->dev; in snd_usb_init_substream()
93 subs->txfr_quirk = as->chip->txfr_quirk; in snd_usb_init_substream()
94 subs->tx_length_quirk = as->chip->tx_length_quirk; in snd_usb_init_substream()
95 subs->speed = snd_usb_get_speed(subs->dev); in snd_usb_init_substream()
96 subs->pkt_offset_adj = 0; in snd_usb_init_substream()
97 subs->stream_offset_adj = 0; in snd_usb_init_substream()
101 list_add_tail(&fp->list, &subs->fmt_list); in snd_usb_init_substream()
102 subs->formats |= fp->formats; in snd_usb_init_substream()
103 subs->num_formats++; in snd_usb_init_substream()
104 subs->fmt_type = fp->fmt_type; in snd_usb_init_substream()
105 subs->ep_num = fp->endpoint; in snd_usb_init_substream()
106 if (fp->channels > subs->channels_max) in snd_usb_init_substream()
107 subs->channels_max = fp->channels; in snd_usb_init_substream()
110 subs->str_pd = pd; in snd_usb_init_substream()
112 snd_usb_power_domain_set(subs->stream->chip, pd, in snd_usb_init_substream()
116 snd_usb_preallocate_buffer(subs); in snd_usb_init_substream()
124 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_info() local
127 uinfo->count = subs->channels_max; in usb_chmap_ctl_info()
134 static bool have_dup_chmap(struct snd_usb_substream *subs, in have_dup_chmap() argument
139 list_for_each_entry_continue_reverse(prev, &subs->fmt_list, list) { in have_dup_chmap()
151 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_tlv() local
162 list_for_each_entry(fp, &subs->fmt_list, list) { in usb_chmap_ctl_tlv()
167 if (have_dup_chmap(subs, fp)) in usb_chmap_ctl_tlv()
194 struct snd_usb_substream *subs = info->private_data; in usb_chmap_ctl_get() local
198 if (subs->cur_audiofmt) in usb_chmap_ctl_get()
199 chmap = subs->cur_audiofmt->chmap; in usb_chmap_ctl_get()
204 for (; i < subs->channels_max; i++) in usb_chmap_ctl_get()
211 struct snd_usb_substream *subs) in add_chmap() argument
218 list_for_each_entry(fp, &subs->fmt_list, list) in add_chmap()
230 chmap->private_data = subs; in add_chmap()
484 struct snd_usb_substream *subs; in __snd_usb_add_audio_stream() local
491 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
492 if (subs->ep_num == fp->endpoint) { in __snd_usb_add_audio_stream()
493 list_add_tail(&fp->list, &subs->fmt_list); in __snd_usb_add_audio_stream()
494 subs->num_formats++; in __snd_usb_add_audio_stream()
495 subs->formats |= fp->formats; in __snd_usb_add_audio_stream()
507 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
508 if (subs->ep_num) in __snd_usb_add_audio_stream()
514 return add_chmap(as->pcm, stream, subs); in __snd_usb_add_audio_stream()