linux/sound/isa/sb
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
..
emu8000_callback.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000_local.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000_patch.c ALSA: emux: centralize & improve patch info validation 2024-04-07 08:35:47 +02:00
emu8000_pcm.c ALSA: sb: Fix wrong argument in commented code 2023-09-02 08:11:55 +02:00
emu8000_synth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
jazz16.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +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
sb8_main.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sb8_midi.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sb8.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb16_csp.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
sb16_main.c ASoC: Fixes for v5.13 2021-06-24 10:02:45 +02:00
sb16.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb_common.c ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
sb_mixer.c ALSA: sb: Fix assignment in if condition 2021-06-09 17:29:35 +02:00
sbawe.c