linux-stable/sound/soc
Amadeusz Sławiński 7a6debe047
ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling
In quite a few places in code there are checks for number of SSPs
present on system, to reduce maintenance burden introduce helper
functions allowing to get SSP and TDM from machine board configuration.

Additionally in boards we use SSP and TDM to generate quite a few
strings, it could be done like:
if (tdms)
	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d:%d-Codec",
		ssp_port, tdm_slot);
else
	dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec",
		ssp_port);

but quite quickly code ends up with spaghetti of similar if elses.
Instead introduce macro which can be used to generate correct string,
allowing to minimize code to something like:
dl->name = devm_kasprintf(dev, GFP_KERNEL, AVS_STRING_FMT("SSP", "-Codec",
		ssp_port, tdm_slot));

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20231012083514.492626-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-12 13:04:38 +01:00
..
adi ASoC: adi: merge DAI call back functions into ops 2023-08-14 13:10:03 +01:00
amd ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
apple ASoC: apple: mca: Annotate struct mca_data with __counted_by 2023-10-10 22:10:07 +01:00
atmel ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
au1x ASoC: au1x: convert not to use asoc_xxx() 2023-09-25 14:16:24 +02:00
bcm ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
cirrus ASoC: cirrus: convert not to use asoc_xxx() 2023-09-25 14:16:32 +02:00
codecs ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
dwc ASoC: dwc: convert not to use asoc_xxx() 2023-09-25 14:16:19 +02:00
fsl ASoC: fsl: mpc5200_dma.c: Fix warning of Function parameter or member not described 2023-10-10 12:39:37 +01:00
generic ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
google ASoC: google: convert not to use asoc_xxx() 2023-09-25 14:16:32 +02:00
hisilicon ASoC: hisilicon: merge DAI call back functions into ops 2023-08-14 13:10:30 +01:00
img ASoC: img: convert not to use asoc_xxx() 2023-09-25 14:16:21 +02:00
intel ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling 2023-10-12 13:04:38 +01:00
jz4740 ASoC: jz4740: merge DAI call back functions into ops 2023-08-14 13:10:21 +01:00
kirkwood ASoC: kirkwood: convert not to use asoc_xxx() 2023-09-25 14:16:36 +02:00
loongson ASoC: loongson: convert not to use asoc_xxx() 2023-09-25 14:16:37 +02:00
mediatek ASoC: mediatek: mt8188-mt6359: add rt5682s support 2023-10-10 12:39:35 +01:00
meson ASoC: meson: convert not to use asoc_xxx() 2023-09-25 14:16:28 +02:00
mxs ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
pxa ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
qcom ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
rockchip ASoC: DT matching and header cleanups 2023-10-09 23:14:18 +01:00
samsung ASoC: Use device_get_match_data() 2023-10-09 13:13:59 +01:00
sh ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
sof ASoC: SOF: Convert to platform remove callback returning void 2023-10-10 19:21:04 +01:00
spear
sprd ASoC: sprd: convert not to use asoc_xxx() 2023-09-25 14:16:26 +02:00
starfive ASoC: starfive: convert not to use asoc_xxx() 2023-09-26 17:18:39 +02:00
sti ASoC: sti: merge DAI call back functions into ops 2023-08-14 13:10:10 +01:00
stm ASoC: Use device_get_match_data() 2023-10-09 13:13:59 +01:00
sunxi ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
tegra ASoC: Use device_get_match_data() 2023-10-09 13:13:59 +01:00
ti ASoC: Use device_get_match_data() 2023-10-09 13:13:59 +01:00
uniphier ASoC: uniphier: convert not to use asoc_xxx() 2023-09-25 14:16:39 +02:00
ux500 ASoC: ux500: convert not to use asoc_xxx() 2023-09-25 14:16:31 +02:00
xilinx
xtensa ASoC: extensa: convert not to use asoc_xxx() 2023-09-25 14:16:35 +02:00
Kconfig
Makefile
soc-ac97.c
soc-acpi.c ASoC: soc-acpi: improve log messagesin link_slaves_found() 2023-07-31 23:24:01 +01:00
soc-card.c
soc-component.c ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
soc-compress.c ASoC: soc-compress: convert not to use asoc_xxx() 2023-09-25 14:16:52 +02:00
soc-core.c ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
soc-dai.c ASoC: soc-dai: convert not to use asoc_xxx() 2023-09-25 14:16:47 +02:00
soc-dapm.c ASoC: Merge fixes for consistent cs42l43 schema 2023-10-10 17:07:17 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: Merge up fixes 2023-09-26 16:14:44 +02:00
soc-jack.c ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access 2023-08-14 22:10:35 +01:00
soc-link.c ASoC: soc-link: convert not to use asoc_xxx() 2023-09-25 14:16:50 +02:00
soc-ops.c
soc-pcm.c ASoC: soc-pcm.c: Make sure DAI parameters cleared if the DAI becomes inactive 2023-09-27 11:29:52 +02:00
soc-topology-test.c
soc-topology.c ASoC: soc-topology: convert not to use asoc_xxx() 2023-09-25 14:16:52 +02:00
soc-utils-test.c
soc-utils.c ASoC: soc-utils: convert not to use asoc_xxx() 2023-09-25 14:16:51 +02:00