summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatish Babu Patakokila <sbpata@codeaurora.org>2016-08-04 18:31:48 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-11 21:28:08 -0800
commitbef46b317c4a9939bc72df566449fcb820cfc732 (patch)
tree9c3d56882fa45f2973f198bcf7e557b665b98182
parent8e6988760075ac91403ba2c5096e848197d55704 (diff)
ASoC: compress: Fix compress capture stream handling
Compress framework considers the stream as PLAYBACK always irrespective of the direction. Derive substream based on the tx/rx direction from compressed stream. CRs-fixed: 1072067 Change-Id: I62c51c23a47f26b221dccef6f83c03aef9f095a7 Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
-rw-r--r--sound/soc/soc-compress.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index f4ceb5f5c678..eb894d073c07 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -68,7 +68,8 @@ out:
static int soc_compr_open_fe(struct snd_compr_stream *cstream)
{
struct snd_soc_pcm_runtime *fe = cstream->private_data;
- struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream;
+ struct snd_pcm_substream *fe_substream =
+ fe->pcm->streams[cstream->direction].substream;
struct snd_soc_platform *platform = fe->platform;
struct snd_soc_dpcm *dpcm;
struct snd_soc_dapm_widget_list *list;
@@ -443,7 +444,8 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
struct snd_compr_params *params)
{
struct snd_soc_pcm_runtime *fe = cstream->private_data;
- struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream;
+ struct snd_pcm_substream *fe_substream =
+ fe->pcm->streams[cstream->direction].substream;
struct snd_soc_platform *platform = fe->platform;
struct snd_soc_pcm_runtime *be_list[DPCM_MAX_BE_USERS];
struct snd_soc_dpcm *dpcm;