linux/sound/isa
Oswald Buddenhagen de67aab120 ALSA: emux: centralize & improve patch info validation
This does several closely related things:
- Move the code from the drivers into the SoundFont loader, which
  de-duplicates it.
- Sort of explain the weird "recalculate address offset" feature. Note
  that I don't think it actually makes any sense - the calling user
  space code should do that. The background is certainly that the source
  data (the SoundFont format) uses pointers into a single wave block
  (and the API allows doing the same for on-board ROM), but the API
  expects the wave data from user space to be pre-chopped into
  individual patches anyway.
- Make sure that the specified offsets actually lie within the supplied
  wave data. Note that we don't validate ROM offsets, so one can play
  back anything within the sound card's address space.
- In load_guspatch(), don't call the sample_new callback anymore when
  the patch size is zero, as was already the case in load_data(). The
  callbacks would instantly return in that case anyway; these checks are
  now removed.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Message-ID: <20240406064830.1029573-7-oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-07 08:35:47 +02:00
..
ad1816a ALSA: ad1816a: Allocate resources with device-managed APIs 2021-07-19 16:17:12 +02:00
ad1848 ALSA: ad1848: Fix -Wformat-truncation warning for longname string 2023-09-15 13:22:53 +02:00
cs423x ALSA: cs4231: Fix -Wformat-truncation warning for longname string 2023-09-15 13:23:01 +02:00
es1688 ALSA: es1688: Fix -Wformat-truncation warning 2023-09-15 13:21:33 +02:00
galaxy ALSA: galaxy: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:16 +02:00
gus ALSA: gus: Convert to generic PCM copy ops 2023-08-18 12:18:18 +02:00
msnd ALSA: msnd: Use proper mmap method 2021-08-09 16:06:17 +02:00
opti9xx ALSA: opti9x: Fix -Wformat-truncation warning 2023-09-15 13:21:34 +02:00
sb ALSA: emux: centralize & improve patch info validation 2024-04-07 08:35:47 +02:00
wavefront ALSA: wavefront: copy userspace array safely 2023-11-20 12:38:31 +01:00
wss ALSA: wss: Allocate resources with device-managed APIs 2021-07-19 16:17:13 +02:00
adlib.c ALSA: adlib: Allocate resources with device-managed APIs 2021-07-19 16:17:16 +02:00
als100.c ALSA: als100: Allocate resources with device-managed APIs 2021-07-19 16:17:16 +02:00
azt2320.c ALSA: azt2320: Allocate resources with device-managed APIs 2021-07-19 16:17:17 +02:00
cmi8328.c ALSA: cmi8328: Allocate resources with device-managed APIs 2021-07-19 16:17:18 +02:00
cmi8330.c ALSA: cmi8330: Allocate resources with device-managed APIs 2021-07-19 16:17:18 +02:00
es18xx.c ALSA: es18xx: Remove the unneeded result variable 2022-09-20 13:33:55 +02:00
Kconfig ALSA: add HAS_IOPORT dependencies 2023-05-22 16:43:47 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
opl3sa2.c ALSA: opl3sa2: Allocate resources with device-managed APIs 2021-07-19 16:17:25 +02:00
sc6000.c ALSA: sc6000: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:17 +02:00
sscape.c ALSA: sscape: Fix -Wformat-truncation warning 2023-09-15 13:21:32 +02:00