diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-10-26 23:51:48 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-10-26 23:51:48 +0200 |
commit | 9430148d800dd929ad73da4c6afb67f793f8af43 (patch) | |
tree | 437d0aec41428cbb310a202100ba581c63fbe89e /sound/soc/mid-x86 | |
parent | d22665702226e9c40bc331098559e3d55e7cd43d (diff) | |
parent | 88e24c3a4b30a6bd361f2b5ce602667a8161b2e8 (diff) | |
download | linux-3.10-9430148d800dd929ad73da4c6afb67f793f8af43.tar.gz linux-3.10-9430148d800dd929ad73da4c6afb67f793f8af43.tar.bz2 linux-3.10-9430148d800dd929ad73da4c6afb67f793f8af43.zip |
Merge branch 'topic/remove-irqf_disable' into for-linus
Diffstat (limited to 'sound/soc/mid-x86')
-rw-r--r-- | sound/soc/mid-x86/sst_platform.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index 3e7826058ef..9925d20ab0a 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -226,13 +226,18 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream) static int sst_platform_open(struct snd_pcm_substream *substream) { - struct snd_pcm_runtime *runtime; + struct snd_pcm_runtime *runtime = substream->runtime; struct sst_runtime_stream *stream; int ret_val = 0; pr_debug("sst_platform_open called\n"); - runtime = substream->runtime; - runtime->hw = sst_platform_pcm_hw; + + 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) return -ENOMEM; @@ -259,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) @@ -469,7 +474,7 @@ static struct platform_driver sst_platform_driver = { static int __init sst_soc_platform_init(void) { pr_debug("sst_soc_platform_init called\n"); - return platform_driver_register(&sst_platform_driver); + return platform_driver_register(&sst_platform_driver); } module_init(sst_soc_platform_init); |