X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fsoc%2Fmid-x86%2Fsst_platform.c;fp=sound%2Fsoc%2Fmid-x86%2Fsst_platform.c;h=9925d20ab0a3dc441c99a5201329123108ea4812;hb=283e42e0114aba331b0055839f6277a4a7cfbc64;hp=af666ae671aed9fd2d6879da5e15b6b6dff1ee16;hpb=22be504aaa4a3133d81e3fb0c4287960aea19c37;p=pandora-kernel.git 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) 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)