ASoC: Intel: sof_es8336: use NHLT information to set dmic and SSP
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 8 Mar 2022 19:26:04 +0000 (13:26 -0600)
committerMark Brown <broonie@kernel.org>
Wed, 9 Mar 2022 13:30:27 +0000 (13:30 +0000)
commit651c304df7f6e3fbb4779527efa3eb128ef91329
treebf39ebe506b3b913e6ba7bf8f17887afa17cfb95
parent1b5283483a782f6560999d8d5965b1874d104812
ASoC: Intel: sof_es8336: use NHLT information to set dmic and SSP

Since we see a proliferation of devices with various configurations,
we want to automatically set the DMIC and SSP information. This patch
relies on the information extracted from NHLT and partially reverts
existing DMI quirks added by commit a164137ce91a ("ASoC: Intel: add
machine driver for SOF+ES8336")

Note that NHLT can report multiple SSPs, choosing from the
ssp_link_mask in an MSB-first manner was found experimentally to work
fine.

The only thing that cannot be detected is the GPIO type, and users may
want to use the quirk override parameter if the 'wrong' solution is
provided.

Tested-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220308192610.392950-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_es8336.c