From: Lu Guanqun <guanqun.lu@intel.com>
To: ALSA <alsa-devel@alsa-project.org>
Cc: Koul Vinod <vinod.koul@intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 3/4] ASoC: sst_platform: using builtin function
Date: Tue, 06 Sep 2011 15:21:38 +0800 [thread overview]
Message-ID: <20110906072138.7310.65955.stgit@localhost> (raw)
In-Reply-To: <20110906072129.7310.6960.stgit@localhost>
Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by
myself.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/mid-x86/sst_platform.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index d99f253..af666ae 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -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;
next prev parent reply other threads:[~2011-09-06 7:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 7:21 [PATCH 1/4] intel_sst: fix comment typo Lu Guanqun
2011-09-06 7:21 ` [PATCH 2/4] ASoC: sst_platform: trivial coding style fix Lu Guanqun
2011-09-06 7:21 ` Lu Guanqun [this message]
2011-09-06 7:21 ` [PATCH 4/4] ASoC: sst_platform: fix memory leak Lu Guanqun
2011-09-07 0:39 ` [PATCH 1/4] intel_sst: fix comment typo Koul, Vinod
2011-09-07 0:52 ` Lu Guanqun
2011-09-08 21:17 ` Girdwood, Liam
2011-09-08 22:43 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110906072138.7310.65955.stgit@localhost \
--to=guanqun.lu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox