[linux-audio-user] snd-hdsp+cardbus+M6807 notebook=distortion -- FIXED!

Daniel Ritz daniel.ritz at gmx.ch
Sun Apr 18 18:39:47 BST 2004


On Sunday 18 April 2004 05:37, Ivica Ico Bukvic wrote:
> Will do sometime towards the end of this coming week (have a horrible
> deadline to deal with until this coming Thursday) :-).
> 
> Although I am pretty sure the latency is not the problem because in Windows
> it was set to less than that and the card worked (as long as it is not 0,
> i.e. I tested it at 0x20 or 32). The latency is supposed to be adjusted by
> the hdsp driver, as Matthias (RME support guy) told me (and I quote):
> 

the hdsp driver in linux adjust the hdsps latency timer to 255, but not
the one of the bridge. and there's another one: the cardbus latency
timer of the bridge. just to be sure.

it's just that i have the feeling the register at c9 changes the behavoir of the
latency timers. it's called TLTEnable in the spec, could be Target Latency
Timer Enable or something...

anyway find attached a patch that adds this change to the yenta driver
that also handles suspend/resume :)  against 2.6.6-rc1.

russell, what do you think?

rgds
-daniel



--- 1.19/drivers/pcmcia/ti113x.h	Wed Apr 14 23:23:01 2004
+++ edited/drivers/pcmcia/ti113x.h	Sun Apr 18 14:23:42 2004
@@ -150,6 +150,10 @@
 /* ExCA IO offset registers */
 #define TI113X_IO_OFFSET(map)		(0x36+((map)<<1))
 
+/* EnE test register */
+#define ENE_TEST_C9			0xc9	/* 8bit */
+#define ENE_TEST_C9_TLTENABLE		0x02
+
 #ifdef CONFIG_CARDBUS
 
 /*
@@ -160,6 +164,7 @@
 #define ti_devctl(socket)	((socket)->private[2])
 #define ti_diag(socket)		((socket)->private[3])
 #define ti_mfunc(socket)	((socket)->private[4])
+#define ene_test_c9(socket)	((socket)->private[5])
 
 /*
  * These are the TI specific power management handlers.
@@ -171,6 +176,9 @@
 	ti_cardctl(socket) = config_readb(socket, TI113X_CARD_CONTROL);
 	ti_devctl(socket) = config_readb(socket, TI113X_DEVICE_CONTROL);
 	ti_diag(socket) = config_readb(socket, TI1250_DIAGNOSTIC);
+
+	if (socket->dev->vendor == PCI_VENDOR_ID_ENE)
+		ene_test_c9(socket) = config_readb(socket, ENE_TEST_C9);
 }
 
 static void ti_restore_state(struct yenta_socket *socket)
@@ -180,6 +188,9 @@
 	config_writeb(socket, TI113X_CARD_CONTROL, ti_cardctl(socket));
 	config_writeb(socket, TI113X_DEVICE_CONTROL, ti_devctl(socket));
 	config_writeb(socket, TI1250_DIAGNOSTIC, ti_diag(socket));
+
+	if (socket->dev->vendor == PCI_VENDOR_ID_ENE)
+		config_writeb(socket, ENE_TEST_C9, ene_test_c9(socket));
 }
 
 /*
@@ -589,6 +600,16 @@
 		printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n");
 		val |= TI122X_SCR_MRBURSTUP;
 		config_writel(socket, TI113X_SYSTEM_CONTROL, val);
+	}
+
+	/*
+	 * for EnE bridges only: clear testbit TLTEnable. this makes the
+	 * RME Hammerfall DSP sound card working.
+	 */
+	if (socket->dev->vendor == PCI_VENDOR_ID_ENE) {
+		u8 test_c9 = config_readb(socket, ENE_TEST_C9);
+		test_c9 &= ~ENE_TEST_C9_TLTENABLE;
+		config_writeb(socket, ENE_TEST_C9, test_c9);
 	}
 
 	/*








More information about the linux-pcmcia mailing list