Lines Matching defs:format

20 #include "format.h"
23 * parse the audio format type I descriptor
24 * and returns the corresponding pcm format
28 * @format: the format tag (wFormatTag)
29 * @fmt: the format type descriptor (v1/v2) or AudioStreaming descriptor (v3)
33 u64 format, void *_fmt)
42 if (format >= 64) {
44 "%u:%d: invalid format type 0x%llx is detected, processed as PCM\n",
45 fp->iface, fp->altsetting, format);
46 format = UAC_FORMAT_TYPE_I_PCM;
50 format = 1ULL << format;
59 if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) {
65 format <<= 1;
74 if (format & UAC3_FORMAT_TYPE_I_RAW_DATA)
77 format <<= 1;
85 (format == 0 || format == (1 << UAC_FORMAT_TYPE_I_UNDEFINED))) {
87 usb_audio_info(chip, "%u:%d : format type 0 is detected, processed as PCM\n",
89 format = 1 << UAC_FORMAT_TYPE_I_PCM;
91 if (format & (1 << UAC_FORMAT_TYPE_I_PCM)) {
103 /* check the format byte size */
131 if (format & (1 << UAC_FORMAT_TYPE_I_PCM8)) {
132 /* Dallas DS4201 workaround: it advertises U8 format, but really
139 if (format & (1 << UAC_FORMAT_TYPE_I_IEEE_FLOAT)) {
142 if (format & (1 << UAC_FORMAT_TYPE_I_ALAW)) {
145 if (format & (1 << UAC_FORMAT_TYPE_I_MULAW)) {
148 if (format & ~0x3f) {
150 "%u:%d : unsupported format bits %#llx\n",
151 fp->iface, fp->altsetting, format);
191 * parse the format descriptor and stores the possible sample rates
196 * @fmt: the format descriptor
541 * parse the format descriptor and stores the possible sample rates
645 * parse the format type I and III descriptors
648 struct audioformat *fp, u64 format,
672 /* FIXME: the format type is really IECxxx
673 * but we give normal PCM format to get the existing
690 fp->formats = parse_audio_format_i_type(chip, fp, format, _fmt);
728 * parse the format type II descriptor
732 u64 format, void *_fmt)
736 switch (format) {
738 /* FIXME: there is no AC3 format defined yet */
747 "%u:%d : unknown format tag %#llx is detected. processed as MPEG.\n",
748 fp->iface, fp->altsetting, format);
761 usb_audio_info(chip, "found format II with max.bitrate = %d, frame size=%d\n", brate, framesize);
770 usb_audio_info(chip, "found format II with max.bitrate = %d, frame size=%d\n", brate, framesize);
781 struct audioformat *fp, u64 format,
790 err = parse_audio_format_i(chip, fp, format, fmt);
793 err = parse_audio_format_ii(chip, fp, format, fmt);
797 "%u:%d : format type %d is not supported yet\n",
827 u64 format = le64_to_cpu(as->bmFormats);
831 * Type I format bits are D0..D6
834 if (format & 0x7f)
839 err = parse_audio_format_i(chip, fp, format, as);