diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2013-04-22 19:00:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-29 07:36:15 -0400 |
commit | 74c34ca1cc12884703c70d34ed333517d978c2e7 (patch) | |
tree | 6d06b76a9fbe829f2427899aa708d682167420c0 /sound/atmel | |
parent | 754813473c1a8b7711802313125f0fafc60141f8 (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/atmel')
-rw-r--r-- | sound/atmel/ac97c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 79d6bda58753..6b7e2b5a72de 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -182,7 +182,7 @@ static int atmel_ac97c_playback_open(struct snd_pcm_substream *substream) | |||
182 | runtime->hw.rate_max = chip->cur_rate; | 182 | runtime->hw.rate_max = chip->cur_rate; |
183 | } | 183 | } |
184 | if (chip->cur_format) | 184 | if (chip->cur_format) |
185 | runtime->hw.formats = (1ULL << chip->cur_format); | 185 | runtime->hw.formats = pcm_format_to_bits(chip->cur_format); |
186 | mutex_unlock(&opened_mutex); | 186 | mutex_unlock(&opened_mutex); |
187 | chip->playback_substream = substream; | 187 | chip->playback_substream = substream; |
188 | return 0; | 188 | return 0; |
@@ -201,7 +201,7 @@ static int atmel_ac97c_capture_open(struct snd_pcm_substream *substream) | |||
201 | runtime->hw.rate_max = chip->cur_rate; | 201 | runtime->hw.rate_max = chip->cur_rate; |
202 | } | 202 | } |
203 | if (chip->cur_format) | 203 | if (chip->cur_format) |
204 | runtime->hw.formats = (1ULL << chip->cur_format); | 204 | runtime->hw.formats = pcm_format_to_bits(chip->cur_format); |
205 | mutex_unlock(&opened_mutex); | 205 | mutex_unlock(&opened_mutex); |
206 | chip->capture_substream = substream; | 206 | chip->capture_substream = substream; |
207 | return 0; | 207 | return 0; |