]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: topology: Create kcontrols based on their type
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 17 Feb 2025 10:21:06 +0000 (11:21 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 24 Feb 2025 16:01:51 +0000 (16:01 +0000)
commit758beab0252912395efb79f34095c5ae7e3e58b1
treec9b69af4e49d8aa57ff253c355a00bb676ed1e3a
parentb47834ee4485bbdcc6d36f086ff61c3efd8870d4
ASoC: topology: Create kcontrols based on their type

Fields ->ops.info and ->type of struct snd_soc_tplg_ctl_hdr denote
info-operation type and control type respectively. These are two
different pieces of information. The info type is represented by
SND_SOC_TPLG_CTL_xxx and SND_SOC_TPLG_DAPM_CTL_xxx on UAPI side whereas
for control type it is SND_SOC_TPLG_TYPE_xxx (mixer, bytes or enum).

The type of the kcontrol to be created is currently guessed based on the
value of the ->ops.info. Use the ->type instead to correct and simplify
the code. With this change ops.info() can be customized by sound drivers
utilizing the ASoC-topology just like ops.get() and ops.put() can be.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250217102115.3539427-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c