Skip to contentSkip to conversation

Au1xxx sound registration and power management

PATCH In review Rodolfo Giometti 2 participants 2 messages Jun 30, 2006

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

PATCH 1/1 Au1xxx sound registration and power management

Hello,

here a patch to support device registration and power management for the au1xxx ALSA driver.

Ciao,

Rodolfo

P.S. Please, let me know if I should send this patch to other lists too.

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
arch/mips/au1000/common/platform.c +28 -0
index 0088889..34de6d3 100644
@@ -88,6 +88,31 @@ static struct platform_device au1xxx_eth
 #endif
 #endif
 
+#if defined(CONFIG_SND_AU1X00)
+/* AC97 controller */
+static struct resource au1xxx_snd_resources[] = {
+	[0] = {
+		.name   = "snd-base",
+		.start  = AC97C_BASE,
+		.end    = AC97C_BASE + AC97_IOSIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.name	= "snd-irq",
+		.start	= AU1000_AC97C_INT,
+		.end	= AU1000_AC97C_INT,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct platform_device au1xxx_snd_device = {
+		.name   = "au1xxx-snd",
+		.id             = -1,
+		.num_resources  = ARRAY_SIZE(au1xxx_snd_resources),
+		.resource       = au1xxx_snd_resources,
+};
+#endif
+
 /* OHCI (USB full speed host controller) */
 static struct resource au1xxx_usb_ohci_resources[] = {
 	[0] = {
@@ -376,6 +401,9 @@ #if defined(CONFIG_SOC_AU1000) || \
 	&au1xxx_eth1_device,
 #endif
 #endif
+#if defined(CONFIG_SND_AU1X00)
+	&au1xxx_snd_device,
+#endif
 	&au1xxx_usb_ohci_device,
 	&au1x00_pcmcia_device,
 #ifdef CONFIG_FB_AU1100
include/asm-mips/mach-au1x00/au1000.h +3 -0
index 0988af9..cb8939a 100644
@@ -1600,6 +1600,9 @@ #define SYS_CPUPLL                0xB190
 #define SYS_AUXPLL                0xB1900064
 
 /* AC97 Controller */
+#define AC97C_BASE              AC97_PHYS_ADDR
+#define AC97_IOSIZE		0x14
+
 #define AC97C_CONFIG              0xB0000000
   #define AC97C_RECV_SLOTS_BIT  13
   #define AC97C_RECV_SLOTS_MASK (0x3ff << AC97C_RECV_SLOTS_BIT)
sound/mips/au1x00.c +126 -43

250 lines not on this page · raw message

#1 lore raw
Quoted 9 lines · Rodolfo Giometti

here a patch to support device registration and power management for the au1xxx ALSA driver.

Ciao,

Rodolfo

P.S. Please, let me know if I should send this patch to other lists too.

Yes, this patch is touching 80% ALSA code, so please send it to:

SOUND

P:      Jaroslav Kysela
M:      [email protected]
L:      [email protected]
S:      Maintained

Ralf

PS: And if you want your patches considerd, add Signed-off-by: lines :)