diff options
author | Vinod Koul <vinod.koul@intel.com> | 2014-06-13 18:03:57 +0530 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-23 12:24:28 +0100 |
commit | 0ec66fed40e31e74a762dd7166a9bf62ebbae5da (patch) | |
tree | de7deb5a063696131dd6f58ceb59f7b607575954 /sound/soc/intel/sst-mfld-platform-compress.c | |
parent | 61b165caa686b8334379293d0e241f740fac195a (diff) | |
download | lwn-0ec66fed40e31e74a762dd7166a9bf62ebbae5da.tar.gz lwn-0ec66fed40e31e74a762dd7166a9bf62ebbae5da.zip |
ASoC: Intel: use common stream allocation method for compressed stream
As added in previosu patch along with stream to piep conversion si required for
compressed audio too
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel/sst-mfld-platform-compress.c')
-rw-r--r-- | sound/soc/intel/sst-mfld-platform-compress.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/intel/sst-mfld-platform-compress.c b/sound/soc/intel/sst-mfld-platform-compress.c index 02abd19fce1d..29c059ca19e8 100644 --- a/sound/soc/intel/sst-mfld-platform-compress.c +++ b/sound/soc/intel/sst-mfld-platform-compress.c @@ -100,14 +100,19 @@ static int sst_platform_compr_set_params(struct snd_compr_stream *cstream, int retval; struct snd_sst_params str_params; struct sst_compress_cb cb; + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_platform *platform = rtd->platform; + struct sst_data *ctx = snd_soc_platform_get_drvdata(platform); stream = cstream->runtime->private_data; /* construct fw structure for this*/ memset(&str_params, 0, sizeof(str_params)); - str_params.ops = STREAM_OPS_PLAYBACK; - str_params.stream_type = SST_STREAM_TYPE_MUSIC; - str_params.device_type = SND_SST_DEVICE_COMPRESS; + /* fill the device type and stream id to pass to SST driver */ + retval = sst_fill_stream_params(cstream, ctx, &str_params, true); + pr_debug("compr_set_params: fill stream params ret_val = 0x%x\n", retval); + if (retval < 0) + return retval; switch (params->codec.id) { case SND_AUDIOCODEC_MP3: { |