ALSA: usb-audio: use a format bitmask per alternate setting
In preparation for USB audio 2.0 support, change the audioformat structure so that it uses a bitmask to specify possible formats. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
e11b4e0e4f
commit
015eb0b081
@@ -79,11 +79,16 @@ static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct s
|
||||
|
||||
list_for_each(p, &subs->fmt_list) {
|
||||
struct audioformat *fp;
|
||||
snd_pcm_format_t fmt;
|
||||
fp = list_entry(p, struct audioformat, list);
|
||||
snd_iprintf(buffer, " Interface %d\n", fp->iface);
|
||||
snd_iprintf(buffer, " Altset %d\n", fp->altsetting);
|
||||
snd_iprintf(buffer, " Format: %s\n",
|
||||
snd_pcm_format_name(fp->format));
|
||||
snd_iprintf(buffer, " Format:");
|
||||
for (fmt = 0; fmt <= SNDRV_PCM_FORMAT_LAST; ++fmt)
|
||||
if (fp->formats & (1uLL << fmt))
|
||||
snd_iprintf(buffer, " %s",
|
||||
snd_pcm_format_name(fmt));
|
||||
snd_iprintf(buffer, "\n");
|
||||
snd_iprintf(buffer, " Channels: %d\n", fp->channels);
|
||||
snd_iprintf(buffer, " Endpoint: %d %s (%s)\n",
|
||||
fp->endpoint & USB_ENDPOINT_NUMBER_MASK,
|
||||
|
Reference in New Issue
Block a user