[PATCH v8] ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Jul 22 17:39:12 CEST 2020



On 7/22/20 10:35 AM, Harsha Priya wrote:
> 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 at intel.com>
> Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal at intel.com>
> Tested-by: Lukasz Majczak <lma at semihalf.com>

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>

Thanks Harsha and Lukasz!



More information about the Alsa-devel mailing list