| 826f35b8 | 29-Aug-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: synth: Use guard() for preset locks
Define a macro for the preset locking/unlocking pairs for soundfont using guard() macro as a further code cleanup.
The new macro is put in soundfont.h (and
ALSA: synth: Use guard() for preset locks
Define a macro for the preset locking/unlocking pairs for soundfont using guard() macro as a further code cleanup.
The new macro is put in soundfont.h (and some function renames) along with it for avoiding unnecessary troubles with clang.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250829151335.7342-6-tiwai@suse.de
show more ...
|
| 59ede717 | 29-Aug-2025 |
Takashi Iwai <tiwai@suse.de> |
ALSA: synth: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://p
ALSA: synth: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250829151335.7342-5-tiwai@suse.de
show more ...
|
| 4c4cbe66 | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
ALSA: emux: simplify snd_sf_list.callback handling
Both drivers provide both sample_new and sample_free, and it makes no sense to pretend that they could not. In fact, load_data() would already cras
ALSA: emux: simplify snd_sf_list.callback handling
Both drivers provide both sample_new and sample_free, and it makes no sense to pretend that they could not. In fact, load_data() would already crash if sample_new was null. So remove the remaining null checks.
Contrary to that, the emu10k1 driver actually has a null sample_reset, though I'm not convinced that this inconsistency is justified.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-18-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| 89b32ccb | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
ALSA: emux: improve patch ioctl data validation
In load_data(), make the validation of and skipping over the main info block match that in load_guspatch().
In load_guspatch(), add checking that the
ALSA: emux: improve patch ioctl data validation
In load_data(), make the validation of and skipping over the main info block match that in load_guspatch().
In load_guspatch(), add checking that the specified patch length matches the actually supplied data, like load_data() already did.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-8-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| de67aab1 | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
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 expla
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>
show more ...
|
| 877d1e81 | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
ALSA: emux: fix init of patch_info.truesize in load_data()
The field is explicitly documented to be initialized by the driver (which it actually is). Also, using patch_info.size would be actually wr
ALSA: emux: fix init of patch_info.truesize in load_data()
The field is explicitly documented to be initialized by the driver (which it actually is). Also, using patch_info.size would be actually wrong for 16-bit data, as one field counts samples, while the other counts bytes.
load_guspatch() already did it right.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-5-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| 19061f35 | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
ALSA: emux: fix validation of snd_emux.num_ports
Both bounds had off-by-one errors.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-4-oswald.budden
ALSA: emux: fix validation of snd_emux.num_ports
Both bounds had off-by-one errors.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-4-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
| 3f3e0dfc | 06-Apr-2024 |
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> |
ALSA: emux: prune unused parameter from snd_soundfont_load_guspatch()
The `client` parameter was not used, so eliminate it from the call chain.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen
ALSA: emux: prune unused parameter from snd_soundfont_load_guspatch()
The `client` parameter was not used, so eliminate it from the call chain.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Message-ID: <20240406064830.1029573-3-oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|