aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-03-04 19:46:15 +0100
committerTakashi Iwai <tiwai@suse.de>2010-03-05 08:18:32 +0100
commit015eb0b08150c6fef843efe22609589ead3d4fb8 (patch)
tree3ffcb8b5be54355761d94001a8c5415c965daccd /sound/usb/endpoint.c
parente11b4e0e4f5ab40ec342dc07b7201c09a45f9574 (diff)
downloadkernel_samsung_tuna-015eb0b08150c6fef843efe22609589ead3d4fb8.zip
kernel_samsung_tuna-015eb0b08150c6fef843efe22609589ead3d4fb8.tar.gz
kernel_samsung_tuna-015eb0b08150c6fef843efe22609589ead3d4fb8.tar.bz2
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>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 3f53dee..d65235c 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -94,7 +94,7 @@ int snd_usb_add_audio_endpoint(struct snd_usb_audio *chip, int stream, struct au
if (subs->endpoint == fp->endpoint) {
list_add_tail(&fp->list, &subs->fmt_list);
subs->num_formats++;
- subs->formats |= 1ULL << fp->format;
+ subs->formats |= fp->formats;
return 0;
}
}
@@ -268,7 +268,7 @@ int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
*/
if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 &&
fp && fp->altsetting == 1 && fp->channels == 1 &&
- fp->format == SNDRV_PCM_FORMAT_S16_LE &&
+ fp->formats == SNDRV_PCM_FMTBIT_S16_LE &&
protocol == UAC_VERSION_1 &&
le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) ==
fp->maxpacksize * 2)