ASoC: SOF: Intel: detect DMIC number in SoundWire mixed config
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 8 Feb 2021 23:33:34 +0000 (17:33 -0600)
committerMark Brown <broonie@kernel.org>
Wed, 10 Feb 2021 17:22:52 +0000 (17:22 +0000)
commit7aecf59770920cce5ff6e94b3809574364178126
tree9d3cfdcb61ffa6c3b1ff7b1dd792487009afec65
parent6f5d506d7ff1d9b1ffac0130f2958b9da41175f4
ASoC: SOF: Intel: detect DMIC number in SoundWire mixed config

The pinmux allows for 2 SoundWire links to be enabled along with
DMICs. This was the default configuration on the TGL-RVP.

One issue with this configuration is that we don't have a means to
automatically detect how many DMICs are used, which in turn requires
the user to manually rename the topology file required on a platform.

This was borderline acceptable for Intel RVPs, but now that this
configuration is present in HP devices we need to automate the
process.

This patch makes use of the NHLT information and will pass the DMIC
number to the machine driver as a parameter. A follow-up patch will
expose the DMIC number to userspace/UCM with the configuration strings.

The Google devices do make use of DMICs instead of SoundWire link 2
and 3, but their topology is unique enough that they do not need any
NHTL support or topology renaming.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c