aboutsummaryrefslogtreecommitdiff
path: root/sound/synth
diff options
context:
space:
mode:
authorGravatar Oswald Buddenhagen <oswald.buddenhagen@gmx.de> 2024-04-06 08:48:17 +0200
committerGravatar Takashi Iwai <tiwai@suse.de> 2024-04-07 08:35:46 +0200
commit877d1e81c7a4c47c69a098cd8b87756b2809e885 (patch)
treea4e62b719ba9d5cb0a54d5847e1553fdeb575ae8 /sound/synth
parentALSA: emux: fix validation of snd_emux.num_ports (diff)
downloadlinux-877d1e81c7a4c47c69a098cd8b87756b2809e885.tar.gz
linux-877d1e81c7a4c47c69a098cd8b87756b2809e885.tar.bz2
linux-877d1e81c7a4c47c69a098cd8b87756b2809e885.zip
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>
Diffstat (limited to 'sound/synth')
-rw-r--r--sound/synth/emux/soundfont.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
index e1e47518ac92..ad0231d7a39d 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -735,7 +735,7 @@ load_data(struct snd_sf_list *sflist, const void __user *data, long count)
sp->v = sample_info;
sp->v.sf_id = sf->id;
sp->v.dummy = 0;
- sp->v.truesize = sp->v.size;
+ sp->v.truesize = 0;
/*
* If there is wave data then load it.