Patch "ASoC: compress: Derive substream from stream based on direction" has been added to the 3.18-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
ASoC: compress: Derive substream from stream based on direction
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-compress-derive-substream-from-stream-based-on-direction.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
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: ASoC: compress: Derive substream from stream based on direction
From: Satish Babu Patakokila <[email protected]>
commit 01b8cedfd0422326caae308641dcadaa85e0ca72 upstream.
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
@@ -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;
@@ -415,7 +416,8 @@ static int soc_compr_set_params_fe(struc 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;int ret =0 , stream;
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/asoc-compress-derive-substream-from-stream-based-on-direction.patch