summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/format.c5
-rw-r--r--sound/usb/pcm.c4
-rw-r--r--sound/usb/proc.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 020ede0259e..99299ffb33a 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -365,7 +365,8 @@ static int parse_audio_format_i(struct snd_usb_audio *chip,
{
struct usb_interface_descriptor *altsd = get_iface_desc(iface);
int protocol = altsd->bInterfaceProtocol;
- int pcm_format, ret;
+ snd_pcm_format_t pcm_format;
+ int ret;
if (fmt->bFormatType == UAC_FORMAT_TYPE_III) {
/* FIXME: the format type is really IECxxx
@@ -384,7 +385,7 @@ static int parse_audio_format_i(struct snd_usb_audio *chip,
default:
pcm_format = SNDRV_PCM_FORMAT_S16_LE;
}
- fp->formats = 1uLL << pcm_format;
+ fp->formats = pcm_format_to_bits(pcm_format);
} else {
fp->formats = parse_audio_format_i_type(chip, fp, format,
fmt, protocol);
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 9723f3ceb15..93b6e32cfea 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -100,7 +100,7 @@ static struct audioformat *find_format(struct snd_usb_substream *subs)
int cur_attr = 0, attr;
list_for_each_entry(fp, &subs->fmt_list, list) {
- if (!(fp->formats & (1uLL << subs->pcm_format)))
+ if (!(fp->formats & pcm_format_to_bits(subs->pcm_format)))
continue;
if (fp->channels != subs->channels)
continue;
@@ -478,7 +478,7 @@ static int match_endpoint_audioformats(struct audioformat *fp,
return 0;
}
- if (!(fp->formats & (1ULL << pcm_format))) {
+ if (!(fp->formats & pcm_format_to_bits(pcm_format))) {
snd_printdd("%s: (fmt @%p) no match for format %d\n", __func__,
fp, pcm_format);
return 0;
diff --git a/sound/usb/proc.c b/sound/usb/proc.c
index 0182ef634d8..135c7687106 100644
--- a/sound/usb/proc.c
+++ b/sound/usb/proc.c
@@ -85,7 +85,7 @@ static void proc_dump_substream_formats(struct snd_usb_substream *subs, struct s
snd_iprintf(buffer, " Altset %d\n", fp->altsetting);
snd_iprintf(buffer, " Format:");
for (fmt = 0; fmt <= SNDRV_PCM_FORMAT_LAST; ++fmt)
- if (fp->formats & (1uLL << fmt))
+ if (fp->formats & pcm_format_to_bits(fmt))
snd_iprintf(buffer, " %s",
snd_pcm_format_name(fmt));
snd_iprintf(buffer, "\n");