Skip to contentSkip to conversation

ice1712: Card ID problem

DISCUSSION [email protected] 3 participants 6 messages Sep 8, 2004 – Sep 24, 2004

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I'm tracking down the problem that I reported on the alsa-user
mailing list below. I started by trying to answer the question "Why does envy24control think I have 8 outputs, 0 inputs, and 2 spdifs?"

My very first thought: maybe the driver is mis-identifing the
card. As a debug measure, I inserted the following line early on in the execution:
fprintf (stderr, "DEBUG: card_eeprom.subvendor = %x\n", card_eeprom.subvendor);

When I run envy24control, this prints:
DEBUG: card_eeprom.subvendor = 0x121433a0

This subvendor ID doesn't exist in envy24control.h. So I changed the ICE1712_SUBDEVICE_DELTA44 to match the above ID. Nothing has changed. I tried also forcing the ID to the original ID in envy24control.h, to no effect.

Summary: the wrong subdevice ID doesn't seem to be causing the problem.

Some more digging brings me to mixer.c - the place where the code establishes which channels are active. In particular, I'm looking around line 200:

for (i = 0; i < input_channels; i++) {
                snd_ctl_elem_value_set_numid(val, 0);
                snd_ctl_elem_value_set_index(val, i);
                if (snd_ctl_elem_read(ctl, val) < 0)
                        continue;

                stream_is_active[i + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS] = 1;
                nb_active_channels++;
        }

Since input_channels ends up being zero, it must be the case that snd_ctl_elem_read(ctl, val) is returning less than zero every time. The docs are kind of skimpy on why this might happen - anyone have any tips?

Thanks a lot,
Ross

PS - Brian, could you apply the patch that is at the very bottom of this email and run envy24control? I'd like to see your output to see if you get the same kinds of messages as I do.

----- Forwarded message from [email protected] -----

From: [email protected]
To: [email protected]
X-Spam-Score: 0.4 (/)
Subject: [Alsa-user] ICE1712 broken with 2.4.27, alsa-1.0.6a
X-Original-Date: Thu, 26 Aug 2004 00:37:03 -0400
Date: Thu, 26 Aug 2004 00:37:03 -0400

Hello,

I'm trying to get my Delta44 ICE1712 card working again, but
it's not working correctly. With all ALSA and snd modules unloaded, I run as root:

# modprobe snd-ice1712
PCI: Found IRQ 10 for device 00:0b.0

Now, if I run envy24control:

$ envy24control
using    --- input_channels: 0
         --- output_channels: 0
         --- pcm_output_channels: 8
         --- spdif in/out channels: 2

Eight outputs and no inputs!! Yikes! If I play sound, the meters go, but no sounds come out. Moreover, the "Analog Volume" tab is missing and I don't know another way of setting analog mixer volume.

System details:
Linux 2.4.27 with lowlatency, ALSA 1.0.6a, tried with and without the
"noapic acpi=off" boot parameters.
ASUS KT400 motherboard (A7V8X-X)
M-Audio Delta 44
Slackware 9.1 (but with lots of audio software installed aftermarket ::-)

Some help would be much appreciated!!

Signature · 81 lines
Ross Vandegrift
[email protected]

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

----- End forwarded message -----


diff -u envy24control/envy24control.c envy24control.debugging/envy24control.c
--- envy24control/envy24control.c	2004-05-18 07:34:07.000000000 -0400
+++ envy24control.debugging/envy24control.c	2004-09-08 15:57:17.000000000 -0400
@@ -2076,6 +2076,12 @@
 		}
 	}
 
+	/* Print some eeprom information */
+	fprintf (stderr, "DEBUG: card_eeprom.subvendor = %x\n", card_eeprom.subvendor);
+	card_eeprom.subvendor = 0x121433d6;
+	fprintf (stderr, "DEBUG: adcIDs: %x, %x, %x, %x\n", card_eeprom.adcID[0], card_eeprom.adcID[1], card_eeprom.adcID[2], card_eeprom.adcID[3]);
+	fprintf (stderr, "DEBUG: dacIDs: %x, %x, %x, %x\n", card_eeprom.dacID[0], card_eeprom.dacID[1], card_eeprom.dacID[2], card_eeprom.dacID[3]);
+
 	/* Initialize code */
 	level_meters_init();
 	mixer_init();
diff -u envy24control/mixer.c envy24control.debugging/mixer.c
--- envy24control/mixer.c	2004-03-05 04:10:01.000000000 -0500
+++ envy24control.debugging/mixer.c	2004-09-08 16:15:39.000000000 -0400
@@ -181,6 +181,7 @@
 	memset (stream_is_active, 0, (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + MAX_SPDIF_CHANNELS) * sizeof(int));
 	snd_ctl_elem_value_set_name(val, MULTI_PLAYBACK_SWITCH);
 	nb_active_channels = 0;
+	fprintf (stderr, "mixer.c: pcm_output_channels = %d\n", pcm_output_channels);
 	for (i = 0; i < pcm_output_channels; i++) {
 		snd_ctl_elem_value_set_numid(val, 0);
 		snd_ctl_elem_value_set_index(val, i);
@@ -190,6 +191,7 @@
 		stream_is_active[i] = 1;
 		nb_active_channels++;
 	}
+	fprintf (stderr, "mixer.c: nb_active_channels = %d\n", nb_active_channels);
 	pcm_output_channels = nb_active_channels;
 	for (i = MAX_PCM_OUTPUT_CHANNELS; i < MAX_PCM_OUTPUT_CHANNELS + spdif_channels; i++) {
 		snd_ctl_elem_value_set_numid(val, 0);
@@ -200,6 +202,7 @@
 	}
 	snd_ctl_elem_value_set_name(val, HW_MULTI_CAPTURE_SWITCH);
 	nb_active_channels = 0;
+	fprintf (stderr, "mixer.c: input_channels = %d\n", input_channels);
 	for (i = 0; i < input_channels; i++) {
 		snd_ctl_elem_value_set_numid(val, 0);
 		snd_ctl_elem_value_set_index(val, i);
@@ -209,6 +212,7 @@
 		stream_is_active[i + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS] = 1;
 		nb_active_channels++;
 	}
+	fprintf (stderr, "mixer.c: nb_active_channels = %d\n", nb_active_channels);
 	input_channels = nb_active_channels;
 	snd_ctl_elem_value_set_name(val, IEC958_MULTI_CAPTURE_SWITCH);
 	for (i = 0; i < spdif_channels; i++) {


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
#1 lore raw

Okay, I applied Russ's patch (thanks) after the patches that Dirk posted. Here is the output when running envy24control:

DEBUG: card_eeprom.subvendor = 3b152b11
DEBUG: adcIDs: 2, 2, 2, 0
DEBUG: dacIDs: 1, 1, 1, 2
mixer.c: pcm_output_channels = 8
mixer.c: nb_active_channels = 8
mixer.c: input_channels = 8
mixer.c: nb_active_channels = 0
using --- input_channels: 0

         --- output_channels: 0
         --- pcm_output_channels: 8
         --- spdif in/out channels: 2

Looks like my vendor ID is a) missing something (where is the 0x part?) and b) also not in the envy24control.h file.

I am a bit over my head here...should I try to cob this vendor id in a similar way Dirk posted?

Thanks!
Brian

Quoted 175 lines · On Wed, 08 Sep 2004 [email protected] wrote:

Hello everyone,

I'm tracking down the problem that I reported on the alsa-user
mailing list below. I started by trying to answer the question "Why does envy24control think I have 8 outputs, 0 inputs, and 2 spdifs?"

My very first thought: maybe the driver is mis-identifing the
card. As a debug measure, I inserted the following line early on in the execution:
fprintf (stderr, "DEBUG: card_eeprom.subvendor = %x\n", card_eeprom.subvendor);

When I run envy24control, this prints:
DEBUG: card_eeprom.subvendor = 0x121433a0

This subvendor ID doesn't exist in envy24control.h. So I changed the ICE1712_SUBDEVICE_DELTA44 to match the above ID. Nothing has changed. I tried also forcing the ID to the original ID in envy24control.h, to no effect.

Summary: the wrong subdevice ID doesn't seem to be causing the problem.

Some more digging brings me to mixer.c - the place where the code establishes which channels are active. In particular, I'm looking around line 200:

for (i = 0; i < input_channels; i++) {
                snd_ctl_elem_value_set_numid(val, 0);
                snd_ctl_elem_value_set_index(val, i);
                if (snd_ctl_elem_read(ctl, val) < 0)
                        continue;

                stream_is_active[i + MAX_PCM_OUTPUT_CHANNELS + 
MAX_SPDIF_CHANNELS] = 1;
                nb_active_channels++;
        }

Since input_channels ends up being zero, it must be the case that snd_ctl_elem_read(ctl, val) is returning less than zero every time. The docs are kind of skimpy on why this might happen - anyone have any tips?

Thanks a lot,
Ross

PS - Brian, could you apply the patch that is at the very bottom of this email and run envy24control? I'd like to see your output to see if you get the same kinds of messages as I do.

----- Forwarded message from [email protected] -----

From: [email protected]
To: [email protected]
X-Spam-Score: 0.4 (/)
Subject: [Alsa-user] ICE1712 broken with 2.4.27, alsa-1.0.6a
X-Original-Date: Thu, 26 Aug 2004 00:37:03 -0400
Date: Thu, 26 Aug 2004 00:37:03 -0400

Hello,

I'm trying to get my Delta44 ICE1712 card working again, but
it's not working correctly. With all ALSA and snd modules unloaded, I run as root:

# modprobe snd-ice1712
PCI: Found IRQ 10 for device 00:0b.0

Now, if I run envy24control:

$ envy24control
using    --- input_channels: 0
         --- output_channels: 0
         --- pcm_output_channels: 8
         --- spdif in/out channels: 2

Eight outputs and no inputs!! Yikes! If I play sound, the meters go, but no sounds come out. Moreover, the "Analog Volume" tab is missing and I don't know another way of setting analog mixer volume.

System details:
Linux 2.4.27 with lowlatency, ALSA 1.0.6a, tried with and without the
"noapic acpi=off" boot parameters.
ASUS KT400 motherboard (A7V8X-X)
M-Audio Delta 44
Slackware 9.1 (but with lots of audio software installed aftermarket ::-)

Some help would be much appreciated!!

--
Ross Vandegrift
[email protected]

"The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell."
--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37

-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

----- End forwarded message -----

diff -u envy24control/envy24control.c envy24control.debugging/envy24control.c

envy24control.c +0 -0

15:57:17.000000000 -0400

envy24control.c +6 -0
@@ -2076,6 +2076,12 @@
 		}
 	}
 
+	/* Print some eeprom information */
+	fprintf (stderr, "DEBUG: card_eeprom.subvendor = %x\n", 
 card_eeprom.subvendor);
+	card_eeprom.subvendor = 0x121433d6;
+	fprintf (stderr, "DEBUG: adcIDs: %x, %x, %x, %x\n", 
 card_eeprom.adcID[0], card_eeprom.adcID[1], card_eeprom.adcID[2], card_eeprom.adcID[3]);
+	fprintf (stderr, "DEBUG: dacIDs: %x, %x, %x, %x\n", 
 card_eeprom.dacID[0], card_eeprom.dacID[1], card_eeprom.dacID[2], card_eeprom.dacID[3]);
+
envy24control.c +0 -0
 	/* Initialize code */
 	level_meters_init();
 	mixer_init();

diff -u envy24control/mixer.c envy24control.debugging/mixer.c

mixer.c +1 -0
@@ -181,6 +181,7 @@
 	memset (stream_is_active, 0, (MAX_PCM_OUTPUT_CHANNELS + 
 MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + MAX_SPDIF_CHANNELS) * sizeof(int));
 	snd_ctl_elem_value_set_name(val, MULTI_PLAYBACK_SWITCH);
 	nb_active_channels = 0;
+	fprintf (stderr, "mixer.c: pcm_output_channels = %d\n", 
 pcm_output_channels);
 	for (i = 0; i < pcm_output_channels; i++) {
mixer.c +1 -0
 		snd_ctl_elem_value_set_numid(val, 0);
 		snd_ctl_elem_value_set_index(val, i);
@@ -190,6 +191,7 @@
 		stream_is_active[i] = 1;
 		nb_active_channels++;
 	}
+	fprintf (stderr, "mixer.c: nb_active_channels = %d\n", nb_active_channels);
 	pcm_output_channels = nb_active_channels;
 	for (i = MAX_PCM_OUTPUT_CHANNELS; i < MAX_PCM_OUTPUT_CHANNELS + 
 spdif_channels; i++) {
mixer.c +2 -1
 		snd_ctl_elem_value_set_numid(val, 0);
@@ -200,6 +202,7 @@
 	}
 	snd_ctl_elem_value_set_name(val, HW_MULTI_CAPTURE_SWITCH);
 	nb_active_channels = 0;
+	fprintf (stderr, "mixer.c: input_channels = %d\n", input_channels);
 	for (i = 0; i < input_channels; i++) {
 		snd_ctl_elem_value_set_numid(val, 0);
 		snd_ctl_elem_value_set_index(val, i);
@@ -209,6 +212,7 @@
 		stream_is_active[i + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS] = 1;
 		nb_active_channels++;
 	}
+	fprintf (stderr, "mixer.c: nb_active_channels = %d\n", nb_active_channels);
 	input_channels = nb_active_channels;
 	snd_ctl_elem_value_set_name(val, IEC958_MULTI_CAPTURE_SWITCH);
 	for (i = 0; i < spdif_channels; i++) {
 
 
-------------------------------------------------------
Quoted 8 lines

This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Alsa-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

--

Brian Kaney - [email protected]
Vermonster LLC. - http://www.vermonster.com
312 Stuart St. 2nd Fl. Boston, MA 02116 US
Direct: +1 617-960-3671 x3554
Mobile: +1 617-312-0826

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

#2 lore raw

Actually the ID 0x3b152b11 does exist for my card, EWS88D.

So I guess there is some other reason I get neither analog *nor* digital output.

Can anyone recommend a card that works "out of the box" with similar features (i.e. being able to stream in, process/filter and output sound, fully digital and analog in/out's)? I really need to get this application to work.

Thanks!
Brian

Quoted 18 lines · On Thu, 23 Sep 2004 Brian Kaney <[email protected]> wrote:

Okay, I applied Russ's patch (thanks) after the patches that Dirk posted. Here
is the output when running envy24control:

DEBUG: card_eeprom.subvendor = 3b152b11
DEBUG: adcIDs: 2, 2, 2, 0
DEBUG: dacIDs: 1, 1, 1, 2
mixer.c: pcm_output_channels = 8
mixer.c: nb_active_channels = 8
mixer.c: input_channels = 8
mixer.c: nb_active_channels = 0
using --- input_channels: 0

          --- output_channels: 0
          --- pcm_output_channels: 8
          --- spdif in/out channels: 2
Quoted 9 lines

Looks like my vendor ID is a) missing something (where is the 0x part?) and b) also not in the envy24control.h file.

I am a bit over my head here...should I try to cob this vendor id in a similar way Dirk posted?

Thanks!
Brian

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

#3 lore raw
Quoted 5 lines · Brian Kaney

Can anyone recommend a card that works "out of the box" with similar features
(i.e. being able to stream in, process/filter and output sound, fully digital
and analog in/out's)? I really need to get this application to work.

LOL, Delta66, so long as your card doesn't freak out and change it's subvendor ID....

I'm really only half joking - I'm the only person I've ever heard of who had this problem, and it's totally mitigated with Dirk's patch. The Delta66 is the same as the Delta44 with two channels of digital SPDIF I/O. I think lots of people on the alsa lists and LAU have liked them a lot.

Signature · 15 lines
Ross Vandegrift
[email protected]

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
#4 lore raw
In reply to Brian Kaney
Quoted 8 lines · Brian Kaney

DEBUG: card_eeprom.subvendor = 3b152b11
DEBUG: adcIDs: 2, 2, 2, 0
DEBUG: dacIDs: 1, 1, 1, 2 mixer.c: pcm_output_channels = 8 mixer.c: nb_active_channels = 8 mixer.c: input_channels = 8 mixer.c: nb_active_channels = 0
using --- input_channels: 0

Quoted 6 lines
         --- output_channels: 0
         --- pcm_output_channels: 8
         --- spdif in/out channels: 2

Looks like my vendor ID is a) missing something (where is the 0x part?) and

The 0x part indicates that the number about to follow is in hexadecimal notation. I'm not sure why it didn't print.

Quoted 1 line

b) also not in the envy24control.h file.

As Dirk told me, the real problem is that it's not in the kernel drivers. These subvendor ID's need to be added to the driver I guess, but it's very strange that they're different from the standard. Especially since mine used to work normally!

Quoted 3 lines

I am a bit over my head here...should I try to cob this vendor id in a similar
way Dirk posted?

Yea - in your alsa-driver tree (or Linux kernel, if you use 2.6), find sound/pci/ice1712/delta.h. Change:

#define ICE1712_SUBDEVICE_DELTA44_2 0x121433a0

to:

#define ICE1712_SUBDEVICE_DELTA44_2 0x3b152b11

And you should be good to go after a recompile.

We really do, however, need a long term solution to this problem. Manually adding any IDs that come up is going to get old fast...

Signature · 15 lines
Ross Vandegrift
[email protected]

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
#5 lore raw

At Thu, 23 Sep 2004 18:40:42 -0400,

Quoted 10 lines · [email protected] wrote:
Quoted 4 lines

I am a bit over my head here...should I try to cob this vendor id in a similar
way Dirk posted?

Yea - in your alsa-driver tree (or Linux kernel, if you use 2.6), find sound/pci/ice1712/delta.h. Change:

#define ICE1712_SUBDEVICE_DELTA44_2 0x121433a0

Quoted 8 lines

to:

#define ICE1712_SUBDEVICE_DELTA44_2 0x3b152b11

And you should be good to go after a recompile.

We really do, however, need a long term solution to this problem. Manually adding any IDs that come up is going to get old fast...

You can pass model module option to force a certain board model.

	# modprobe snd-ice1712 model=delta44

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php