path: root/sound/aoa/soundbus
diff options
authorEldad Zack <eldad@fogrefinery.com>2013-04-23 01:00:41 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-29 13:36:15 +0200
commit74c34ca1cc12884703c70d34ed333517d978c2e7 (patch)
tree6d06b76a9fbe829f2427899aa708d682167420c0 /sound/aoa/soundbus
parent754813473c1a8b7711802313125f0fafc60141f8 (diff)
ALSA: pcm_format_to_bits strong-typed conversion
Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing. Change such conversions to use this function and silence sparse warnings. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa/soundbus')
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c
index 19491ed9292..7b74a4ba75f 100644
--- a/sound/aoa/soundbus/i2sbus/pcm.c
+++ b/sound/aoa/soundbus/i2sbus/pcm.c
@@ -179,7 +179,7 @@ static int i2sbus_pcm_open(struct i2sbus_dev *i2sdev, int in)
if (other->active) {
/* FIXME: is this guaranteed by the alsa api? */
- hw->formats &= (1ULL << i2sdev->format);
+ hw->formats &= pcm_format_to_bits(i2sdev->format);
/* see above, restrict rates to the one we already have */
hw->rate_min = i2sdev->rate;
hw->rate_max = i2sdev->rate;