]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: control: override volume info callback
authorJaska Uimonen <jaska.uimonen@linux.intel.com>
Wed, 11 Nov 2020 17:31:05 +0000 (19:31 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 20 Nov 2020 13:49:05 +0000 (13:49 +0000)
commit1bb9aa9858f64e44ff7ce7ff3ec07315a496f1e1
treef22ed72c2d46235cdcf2fa487d1e3bb1982949fe
parentdb2005c2b9274d93f568c662b7cf87361418e016
ASoC: SOF: control: override volume info callback

ASoC dapm controls currently don't support more than 2 channels. This is
a problem for SOF-based devices where individual volume control cannot
be provided on the 4 DMIC input path.

If we want to provide controls for more than 2 channels, this patch
suggests a simple solution based on an override of the info callback.
For example, in the case with 4 channel DMIC PGAs, a sof_info callback
would be used. Mono and stereo cases will keep using the existing dapm
info callback.

A longer-term solution would be to remove the limits to 2 channels in
ASoC/DAPM/topology. This is a topic Intel is currently looking into,
e.g. by removing the use of 'reg' and 'rreg' fields and use arrays
instead. Such changes will be rather intrusive and touch multiple codec
and platform drivers. Removing restrictions is the right thing to do,
but this will need to be done in steps with lots of validation.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201111173105.1927466-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/control.c
sound/soc/sof/sof-audio.h
sound/soc/sof/topology.c