Skip to contentSkip to conversation

sound: Add n64 driver

PATCH In review Lauri Kasanen 1 participant 1 message Dec 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/6 sound: Add n64 driver

The sound DMA unit has errata on certain alignments, which is why we can't use alsa's DMA buffer directly.

---
 arch/mips/n64/init.c |   1 +
 sound/mips/Kconfig   |   7 ++
 sound/mips/Makefile  |   1 +
 sound/mips/snd-n64.c | 297 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 306 insertions(+)
 create mode 100644 sound/mips/snd-n64.c
arch/mips/n64/init.c +1 -0
index 635e9ef..0f82a409 100644
@@ -50,6 +50,7 @@ void __init prom_free_prom_memory(void)
 static int __init n64_platform_init(void)
 {
 	platform_device_register_simple("n64rdp", -1, NULL, 0);
+	platform_device_register_simple("n64audio", -1, NULL, 0);
 
 	return 0;
 }
sound/mips/Kconfig +7 -0
index b497b80..f37ad92 100644
@@ -24,5 +24,12 @@ config SND_SGI_HAL2
 	help
 	  Sound support for the SGI Indy and Indigo2 Workstation.
 
+config SND_N64
+	bool "N64 Audio"
+	depends on MIPS_N64
+	select SND_PCM
+	help
+	  Sound support for the N64.
+
 endif	# SND_MIPS
 
sound/mips/Makefile +1 -0
index ccc364e..7c86268 100644
@@ -9,3 +9,4 @@ snd-sgi-hal2-objs := hal2.o
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_SGI_O2) += snd-sgi-o2.o
 obj-$(CONFIG_SND_SGI_HAL2) += snd-sgi-hal2.o
+obj-$(CONFIG_SND_N64) += snd-n64.o
sound/mips/snd-n64.c new file +297 -0

297 lines not on this page · raw message

--
2.6.2