Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: wl1273: Use snd_pcm_hw_constraint_single()

Use the new snd_pcm_hw_constraint_single() helper function instead of
calling snd_pcm_hw_constraint_minmax() with the same value for min and max
to install a constraint that limits the possible configuration values to a
single value. Using snd_pcm_hw_constraint_single() makes the indented
result clearer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Lars-Peter Clausen and committed by
Takashi Iwai
95c68b86 0de8ab98

+4 -5
+4 -5
sound/soc/codecs/wl1273.c
··· 307 307 308 308 switch (wl1273->mode) { 309 309 case WL1273_MODE_BT: 310 - snd_pcm_hw_constraint_minmax(substream->runtime, 311 - SNDRV_PCM_HW_PARAM_RATE, 312 - 8000, 8000); 313 - snd_pcm_hw_constraint_minmax(substream->runtime, 314 - SNDRV_PCM_HW_PARAM_CHANNELS, 1, 1); 310 + snd_pcm_hw_constraint_single(substream->runtime, 311 + SNDRV_PCM_HW_PARAM_RATE, 8000); 312 + snd_pcm_hw_constraint_single(substream->runtime, 313 + SNDRV_PCM_HW_PARAM_CHANNELS, 1); 315 314 break; 316 315 case WL1273_MODE_FM_RX: 317 316 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {