diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-03-04 19:46:15 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-05 08:18:32 +0100 |
commit | 015eb0b08150c6fef843efe22609589ead3d4fb8 (patch) | |
tree | 3ffcb8b5be54355761d94001a8c5415c965daccd /sound/usb/format.c | |
parent | e11b4e0e4f5ab40ec342dc07b7201c09a45f9574 (diff) | |
download | linux-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/format.c')
-rw-r--r-- | sound/usb/format.c | 10 |
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, return -1; } - fp->format = pcm_format; + fp->formats = 1uLL << pcm_format; /* gather possible sample rates */ /* 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, switch (format) { case UAC_FORMAT_TYPE_II_AC3: /* FIXME: there is no AC3 format defined yet */ - // fp->format = SNDRV_PCM_FORMAT_AC3; - fp->format = SNDRV_PCM_FORMAT_U8; /* temporarily hack to receive byte streams */ + // fp->formats = SNDRV_PCM_FMTBIT_AC3; + fp->formats = SNDRV_PCM_FMTBIT_U8; /* temporary hack to receive byte streams */ break; case UAC_FORMAT_TYPE_II_MPEG: - fp->format = SNDRV_PCM_FORMAT_MPEG; + fp->formats = SNDRV_PCM_FMTBIT_MPEG; break; default: snd_printd(KERN_INFO "%d:%u:%d : unknown format tag %#x is detected. processed as MPEG.\n", chip->dev->devnum, fp->iface, fp->altsetting, format); - fp->format = SNDRV_PCM_FORMAT_MPEG; + fp->formats = SNDRV_PCM_FMTBIT_MPEG; break; } |