aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi/asihpi.c
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-22 19:00:41 -0400
committerTakashi Iwai <tiwai@suse.de>2013-04-29 07:36:15 -0400
commit74c34ca1cc12884703c70d34ed333517d978c2e7 (patch)
tree6d06b76a9fbe829f2427899aa708d682167420c0 /sound/pci/asihpi/asihpi.c
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/pci/asihpi/asihpi.c')
-rw-r--r--sound/pci/asihpi/asihpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 0aabfedeecba..160cf830d327 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -966,7 +966,7 @@ static u64 snd_card_asihpi_playback_formats(struct snd_card_asihpi *asihpi,
966 if (!err) 966 if (!err)
967 err = hpi_outstream_query_format(h_stream, &hpi_format); 967 err = hpi_outstream_query_format(h_stream, &hpi_format);
968 if (!err && (hpi_to_alsa_formats[format] != -1)) 968 if (!err && (hpi_to_alsa_formats[format] != -1))
969 formats |= (1ULL << hpi_to_alsa_formats[format]); 969 formats |= pcm_format_to_bits(hpi_to_alsa_formats[format]);
970 } 970 }
971 return formats; 971 return formats;
972} 972}
@@ -1142,7 +1142,7 @@ static u64 snd_card_asihpi_capture_formats(struct snd_card_asihpi *asihpi,
1142 if (!err) 1142 if (!err)
1143 err = hpi_instream_query_format(h_stream, &hpi_format); 1143 err = hpi_instream_query_format(h_stream, &hpi_format);
1144 if (!err) 1144 if (!err)
1145 formats |= (1ULL << hpi_to_alsa_formats[format]); 1145 formats |= pcm_format_to_bits(hpi_to_alsa_formats[format]);
1146 } 1146 }
1147 return formats; 1147 return formats;
1148} 1148}