]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: SOF: imx8: use IMX_SOF_* macros
authorLaurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Fri, 7 Feb 2025 16:22:42 +0000 (11:22 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 7 Feb 2025 16:46:57 +0000 (16:46 +0000)
commit563e40153a56cbfae8721f9591022df5d930f939
tree4cd663dbd1f4ac804f1d565650bb99534d74ffd5
parent645753d01356ff1a756812f1c69c53eb5c9081cd
ASoC: SOF: imx8: use IMX_SOF_* macros

The definition of 'struct sof_dev_desc' has the following properties
for imx chips:

  1) FW path is the same for all chips.
  2) Topology path is the same for all chips.
  3) FW name can be written as: "sof-${machine_name}.ri"
  4) IPC3 is the only supported protocol

The structure takes quite a few lines of code. Since the intention
is to add support for more imx8 chips in the same driver, we need
to try and reduce the number of lines taken by information that's
not particularly useful. As such, we can use 'IMX_SOF_DEV_DESC()'
to reduce the declaration of the structure to just one line. The
only information that's particularly useful can be seen from the
parameters of the macro.

Of course, if any of the assumptions don't apply anymore, driver
writers can simply declare the 'struct sof_dev_desc' the "old
fashioned way". No reason to make the macro suit multiple needs.

The same logic applies to the array of 'struct snd_soc_dai_driver'.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-4-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/imx/imx8.c