summaryrefslogtreecommitdiff
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-10-18 15:39:30 +0200
committerTakashi Iwai <tiwai@suse.de>2015-10-21 14:25:58 +0200
commitd0a1b6607480e9ded3df22d09ff77bc55db586f7 (patch)
tree531b171d97d361f3d56d974757c2c58044f11280 /sound/soc/intel
parent1bf2d35b87315431e8eb1a461783f7939520a7c5 (diff)
ASoC: bytcr_rt5640: Use snd_pcm_hw_constraint_single()
Use the new snd_pcm_hw_constraint_single() helper function rather than installing a list constraint with a single value. Since snd_pcm_hw_constraint_single() sets a static constraint while snd_pcm_hw_constraint_list() sets a dynamic constraint the former is slightly more efficient and it also needs less code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/boards/bytcr_rt5640.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index c4453120b11a..7a5c9a36c1db 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -117,20 +117,10 @@ static int byt_codec_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-static unsigned int rates_48000[] = {
- 48000,
-};
-
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
- .count = ARRAY_SIZE(rates_48000),
- .list = rates_48000,
-};
-
static int byt_aif1_startup(struct snd_pcm_substream *substream)
{
- return snd_pcm_hw_constraint_list(substream->runtime, 0,
- SNDRV_PCM_HW_PARAM_RATE,
- &constraints_48000);
+ return snd_pcm_hw_constraint_single(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE, 48000);
}
static struct snd_soc_ops byt_aif1_ops = {