All of lore.kernel.org
 help / color / mirror / Atom feed
* Terratec DMX 6fire audio input
@ 2003-06-22 20:52 Eduard Hasenleithner
  2003-06-23 13:21 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Eduard Hasenleithner @ 2003-06-22 20:52 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

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.

[-- Attachment #2: adrv-0.9.4-6fire.patch --]
[-- Type: text/plain, Size: 1032 bytes --]

--- alsa/alsa-driver-0.9.4/sound/pci/ice1712/ews.c	2003-04-30 13:43:01.000000000 +0200
+++ alsa-driver-0.9.4/sound/pci/ice1712/ews.c	2003-06-22 13:13:55.000000000 +0200
@@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Terratec DMX 6fire audio input
  2003-06-22 20:52 Terratec DMX 6fire audio input Eduard Hasenleithner
@ 2003-06-23 13:21 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-06-23 13:21 UTC (permalink / raw)
  To: Eduard Hasenleithner; +Cc: alsa-devel

At 22 Jun 2003 22:52:34 +0200,
Eduard Hasenleithner wrote:
> 
> [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.
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-23 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-22 20:52 Terratec DMX 6fire audio input Eduard Hasenleithner
2003-06-23 13:21 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.