From: Vinod Koul <vinod.koul@intel.com>
To: bgoswami@codeaurora.org
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
plai@codeaurora.org,
Satish Babu Patakokila <sbpata@codeaurora.org>
Subject: Re: [PATCH] ASoC: compress: Derive substream from stream based on direction
Date: Mon, 19 Jun 2017 18:12:28 +0530 [thread overview]
Message-ID: <20170619124228.GJ19154@localhost> (raw)
In-Reply-To: <1497659620-7197-1-git-send-email-bgoswami@codeaurora.org>
On Fri, Jun 16, 2017 at 05:33:40PM -0700, bgoswami@codeaurora.org wrote:
> From: Satish Babu Patakokila <sbpata@codeaurora.org>
>
> Currently compress driver hardcodes direction as playback to get
> substream from the stream. This results in getting the incorrect
> substream for compressed capture usecase.
> To fix this, remove the hardcoding and derive substream based on
> the stream direction.
Acked-By: Vinod Koul <vinod.koul@intel.com>
I think we should cc this to stable..
>
> Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
> ---
> sound/soc/soc-compress.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> index bfd71b8..206f36b 100644
> --- a/sound/soc/soc-compress.c
> +++ b/sound/soc/soc-compress.c
> @@ -81,7 +81,8 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
> 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_dai *cpu_dai = fe->cpu_dai;
> struct snd_soc_dpcm *dpcm;
> @@ -467,7 +468,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_dai *cpu_dai = fe->cpu_dai;
> int ret = 0, stream;
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
--
~Vinod
next prev parent reply other threads:[~2017-06-19 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-17 0:33 [PATCH] ASoC: compress: Derive substream from stream based on direction bgoswami
2017-06-19 12:42 ` Vinod Koul [this message]
2017-06-19 16:23 ` Applied "ASoC: compress: Derive substream from stream based on direction" to the asoc tree 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=20170619124228.GJ19154@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=plai@codeaurora.org \
--cc=sbpata@codeaurora.org \
/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