[alsa-devel] [PATCH AUTOSEL 5.5 406/542] ASoC: SOF: Intel: hda: Fix SKL dai count

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Feb 28 01:31:16 CET 2020


Hi Sasha,

On 2/14/20 9:46 AM, Sasha Levin wrote:
> From: Cezary Rojewski <cezary.rojewski at intel.com>
> 
> [ Upstream commit a6947c9d86bcfd61b758b5693eba58defe7fd2ae ]
> 
> With fourth pin added for iDisp for skl_dai, update SOF_SKL_DAI_NUM to
> account for the change. Without this, dais from the bottom of the list
> are skipped. In current state that's the case for 'Alt Analog CPU DAI'.
> 
> Fixes: ac42b142cd76 ("ASoC: SOF: Intel: hda: Add iDisp4 DAI")

This patch generates a kernel oops with v5.5.6 - mainly because the 
initial commit ac42b142cd76 is missing, which ends-up creating an empty 
entry in the skl_dai[] array.

This was just reported to us, see logs at
https://github.com/thesofproject/sof/issues/2418

the same problem is likely to happen with 5.4-stable
[PATCH AUTOSEL 5.4 349/459] ASoC: SOF: Intel: hda: Fix SKL dai count

Since the initial commit to be fixed was not included, the -stable 
branches should probably revert this patch? Adding ac42b142cd76 should 
also not generate any problems, I tested it on top of v5.5.6

The 'right' fix should be to use ARRAY_SIZE instead of hard-coded 
defines, but there are multiple dependencies so we'd probably need to 
refactor the code to so so.

Let me know if you want more details or additional help,
-Pierre

> Signed-off-by: Cezary Rojewski <cezary.rojewski at intel.com>
> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> Link: https://lore.kernel.org/r/20200113114054.9716-1-cezary.rojewski@intel.com
> Signed-off-by: Mark Brown <broonie at kernel.org>
> Signed-off-by: Sasha Levin <sashal at kernel.org>
> ---
>   sound/soc/sof/intel/hda.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
> index 63df888dddb6c..de0115294c74e 100644
> --- a/sound/soc/sof/intel/hda.h
> +++ b/sound/soc/sof/intel/hda.h
> @@ -348,7 +348,7 @@
>   
>   /* Number of DAIs */
>   #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
> -#define SOF_SKL_NUM_DAIS		14
> +#define SOF_SKL_NUM_DAIS		15
>   #else
>   #define SOF_SKL_NUM_DAIS		8
>   #endif
> 


More information about the Alsa-devel mailing list