diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2023-05-18 17:09:47 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-05-20 11:16:20 +0300 |
commit | a915d60426d4348a0b91f9870e299056fd604a32 (patch) | |
tree | c5c45335889bc8624f550a802466eff883f8cff5 /sound/pci/emu10k1/emu10k1_callback.c | |
parent | b4fea2d3f25b5f3ad6b230f91e61151165f6d023 (diff) | |
download | linux-a915d60426d4348a0b91f9870e299056fd604a32.tar.xz |
ALSA: emu10k1: revamp playback voice allocator
Instead of separate voices, we now allocate non-interleaved channels,
which may in turn contain two interleaved voices each. The higher-level
code keeps only one pointer per channel. The channels are not allocated
in one block any more, as there is no reason to do that. As a
consequence of that, and because it is cleaner regardless, we now let
the allocator store these pointers at a specified location, rather than
returning only the first one and having the calling code deduce the
remaining ones.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230518140947.3725394-8-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_callback.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_callback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c index 2fdfed7f07c2..ad0dea0c2be9 100644 --- a/sound/pci/emu10k1/emu10k1_callback.c +++ b/sound/pci/emu10k1/emu10k1_callback.c @@ -287,7 +287,7 @@ get_voice(struct snd_emux *emu, struct snd_emux_port *port) if (vp->ch < 0) { /* allocate a voice */ struct snd_emu10k1_voice *hwvoice; - if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, NULL, &hwvoice) < 0 || hwvoice == NULL) + if (snd_emu10k1_voice_alloc(hw, EMU10K1_SYNTH, 1, 1, NULL, &hwvoice) < 0) continue; vp->ch = hwvoice->number; emu->num_voices++; |