Lines Matching refs:as

79 static void snd_usb_init_substream(struct snd_usb_stream *as,  in snd_usb_init_substream()  argument
84 struct snd_usb_substream *subs = &as->substream[stream]; in snd_usb_init_substream()
89 subs->stream = as; 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()
98 snd_usb_set_pcm_ops(as->pcm, stream); in snd_usb_init_substream()
482 struct snd_usb_stream *as; in __snd_usb_add_audio_stream() local
487 list_for_each_entry(as, &chip->pcm_list, list) { in __snd_usb_add_audio_stream()
488 if (as->fmt_type != fp->fmt_type) in __snd_usb_add_audio_stream()
490 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
499 list_for_each_entry(as, &chip->pcm_list, list) { in __snd_usb_add_audio_stream()
500 if (as->fmt_type != fp->fmt_type) in __snd_usb_add_audio_stream()
502 subs = &as->substream[stream]; in __snd_usb_add_audio_stream()
505 if (snd_device_get_state(chip->card, as->pcm) != in __snd_usb_add_audio_stream()
508 err = snd_pcm_new_stream(as->pcm, stream, 1); in __snd_usb_add_audio_stream()
511 snd_usb_init_substream(as, stream, fp, pd); in __snd_usb_add_audio_stream()
512 return add_chmap(as->pcm, stream, subs); in __snd_usb_add_audio_stream()
516 as = kzalloc(sizeof(*as), GFP_KERNEL); in __snd_usb_add_audio_stream()
517 if (!as) in __snd_usb_add_audio_stream()
519 as->pcm_index = chip->pcm_devs; in __snd_usb_add_audio_stream()
520 as->chip = chip; in __snd_usb_add_audio_stream()
521 as->fmt_type = fp->fmt_type; in __snd_usb_add_audio_stream()
527 kfree(as); in __snd_usb_add_audio_stream()
530 as->pcm = pcm; in __snd_usb_add_audio_stream()
531 pcm->private_data = as; in __snd_usb_add_audio_stream()
539 snd_usb_init_substream(as, stream, fp, pd); in __snd_usb_add_audio_stream()
546 list_add(&as->list, &chip->pcm_list); in __snd_usb_add_audio_stream()
548 list_add_tail(&as->list, &chip->pcm_list); in __snd_usb_add_audio_stream()
552 snd_usb_proc_pcm_format_add(as); in __snd_usb_add_audio_stream()
554 return add_chmap(pcm, stream, &as->substream[stream]); in __snd_usb_add_audio_stream()
718 struct uac1_as_header_descriptor *as = in snd_usb_get_audioformat_uac12() local
723 if (!as) { in snd_usb_get_audioformat_uac12()
730 if (as->bLength < sizeof(*as)) { in snd_usb_get_audioformat_uac12()
737 format = le16_to_cpu(as->wFormatTag); /* remember the format value */ in snd_usb_get_audioformat_uac12()
740 as->bTerminalLink, in snd_usb_get_audioformat_uac12()
749 struct uac2_as_header_descriptor *as = in snd_usb_get_audioformat_uac12() local
753 if (!as) { in snd_usb_get_audioformat_uac12()
760 if (as->bLength < sizeof(*as)) { in snd_usb_get_audioformat_uac12()
767 num_channels = as->bNrChannels; in snd_usb_get_audioformat_uac12()
768 format = le32_to_cpu(as->bmFormats); in snd_usb_get_audioformat_uac12()
769 chconfig = le32_to_cpu(as->bmChannelConfig); in snd_usb_get_audioformat_uac12()
776 as->bTerminalLink, in snd_usb_get_audioformat_uac12()
786 as->bTerminalLink, in snd_usb_get_audioformat_uac12()
795 iface_no, altno, as->bTerminalLink); in snd_usb_get_audioformat_uac12()
867 struct uac3_as_header_descriptor *as = NULL; in snd_usb_get_audioformat_uac3() local
929 as = snd_usb_find_csint_desc(alts->extra, alts->extralen, in snd_usb_get_audioformat_uac3()
931 if (!as) { in snd_usb_get_audioformat_uac3()
938 if (as->bLength < sizeof(*as)) { in snd_usb_get_audioformat_uac3()
945 cluster_id = le16_to_cpu(as->wClusterDescrID); in snd_usb_get_audioformat_uac3()
1011 as->bTerminalLink, in snd_usb_get_audioformat_uac3()
1019 as->bTerminalLink, in snd_usb_get_audioformat_uac3()
1027 iface_no, altno, as->bTerminalLink); in snd_usb_get_audioformat_uac3()
1068 as->bTerminalLink); in snd_usb_get_audioformat_uac3()
1071 if (snd_usb_parse_audio_format_v3(chip, fp, as, stream) < 0) { in snd_usb_get_audioformat_uac3()