Skip to contentSkip to conversation

Terratec DMX 6fire audio input

PATCH Eduard Hasenleithner 2 participants 2 messages Jun 22, 2003 – Jun 23, 2003 Sound

lore
Share & tools
lore
#0 lore raw

Hello developers.

Here is a patch which enables to do audio input on this particular card even when not doing a soft reboot from windows. The problem with the current driver is that the PCA9554 is set to input mode for all IO pins after a cold reset. In order to set the pins to output mode register 3 of this chip has to be set.

As I don't know if there are any pins used as input I have set register 3 to 0x80, so the MSB is input. Hopefully my patch won't do any damage! Maybe someone can check the content of this register after a warm reboot from windows. I have a linux only machine.

Keep on the good work.

bye,
Eduard.

PS: Sorry if this email arrives twice, it didn't seem to come through the first time.

sound/pci/ice1712/ews.c renamed from alsa-driver-0.9.4/sound/pci/ice1712/ews.c +7 -5
@@ -389,6 +389,12 @@
  * initialize the chip
  */
 
+#define PCF9554_REG_INPUT	0
+#define PCF9554_REG_OUTPUT	1
+#define PCF9554_REG_POLARITY	2
+#define PCF9554_REG_CONFIG	3
+static int snd_ice1712_6fire_write_pca(ice1712_t *ice, unsigned char reg, unsigned char data);
+
 static int __devinit snd_ice1712_ews_init(ice1712_t *ice)
 {
 	int err;
@@ -425,6 +431,7 @@
 			snd_printk("PCF9554 initialization failed\n");
 			return err;
 		}
+		snd_ice1712_6fire_write_pca(ice, PCF9554_REG_CONFIG, 0x80);
 		break;
 	case ICE1712_SUBDEVICE_EWS88MT:
 	case ICE1712_SUBDEVICE_EWS88MT_NEW:
@@ -750,11 +757,6 @@
  * DMX 6Fire specific controls
  */
 
-#define PCF9554_REG_INPUT	0
-#define PCF9554_REG_OUTPUT	1
-#define PCF9554_REG_POLARITY	2
-#define PCF9554_REG_CONFIG	3
-
 static int snd_ice1712_6fire_read_pca(ice1712_t *ice, unsigned char reg)
 {
 	unsigned char byte;
#1 lore raw

At 22 Jun 2003 22:52:34 +0200,

Quoted 10 lines · Eduard Hasenleithner

[1 <text/plain (7bit)>]
Hello developers.

Here is a patch which enables to do audio input on this particular card even when not doing a soft reboot from windows. The problem with the current driver is that the PCA9554 is set to input mode for all IO pins after a cold reset. In order to set the pins to output mode register 3 of this chip has to be set.

Quoted 4 lines

As I don't know if there are any pins used as input I have set register 3 to 0x80, so the MSB is input. Hopefully my patch won't do any damage! Maybe someone can check the content of this register after a warm reboot from windows. I have a linux only machine.

thanks for the patch!
Jaroslav alreay applied it to cvs.

IIRC, the connection to PCA9554 are all output (bit 0-6), so your patch should be ok.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php