Skip to contentSkip to conversation

DMX6fire Consumer AC97 not used

PATCH Applied Alan Horstmann 2 participants 4 messages May 22, 2006 – May 23, 2006

lore
Share & tools
lore
#0 lore raw

Another little 'tidy-up':

Have always had the following log message with DMX6fire:

linux kernel: Consumer PCM code does not work well at the moment --jk linux kernel: ALSA ac97_codec.c:1671: AC'97 0:0 does not respond - RESET linux kernel: ALSA ac97_codec.c:1682: AC'97 0:0 access is not valid
[0xffffffff], removing mixer.
linux kernel: ice1712: cannot initialize ac97 for consumer, skipped

and thought the last 3 were due to the first. However, after comparing DMX6fire with STDSP24 card, it seems to me that the 6fire doesn't have an AC97 chip, nor anywhere to connect to one in the standard front box, and the W2K drivers from Terratec don't support it. It is remotely possible that other extension boxes may use it -but they do not have alsa support at present.

BUT the eeprom data has it enabled. As the value is checked at several places in the code, the attached patch changes the stored value for this and the previous 'Limit ADACs to 6' bits.

As a result, the log now shows no evidence of ice1712 driver at all, so I added 'init...done' as in the attached 'init-message' patch. It may be the wrong place, or not wanted at all, so I kept it separate from the AC97 patch. Hope it's OK in this case to attach both here.

BTW, re 'Consumer PCM code does not work well at the moment --jk', will it be fixed?

Alan

ice1712.c-disable-6fire-AC97.patch

Summary: Disable AC97 for DMX6fire

Consumer AC97 is not used by the Terratec DMX6fire, but eeprom bit indicates it is; change the stored value to disable failling consumer mode.

ice1712.c-init-message.patch

Adds init message to the ice1712 driver.

alsa-kernel/pci/ice1712/ice1712.c +5 -7
@@ -2398,13 +2398,11 @@
 	udelay(200);
 	outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
 	udelay(200);
-	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) {
-                /* Limit active ADCs and DACs to 6;  */
-                /* Note: DXR extension not supported */
-		pci_write_config_byte(ice->pci, 0x60, 0x2a);
-	} else {
-		pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
-	}
+	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable)
+		/*  Limit active ADCs and DACs to 6;  Note: DXR extensions are not currently supported */
+		/*  Also AC97 Consumer hardware is not provided in standard 6fire front box            */
+		ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a;  /*  Correct eeprom value  */
+	pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
 	pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]);
 	pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]);
 	pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]);
alsa-kernel/pci/ice1712/ice1712.c +1 -0
@@ -2394,7 +2394,6 @@
 
 static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice)
 {
+	printk("ice1712: Init...");
 	outb(ICE1712_RESET | ICE1712_NATIVE, ICEREG(ice, CONTROL));
 	udelay(200);

outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
@@ -2434,6 +2433,7 @@
snd_ice1712_write(ice, ICE1712_IREG_CONSUMER_POWERDOWN, 0);
}
snd_ice1712_set_pro_rate(ice, 48000, 1);
+ printk("done\n");

return 0;
}

#1 lore raw

At Mon, 22 May 2006 14:52:08 +0100,

Quoted 18 lines · Alan Horstmann

Another little 'tidy-up':

Have always had the following log message with DMX6fire:

linux kernel: Consumer PCM code does not work well at the moment --jk linux kernel: ALSA ac97_codec.c:1671: AC'97 0:0 does not respond - RESET linux kernel: ALSA ac97_codec.c:1682: AC'97 0:0 access is not valid
[0xffffffff], removing mixer.
linux kernel: ice1712: cannot initialize ac97 for consumer, skipped

and thought the last 3 were due to the first. However, after comparing DMX6fire with STDSP24 card, it seems to me that the 6fire doesn't have an AC97 chip, nor anywhere to connect to one in the standard front box, and the W2K drivers from Terratec don't support it. It is remotely possible that other extension boxes may use it -but they do not have alsa support at present.

Quoted 8 lines

BUT the eeprom data has it enabled. As the value is checked at several places in the code, the attached patch changes the stored value for this and the previous 'Limit ADACs to 6' bits.

As a result, the log now shows no evidence of ice1712 driver at all, so I added 'init...done' as in the attached 'init-message' patch. It may be the wrong place, or not wanted at all, so I kept it separate from the AC97 patch. Hope it's OK in this case to attach both here.

Please don't put such printk. We don't put any info print at probe unless any problem exists.

Otherwise the change looks OK to get merged, but please fold the comment within 80 columns.

Quoted 2 lines

BTW, re 'Consumer PCM code does not work well at the moment --jk', will it be fixed?

Only if we have enoguh time, enough data and enough intereset :)

Takashi

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw
Quoted 24 lines · you

At Mon, 22 May 2006 14:52:08 +0100,

Quoted 21 lines · Alan Horstmann

Another little 'tidy-up':

Have always had the following log message with DMX6fire:

linux kernel: Consumer PCM code does not work well at the moment --jk linux kernel: ALSA ac97_codec.c:1671: AC'97 0:0 does not respond - RESET linux kernel: ALSA ac97_codec.c:1682: AC'97 0:0 access is not valid
[0xffffffff], removing mixer.
linux kernel: ice1712: cannot initialize ac97 for consumer, skipped

and thought the last 3 were due to the first. However, after comparing DMX6fire with STDSP24 card, it seems to me that the 6fire doesn't have an AC97 chip, nor anywhere to connect to one in the standard front box, and the W2K drivers from Terratec don't support it. It is remotely possible that other extension boxes may use it -but they do not have alsa support at present.

BUT the eeprom data has it enabled. As the value is checked at several places in the code, the attached patch changes the stored value for this and the previous 'Limit ADACs to 6' bits.

Quoted 7 lines
Quoted 4 lines

As a result, the log now shows no evidence of ice1712 driver at all, so I added 'init...done' as in the attached 'init-message' patch. It may be the wrong place, or not wanted at all, so I kept it separate from the AC97 patch. Hope it's OK in this case to attach both here.

Please don't put such printk. We don't put any info print at probe unless any problem exists.

OK, it's your call on this. To me it is useful to log major system events to look back and see what was happening; there is plenty of much less useful messsages in the logs, including IP addresses, every root login, and every second that I don't have a CD in the drive! (need to fix that). The au8820 driver does a similar init message.

Quoted 2 lines

Otherwise the change looks OK to get merged, but please fold the comment within 80 columns.

Amended AC97 patch attached.

Alan

ice1712.c-disable-6fire-AC97-2.patch

Summary:  Disable AC97 for DMX6fire

Consumer AC97 is not used by the Terratec DMX6fire, but eeprom bit indicates it is; change the stored value to disable failing consumer mode.

alsa-kernel/pci/ice1712/ice1712.c +7 -7
@@ -2398,13 +2398,13 @@
 	udelay(200);
 	outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
 	udelay(200);
-	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) {
-                /* Limit active ADCs and DACs to 6;  */
-                /* Note: DXR extension not supported */
-		pci_write_config_byte(ice->pci, 0x60, 0x2a);
-	} else {
-		pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
-	}
+	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable)
+		/*  Set eeprom value to limit active ADCs and DACs to 6;
+		 *  Also disable AC97 as no hardware in standard 6fire card/box
+		 *  Note: DXR extensions are not currently supported
+		 */
+		ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a;
+	pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
 	pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]);
 	pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]);
 	pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]);
Applied
#3 lore raw

At Tue, 23 May 2006 10:45:35 +0100,

Quoted 32 lines · Alan Horstmann

[1 <text/plain; iso-8859-1 (quoted-printable)>]

Quoted 29 lines · you

At Mon, 22 May 2006 14:52:08 +0100,

Quoted 25 lines · Alan Horstmann

Another little 'tidy-up':

Have always had the following log message with DMX6fire:

linux kernel: Consumer PCM code does not work well at the moment --jk linux kernel: ALSA ac97_codec.c:1671: AC'97 0:0 does not respond - RESET linux kernel: ALSA ac97_codec.c:1682: AC'97 0:0 access is not valid
[0xffffffff], removing mixer.
linux kernel: ice1712: cannot initialize ac97 for consumer, skipped

and thought the last 3 were due to the first. However, after comparing DMX6fire with STDSP24 card, it seems to me that the 6fire doesn't have an AC97 chip, nor anywhere to connect to one in the standard front box, and the W2K drivers from Terratec don't support it. It is remotely possible that other extension boxes may use it -but they do not have alsa support at present.

BUT the eeprom data has it enabled. As the value is checked at several places in the code, the attached patch changes the stored value for this and the previous 'Limit ADACs to 6' bits.

As a result, the log now shows no evidence of ice1712 driver at all, so I added 'init...done' as in the attached 'init-message' patch. It may be the wrong place, or not wanted at all, so I kept it separate from the AC97 patch. Hope it's OK in this case to attach both here.

Quoted 8 lines
Quoted 2 lines

Please don't put such printk. We don't put any info print at probe unless any problem exists.

OK, it's your call on this. To me it is useful to log major system events to look back and see what was happening; there is plenty of much less useful messsages in the logs, including IP addresses, every root login, and every second that I don't have a CD in the drive! (need to fix that). The au8820 driver does a similar init message.

But no need for addition.

Quoted 4 lines
Quoted 2 lines

Otherwise the change looks OK to get merged, but please fold the comment within 80 columns.

Amended AC97 patch attached.

Applied. Thanks.

Takashi

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642