linux/sound/soc/intel
Harsha Priya 5c5f1baee8
ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function
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.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Tested-by: Lukasz Majczak <lma@semihalf.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1595432147-11166-1-git-send-email-harshapriya.n@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 17:16:11 +01:00
..
atom ASoC: intel: use snd_soc_xxx_active() 2020-05-18 16:15:09 +01:00
baytrail ASoC: Intel: baytrail: Fix register access 2020-05-12 14:20:29 +01:00
boards ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function 2020-07-23 17:16:11 +01:00
common ASoC: Intel: common: change match table ehl-rt5660 2020-07-20 14:27:41 +01:00
haswell ASoC: Intel: haswell: Power transition refactor 2020-04-17 19:54:20 +01:00
skylake ASoC: Intel: Skylake: Replace zero-length array with flexible-array 2020-05-12 17:14:33 +01:00
Kconfig ASoC: Intel: Skylake: Update description for HDaudio kconfig 2020-05-12 17:14:35 +01:00
Makefile ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00