Skip to content
Unverified Commit 5c5f1bae authored by Harsha Priya's avatar Harsha Priya Committed by Mark Brown
Browse files

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: default avatarHarsha Priya <harshapriya.n@intel.com>
Signed-off-by: default avatarVamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Tested-by: default avatarLukasz Majczak <lma@semihalf.com>
Acked-by: default avatarPierre-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: default avatarMark Brown <broonie@kernel.org>
parent ffc6d45d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment