ASoC: compress: Derive substream from stream based on direction
Subsystems (4)
PATCH 1/1 ASoC: compress: Derive substream from stream based on direction
From: Satish Babu Patakokila <[email protected]>
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.
--- sound/soc/soc-compress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/soc-compress.c +4 -2
@@ -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;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 7 lines · On Fri, Jun 16, 2017 at 05:33:40PM -0700, [email protected] wrote:
From: Satish Babu Patakokila <[email protected]>
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.
I think we should cc this to stable..
Quoted 35 lines
Signed-off-by Satish Babu Patakokila <[email protected]>Signed-off-by Banajit Goswami <[email protected]>--- sound/soc/soc-compress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)sound/soc/soc-compress.c +4
-2@@ -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;Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Signature · 1 line
~Vinod
Mark Brown
maintainerApplied "ASoC: compress: Derive substream from stream based on direction" to the asoc tree
In reply to [email protected]The patch
ASoC: compress: Derive substream from stream based on direction
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
01b8cedfd0422326caae308641dcadaa85e0ca72Mon Sep 17 00:00:00 2001
From: Satish Babu Patakokila <[email protected]>
Date: Fri, 16 Jun 2017 17:33:40 -0700
Subject: [PATCH] ASoC: compress: Derive substream from stream based on
direction
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.
--- sound/soc/soc-compress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/soc-compress.c +4 -2
@@ -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;
Signature · 1 line
2.11.0