Skip to content

Commit

Permalink
ASoC: sst_platform: using builtin function
Browse files Browse the repository at this point in the history
Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by
myself.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Lu Guanqun authored and Mark Brown committed Sep 8, 2011
1 parent c2f6fce commit 22be504
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sound/soc/mid-x86/sst_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,14 @@ 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);

stream = kzalloc(sizeof(*stream), GFP_KERNEL);
if (!stream)
return -ENOMEM;
Expand Down

0 comments on commit 22be504

Please sign in to comment.