From 30537f79ea4a371c18e71a4d0c19042c5ef0d90b Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Tue, 6 Sep 2011 15:21:43 +0800 Subject: [PATCH] --- yaml --- r: 270569 b: refs/heads/master c: 283e42e0114aba331b0055839f6277a4a7cfbc64 h: refs/heads/master i: 270567: 3d9ed76a169fae9cf527938a9d2372a08aea2d95 v: v3 --- [refs] | 2 +- trunk/sound/soc/mid-x86/sst_platform.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e99015bb05f6..f6dc9fc2942a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 22be504aaa4a3133d81e3fb0c4287960aea19c37 +refs/heads/master: 283e42e0114aba331b0055839f6277a4a7cfbc64 diff --git a/trunk/sound/soc/mid-x86/sst_platform.c b/trunk/sound/soc/mid-x86/sst_platform.c index af666ae671ae..9925d20ab0a3 100644 --- a/trunk/sound/soc/mid-x86/sst_platform.c +++ b/trunk/sound/soc/mid-x86/sst_platform.c @@ -233,6 +233,10 @@ static int sst_platform_open(struct snd_pcm_substream *substream) pr_debug("sst_platform_open called\n"); snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw); + ret_val = snd_pcm_hw_constraint_integer(runtime, + SNDRV_PCM_HW_PARAM_PERIODS); + if (ret_val < 0) + return ret_val; stream = kzalloc(sizeof(*stream), GFP_KERNEL); if (!stream) @@ -260,8 +264,8 @@ static int sst_platform_open(struct snd_pcm_substream *substream) return ret_val; } runtime->private_data = stream; - return snd_pcm_hw_constraint_integer(runtime, - SNDRV_PCM_HW_PARAM_PERIODS); + + return 0; } static int sst_platform_close(struct snd_pcm_substream *substream)