aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/format.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-03-04 13:46:15 -0500
committerTakashi Iwai <tiwai@suse.de>2010-03-05 02:18:32 -0500
commit015eb0b08150c6fef843efe22609589ead3d4fb8 (patch)
tree3ffcb8b5be54355761d94001a8c5415c965daccd /sound/usb/format.c
parente11b4e0e4f5ab40ec342dc07b7201c09a45f9574 (diff)
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/format.c')
-rw-r--r--sound/usb/format.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c
index cbfe0c23dbd6..87f07f042c63 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -323,7 +323,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip,
323 return -1; 323 return -1;
324 } 324 }
325 325
326 fp->format = pcm_format; 326 fp->formats = 1uLL << pcm_format;
327 327
328 /* gather possible sample rates */ 328 /* gather possible sample rates */
329 /* audio class v1 reports possible sample rates as part of the 329 /* audio class v1 reports possible sample rates as part of the
@@ -365,16 +365,16 @@ static int parse_audio_format_ii(struct snd_usb_audio *chip,
365 switch (format) { 365 switch (format) {
366 case UAC_FORMAT_TYPE_II_AC3: 366 case UAC_FORMAT_TYPE_II_AC3:
367 /* FIXME: there is no AC3 format defined yet */ 367 /* FIXME: there is no AC3 format defined yet */
368 // fp->format = SNDRV_PCM_FORMAT_AC3; 368 // fp->formats = SNDRV_PCM_FMTBIT_AC3;
369 fp->format = SNDRV_PCM_FORMAT_U8; /* temporarily hack to receive byte streams */ 369 fp->formats = SNDRV_PCM_FMTBIT_U8; /* temporary hack to receive byte streams */
370 break; 370 break;
371 case UAC_FORMAT_TYPE_II_MPEG: 371 case UAC_FORMAT_TYPE_II_MPEG:
372 fp->format = SNDRV_PCM_FORMAT_MPEG; 372 fp->formats = SNDRV_PCM_FMTBIT_MPEG;
373 break; 373 break;
374 default: 374 default:
375 snd_printd(KERN_INFO "%d:%u:%d : unknown format tag %#x is detected. processed as MPEG.\n", 375 snd_printd(KERN_INFO "%d:%u:%d : unknown format tag %#x is detected. processed as MPEG.\n",
376 chip->dev->devnum, fp->iface, fp->altsetting, format); 376 chip->dev->devnum, fp->iface, fp->altsetting, format);
377 fp->format = SNDRV_PCM_FORMAT_MPEG; 377 fp->formats = SNDRV_PCM_FMTBIT_MPEG;
378 break; 378 break;
379 } 379 }
380 380