linux-stable/sound/soc
Lukasz Majczak 4dce2a19e7 ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function
commit a523ef731a upstream.

kabylake_ssp_fixup function uses snd_soc_dpcm to identify the
codecs DAIs. The HW parameters are changed based on the codec DAI of the
stream. The earlier approach to get snd_soc_dpcm was using container_of()
macro on snd_pcm_hw_params.

The structures have been modified over time and snd_soc_dpcm does not have
snd_pcm_hw_params as a reference but as a copy. This causes the current
driver to crash when used.

This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime
holds 2 dpcm instances (one for playback and one for capture). 2 codecs
on the SSP are dmic (capture) and speakers (playback). Based on the
stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime.

Tested for all use cases of the driver.
Based on similar fix in kbl_rt5663_rt5514_max98927.c
from Harsha Priya <harshapriya.n@intel.com> and
Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>

Cc: <stable@vger.kernel.org> # 5.4+
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210415124347.475432-1-lma@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 09:44:11 +02:00
..
adi
amd ASoC: amd: change clk_get() to devm_clk_get() and add missed checks 2020-12-30 11:51:22 +01:00
atmel
au1x
bcm
cirrus
codecs ASoC: max98373: Added 30ms turn on/off time delay 2021-04-21 12:56:13 +02:00
dwc
fsl ASoC: fsl_esai: Fix TDM slot setup for I2S mode 2021-04-21 12:56:14 +02:00
generic ASoC: simple-card-utils: Do not handle device clock 2021-03-24 11:26:37 +01:00
hisilicon
img ASoC: img-i2s-out: Fix runtime PM imbalance on error 2020-10-01 13:18:06 +02:00
intel ASoC: Intel: kbl_da7219_max98927: Fix kabylake_ssp_fixup function 2021-05-14 09:44:11 +02:00
jz4740 ASoC: jz4740-i2s: add missed checks for clk_get() 2020-12-30 11:51:18 +01:00
kirkwood ASoC: kirkwood: fix IRQ error handling 2020-10-01 13:17:13 +02:00
mediatek
meson ASoC: meson: axg-tdmin: fix axg skew offset 2021-01-19 18:26:16 +01:00
mxs
pxa
qcom ASoC: qcom: lpass-platform: Fix memory leak 2020-11-24 13:29:07 +01:00
rockchip ASoC: rockchip: Fix a reference count leak. 2020-06-30 15:36:57 -04:00
samsung ASoC: samsung: tm2_wm5110: check of of_parse return value 2021-05-14 09:44:11 +02:00
sh SoC: rsnd: add interrupt support for SSI BUSIF buffer 2020-06-24 17:50:26 +02:00
sirf
sof ASoC: SOF: Intel: HDA: fix core status verification 2021-04-14 08:24:14 +02:00
spear
sprd
sti
stm
sunxi ASoC: sunxi: sun4i-codec: fill ASoC card owner 2021-04-14 08:24:15 +02:00
tegra ASoC: tegra: Fix reference count leaks. 2020-09-03 11:26:42 +02:00
ti ASoC: ti: omap-mcbsp: Fix an error handling path in 'asoc_mcbsp_probe()' 2020-06-24 17:50:26 +02:00
txx9
uniphier
ux500 ASoC: ux500: mop500: Fix some refcounted resources issues 2020-06-24 17:50:26 +02:00
xilinx
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-component.c
soc-compress.c
soc-core.c ASoC: core: only convert non DPCM link to DPCM link 2020-06-24 17:50:42 +02:00
soc-dai.c
soc-dapm.c ASoC: dapm: remove widget from dirty list on free 2021-01-19 18:26:11 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-io.c
soc-jack.c
soc-ops.c
soc-pcm.c ASoC: pcm: DRAIN support reactivation 2020-12-30 11:51:04 +01:00
soc-topology.c ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() 2021-02-03 23:26:01 +01:00
soc-utils.c