summaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/voice.c
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-05-18 17:09:43 +0300
committerTakashi Iwai <tiwai@suse.de>2023-05-18 17:49:09 +0300
commitb840f8d8fcb3df9e65bb6782a9072897b6ea117d (patch)
tree3c15d1da7a8b1cec02425c07f4f86cfade2ddb99 /sound/pci/emu10k1/voice.c
parent3eb5b1d0a11d1daf85243eb06f813cf83752e1d0 (diff)
downloadlinux-b840f8d8fcb3df9e65bb6782a9072897b6ea117d.tar.xz
ALSA: emu10k1: improve voice status display in /proc
Eliminate the MIDI type, as there is no such thing - the MPU401 port doesn't have anything to do with voices. For clarity, differentiate between regular and extra voices. Don't atomize the enum into bits in the table display. Simplify/optimize the storage. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230518140947.3725394-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/voice.c')
-rw-r--r--sound/pci/emu10k1/voice.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c
index a602df9117f6..ac89d09ed9bc 100644
--- a/sound/pci/emu10k1/voice.c
+++ b/sound/pci/emu10k1/voice.c
@@ -78,21 +78,7 @@ static int voice_alloc(struct snd_emu10k1 *emu, int type, int number,
dev_dbg(emu->card->dev, "voice alloc - %i, %i of %i\n",
voice->number, idx-first_voice+1, number);
*/
- voice->use = 1;
- switch (type) {
- case EMU10K1_PCM:
- voice->pcm = 1;
- break;
- case EMU10K1_SYNTH:
- voice->synth = 1;
- break;
- case EMU10K1_MIDI:
- voice->midi = 1;
- break;
- case EMU10K1_EFX:
- voice->efx = 1;
- break;
- }
+ voice->use = type;
}
*rvoice = &emu->voices[first_voice];
return 0;
@@ -103,7 +89,7 @@ static void voice_free(struct snd_emu10k1 *emu,
{
snd_emu10k1_voice_init(emu, pvoice->number);
pvoice->interrupt = NULL;
- pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0;
+ pvoice->use = 0;
pvoice->epcm = NULL;
}
@@ -121,7 +107,7 @@ int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number,
spin_lock_irqsave(&emu->voice_lock, flags);
for (;;) {
result = voice_alloc(emu, type, number, rvoice);
- if (result == 0 || type == EMU10K1_SYNTH || type == EMU10K1_MIDI)
+ if (result == 0 || type == EMU10K1_SYNTH)
break;
/* free a voice from synth */