Lines Matching +full:speed +full:- +full:map
1 // SPDX-License-Identifier: GPL-2.0-or-later
18 /* convert our full speed USB rate into sampling rate in Hz */
24 /* convert our high speed USB rate into sampling rate in Hz */
35 struct snd_usb_audio *chip = entry->private_data; in proc_audio_usbbus_read()
36 if (!atomic_read(&chip->shutdown)) in proc_audio_usbbus_read()
37 snd_iprintf(buffer, "%03d/%03d\n", chip->dev->bus->busnum, chip->dev->devnum); in proc_audio_usbbus_read()
42 struct snd_usb_audio *chip = entry->private_data; in proc_audio_usbid_read()
43 if (!atomic_read(&chip->shutdown)) in proc_audio_usbid_read()
45 USB_ID_VENDOR(chip->usb_id), in proc_audio_usbid_read()
46 USB_ID_PRODUCT(chip->usb_id)); in proc_audio_usbid_read()
51 snd_card_ro_proc_new(chip->card, "usbbus", chip, in snd_usb_audio_create_proc()
53 snd_card_ro_proc_new(chip->card, "usbid", chip, in snd_usb_audio_create_proc()
99 list_for_each_entry(fp, &subs->fmt_list, list) { in proc_dump_substream_formats()
102 snd_iprintf(buffer, " Interface %d\n", fp->iface); in proc_dump_substream_formats()
103 snd_iprintf(buffer, " Altset %d\n", fp->altsetting); in proc_dump_substream_formats()
106 if (fp->formats & pcm_format_to_bits(fmt)) in proc_dump_substream_formats()
110 snd_iprintf(buffer, " Channels: %d\n", fp->channels); in proc_dump_substream_formats()
112 fp->endpoint, in proc_dump_substream_formats()
113 fp->endpoint & USB_ENDPOINT_NUMBER_MASK, in proc_dump_substream_formats()
114 fp->endpoint & USB_DIR_IN ? "IN" : "OUT", in proc_dump_substream_formats()
115 sync_types[(fp->ep_attr & USB_ENDPOINT_SYNCTYPE) >> 2]); in proc_dump_substream_formats()
116 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) { in proc_dump_substream_formats()
117 snd_iprintf(buffer, " Rates: %d - %d (continuous)\n", in proc_dump_substream_formats()
118 fp->rate_min, fp->rate_max); in proc_dump_substream_formats()
122 for (i = 0; i < fp->nr_rates; i++) { in proc_dump_substream_formats()
125 snd_iprintf(buffer, "%d", fp->rate_table[i]); in proc_dump_substream_formats()
129 if (subs->speed != USB_SPEED_FULL) in proc_dump_substream_formats()
131 125 * (1 << fp->datainterval)); in proc_dump_substream_formats()
132 snd_iprintf(buffer, " Bits: %d\n", fp->fmt_bits); in proc_dump_substream_formats()
134 if (fp->dsd_raw) in proc_dump_substream_formats()
136 fp->dsd_dop, fp->dsd_bitrev); in proc_dump_substream_formats()
138 if (fp->chmap) { in proc_dump_substream_formats()
139 const struct snd_pcm_chmap_elem *map = fp->chmap; in proc_dump_substream_formats() local
142 snd_iprintf(buffer, " Channel map:"); in proc_dump_substream_formats()
143 for (c = 0; c < map->channels; c++) { in proc_dump_substream_formats()
144 if (map->map[c] >= ARRAY_SIZE(channel_labels) || in proc_dump_substream_formats()
145 !channel_labels[map->map[c]]) in proc_dump_substream_formats()
146 snd_iprintf(buffer, " --"); in proc_dump_substream_formats()
149 channel_labels[map->map[c]]); in proc_dump_substream_formats()
154 if (fp->sync_ep) { in proc_dump_substream_formats()
156 fp->sync_ep, in proc_dump_substream_formats()
157 fp->sync_ep & USB_ENDPOINT_NUMBER_MASK, in proc_dump_substream_formats()
158 fp->sync_ep & USB_DIR_IN ? "IN" : "OUT"); in proc_dump_substream_formats()
160 fp->sync_iface); in proc_dump_substream_formats()
162 fp->sync_altsetting); in proc_dump_substream_formats()
164 fp->implicit_fb ? "Yes" : "No"); in proc_dump_substream_formats()
167 // snd_iprintf(buffer, " Max Packet Size = %d\n", fp->maxpacksize); in proc_dump_substream_formats()
168 // snd_iprintf(buffer, " EP Attribute = %#x\n", fp->attributes); in proc_dump_substream_formats()
179 snd_iprintf(buffer, " Packet Size = %d\n", data_ep->curpacksize); in proc_dump_ep_status()
181 subs->speed == USB_SPEED_FULL in proc_dump_ep_status()
182 ? get_full_speed_hz(data_ep->freqm) in proc_dump_ep_status()
183 : get_high_speed_hz(data_ep->freqm), in proc_dump_ep_status()
184 data_ep->freqm >> 16, data_ep->freqm & 0xffff); in proc_dump_ep_status()
185 if (sync_ep && data_ep->freqshift != INT_MIN) { in proc_dump_ep_status()
186 int res = 16 - data_ep->freqshift; in proc_dump_ep_status()
188 (sync_ep->syncmaxsize > 3 ? 32 : 24) - res, res); in proc_dump_ep_status()
196 mutex_lock(&chip->mutex); in proc_dump_substream_status()
197 if (subs->running) { in proc_dump_substream_status()
199 if (subs->cur_audiofmt) { in proc_dump_substream_status()
200 snd_iprintf(buffer, " Interface = %d\n", subs->cur_audiofmt->iface); in proc_dump_substream_status()
201 snd_iprintf(buffer, " Altset = %d\n", subs->cur_audiofmt->altsetting); in proc_dump_substream_status()
203 proc_dump_ep_status(subs, subs->data_endpoint, subs->sync_endpoint, buffer); in proc_dump_substream_status()
207 mutex_unlock(&chip->mutex); in proc_dump_substream_status()
212 struct snd_usb_stream *stream = entry->private_data; in proc_pcm_format_read()
213 struct snd_usb_audio *chip = stream->chip; in proc_pcm_format_read()
215 snd_iprintf(buffer, "%s : %s\n", chip->card->longname, stream->pcm->name); in proc_pcm_format_read()
217 if (stream->substream[SNDRV_PCM_STREAM_PLAYBACK].num_formats) { in proc_pcm_format_read()
219 proc_dump_substream_status(chip, &stream->substream[SNDRV_PCM_STREAM_PLAYBACK], buffer); in proc_pcm_format_read()
220 proc_dump_substream_formats(&stream->substream[SNDRV_PCM_STREAM_PLAYBACK], buffer); in proc_pcm_format_read()
222 if (stream->substream[SNDRV_PCM_STREAM_CAPTURE].num_formats) { in proc_pcm_format_read()
224 proc_dump_substream_status(chip, &stream->substream[SNDRV_PCM_STREAM_CAPTURE], buffer); in proc_pcm_format_read()
225 proc_dump_substream_formats(&stream->substream[SNDRV_PCM_STREAM_CAPTURE], buffer); in proc_pcm_format_read()
232 struct snd_card *card = stream->chip->card; in snd_usb_proc_pcm_format_add()
234 sprintf(name, "stream%d", stream->pcm_index); in snd_usb_proc_pcm_format_add()