linux-stable/sound
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
..
ac97 ALSA: ac97: set variables dev_attr_vendor_id to static 2023-08-02 09:27:39 +02:00
aoa ALSA: aoa: Fix typos in PCM fix patch 2023-08-18 09:09:39 +02:00
arm ASoC: arm: convert not to use asoc_xxx() 2023-09-25 14:16:16 +02:00
atmel ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
core ALSA: seq: Fix snd_seq_expand_var_event() call to user-space 2023-09-05 10:13:46 +02:00
drivers ASoC: Updates for v6.6 2023-08-28 16:13:03 +02:00
firewire ALSA: dice: add stream format parameters for Weiss devices 2023-08-10 10:10:34 +02:00
hda sound updates for 6.6-rc1 2023-08-30 13:45:05 -07:00
i2c
isa ALSA: sb: Fix wrong argument in commented code 2023-09-02 08:11:55 +02:00
mips
oss
parisc
pci ALSA: hda: cs35l41: Consistently use dev_err_probe() 2023-09-11 13:34:42 +01:00
pcmcia ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
ppc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
sh ALSA: sh: Convert to generic PCM copy ops 2023-08-18 12:18:24 +02:00
soc ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling 2023-10-12 13:04:38 +01:00
sparc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
spi
synth ALSA: emu10k1: fix synthesizer pitch for E-MU cards at 44.1 kHz 2023-06-13 07:42:08 +02:00
usb ALSA: usb-audio: Fix potential memory leaks at error path for UMP open 2023-09-05 10:10:48 +02:00
virtio
x86
xen ALSA: xen: Convert to generic PCM copy ops 2023-08-18 12:18:25 +02:00
ac97_bus.c
Kconfig This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
last.c
Makefile
sound_core.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00