aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mid-x86/sst_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mid-x86/sst_platform.c')
-rw-r--r--sound/soc/mid-x86/sst_platform.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index af666ae671ae..9925d20ab0a3 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -233,6 +233,10 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
233 pr_debug("sst_platform_open called\n"); 233 pr_debug("sst_platform_open called\n");
234 234
235 snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw); 235 snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw);
236 ret_val = snd_pcm_hw_constraint_integer(runtime,
237 SNDRV_PCM_HW_PARAM_PERIODS);
238 if (ret_val < 0)
239 return ret_val;
236 240
237 stream = kzalloc(sizeof(*stream), GFP_KERNEL); 241 stream = kzalloc(sizeof(*stream), GFP_KERNEL);
238 if (!stream) 242 if (!stream)
@@ -260,8 +264,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
260 return ret_val; 264 return ret_val;
261 } 265 }
262 runtime->private_data = stream; 266 runtime->private_data = stream;
263 return snd_pcm_hw_constraint_integer(runtime, 267
264 SNDRV_PCM_HW_PARAM_PERIODS); 268 return 0;
265} 269}
266 270
267static int sst_platform_close(struct snd_pcm_substream *substream) 271static int sst_platform_close(struct snd_pcm_substream *substream)