ALSA: emu10k1: clean up P16V part somewhat
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Fri, 21 Apr 2023 14:10:06 +0000 (16:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 22 Apr 2023 08:41:25 +0000 (10:41 +0200)
commit02a0d9c281401d4e1eb0f83ed337c8c6a70194d2
tree07f0b78c33775af9cf5227f1952e420665b74f50
parent14a5c5a44b61953b3f84a01152fe1d40838f5d91
ALSA: emu10k1: clean up P16V part somewhat

Detach it better from the main PCM driver, which it really doesn't have
much in common with.

In particular, this moves the interrupt handler implementation into
p16v.c, and makes it access the substream runtime status more directly,
so it doesn't need to abuse structs snd_emu10k1_pcm and
snd_emu10k1_voice any more.

We don't need private pcm runtime data at all, as the only thing it was
used for (except the back-link to the substream) was the `running` flag.
So store that directly in runtime->private_data.

This somewhat radical strip-down shows that this driver contains some
complexity that was never actually utilized. I suppose the right way to
fully utilize the hardware in a simple way would be introducing more
substreams. This wouldn't require any of the removed code.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230421141006.1005452-7-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/emu10k1.h
sound/pci/emu10k1/irq.c
sound/pci/emu10k1/p16v.c