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/urb.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/urb.c')
-rw-r--r-- | sound/usb/urb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/urb.c b/sound/usb/urb.c index e9c339f75861..ad50d4398921 100644 --- a/sound/usb/urb.c +++ b/sound/usb/urb.c @@ -662,7 +662,7 @@ static int prepare_nodata_playback_urb(struct snd_usb_substream *subs, urb->number_of_packets = ctx->packets; urb->transfer_buffer_length = offs * stride; memset(urb->transfer_buffer, - subs->cur_audiofmt->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0, + runtime->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0, offs * stride); return 0; } @@ -924,7 +924,7 @@ void snd_usb_init_substream(struct snd_usb_stream *as, snd_usb_set_pcm_ops(as->pcm, stream); list_add_tail(&fp->list, &subs->fmt_list); - subs->formats |= 1ULL << fp->format; + subs->formats |= fp->formats; subs->endpoint = fp->endpoint; subs->num_formats++; subs->fmt_type = fp->fmt_type; |