]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: lpass-platform: Fix broken pcm data usage
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 31 Oct 2016 11:25:43 +0000 (11:25 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 31 Oct 2016 18:29:54 +0000 (12:29 -0600)
commit50980eeb4eef8cc3b963476be4715d958e9e2110
tree57a5059f93b72fbb9c1e3fd82bd2f2d56ed9f609
parenta245803230f587f66ceddc152f3504b2a960aac2
ASoC: lpass-platform: Fix broken pcm data usage

This patch fixes lpass-platform driver which was broken in v4.9-rc1.
lpass_pcm_data data structure holds information specific to stream.
Holding a single private pointer to it in global lpass_data
will not work, because it would be overwritten by for each pcm instance.

This code was breaking playback when we have both playback and capture
pcm streams, as playback settings are over written by capture settings.

Fix this by moving channel allocation logic out of pcm_new to pcm_open
so that we can store the stream specific information in private_data of
snd_pcm_runtime.

Fixes: f0a8489df1fb ("ASoC: lpass-platform: don't use snd_soc_pcm_set_drvdata()")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-platform.c
sound/soc/qcom/lpass.h