Skip to contentSkip to conversation

EZ8 ADAT I/O card (ICE1712 chipset)

DISCUSSION Doug 2 participants 9 messages Jan 30, 2004 – Apr 14, 2004

lore
Share & tools
lore

Doug

author
#0 lore raw

I finally decided to start working on ALSA support for my EZ8 card (www.event1.com) and man, did I get lucky. I am brand new to device driver development altogether, so my main concern here is learning how everything works in addition to just getting the EZ8 card to work.

Out of the box, the snd-ice1712 driver recognized it as a Hoontech DSP24 card (I also have a Delta 1010LT installed):

cat /proc/asound/cards
0 [M1010LT ]: ICE1712 - M Audio Delta 1010LT

                     M Audio Delta 1010LT at 0x9000, irq 11
1 [DSP24          ]: ICE1712 - Hoontech SoundTrack Audio DSP24
                     Hoontech SoundTrack Audio DSP24 at 0xa000, irq 11

With this configuration I am able to send PCM out to all 8 channels but no input. I refer to my ldd2 book, "Writing an ALSA Driver" document, and ice1712 src to learn how the cards are identified. I found that the
subvendor/subdevice ID @ 0x2c-0x2f are the same between the EZ8 and
the Hoontech DSP24 (0x12141217). As an experiment I made the following change to line 32 of hoontech.h:

#define ICE1712_SUBDEVICE_STDSP24 0x12141216

Basically just changing the ID to a bogus number. As I expected it now was identified as a generic device:

cat /proc/asound/cards
0 [M1010LT ]: ICE1712 - M Audio Delta 1010LT

                     M Audio Delta 1010LT at 0x9000, irq 11
1 [ICE1712        ]: ICE1712 - ICEnsemble ICE1712
                     ICEnsemble ICE1712 at 0xa000, irq 11

And bonus! Everything now works, all 8 channels work in and out and in full duplex. So far I have tested 48Khs and 44.1Khz sending 8 channels up and down at the same time w/ ardour, and envy24control displays all of the levels accurately. It appears to be fully functional. I of course will be testing it out much more.

Questions:

Is this common for PCI device subid's to overlap? If so, is there a preferred method of further identification? I was looking at the configuration space for something else that could be used to identify a device, like maybe the class code area at 0x09-0x0b?

I see some MODULE_PARAM macros in ice1712.c, but I am still unclear on their exact usage. Is there already provisions in the driver to force generic via a module parameter?

I would like to continue further with this to add the EZ8 card to the list of 'supported' devices for this driver, again mainly for my interest in learning about device driver development and linux audio. I contacted Event about releasing documentation some time ago before I realized how easy this was going to be, to no avail. I guess my question to the ice1712 author is, how is this done? May I add code that finds a way to uniquely identifies the EZ8 card and registers it appropriately? If I succeed and it meets your aproval, would it be added to your driver source?

Signature · 10 lines
http://nostar.isa-geek.com/




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
author
#1 lore raw

Here is what I have done to the ice1712.c file in order to add support for my EZ8 card. It's a temporary hack (emphesis on 'hack') until I add code to reliably identify the ez8 from the hoontech (both cards share the same subvendorid).

/* EZ8 Hack */
int ez8=0;
MODULE_PARM(ez8, "i");

I added this at the end of all ofthe MODULE_PARM() definitions.

On line 2505, I made this change:

for (tbl = card_tables+(ez8 ? 1 : 0); *tbl; tbl++) { /* EZ8 Hack */

Just a quick and dirty way to skip over the hoontech card_table entry so that my EZ8 is recognized as a generic device, while still correctly detecting my Delta 1010LT card when ez8=1 is added as argument to the snd-ice1712 module. Module functions normally if ez8 is not added to command line (or is set to 0). This would not work if an ez8 and hoontech were used together.

This, of course, is only a temporary fix for my own use, while I work on code to correctly differentiate between the ez8 and the hoontech card. In addition, there are a few EZ8 specific features that don't seem to be implemented with the generic driver. Since ADAT is fully functional, though, I now will spend much more time using the card/driver (with ardour/jack) and less finishing support. I don't think there will be any objection here, since I think I am the only linux using EZ8/EZBus owner on the planet :)

Does anyone have the ICE1712 chip documentation? How were the drivers for the other ice1712 based cards written? Were the manufacturers contacted and data released under some sort of non-disclosure agreement?
I dont get why documentation for a chip is kept so secretive, I mean
rtl8xxx ethernet tranceiver chip docs, for example, are all over the place, that seems like the same thing to me. I would really like to have the documetation so that I can study the ice1712 driver line by line and understand what exactly is being done on-board the chip. I just like that kind of stuff, I know there is enough info in the existing source for the other cards to figure out how to implement my needs.

Signature · 9 lines
http://nostar.isa-geek.com/



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
#2 lore raw

At Thu, 05 Feb 2004 03:50:30 -0500,

Quoted 14 lines · Doug

Here is what I have done to the ice1712.c file in order to add support for my EZ8 card. It's a temporary hack (emphesis on 'hack') until I add code to reliably identify the ez8 from the hoontech (both cards share the same subvendorid).

/* EZ8 Hack */
int ez8=0;
MODULE_PARM(ez8, "i");

I added this at the end of all ofthe MODULE_PARM() definitions.

On line 2505, I made this change:

Quoted 8 lines

for (tbl = card_tables+(ez8 ? 1 : 0); *tbl; tbl++) { /* EZ8 Hack */

Just a quick and dirty way to skip over the hoontech card_table entry so that my EZ8 is recognized as a generic device, while still correctly detecting my Delta 1010LT card when ez8=1 is added as argument to the snd-ice1712 module. Module functions normally if ez8 is not added to command line (or is set to 0). This would not work if an ez8 and hoontech were used together.

i'd suggest to check ez8 option in hoontech.c rather than in the ice1712.c routine.

Quoted 10 lines

This, of course, is only a temporary fix for my own use, while I work on code to correctly differentiate between the ez8 and the hoontech card. In addition, there are a few EZ8 specific features that don't seem to be implemented with the generic driver. Since ADAT is fully functional, though, I now will spend much more time using the card/driver (with ardour/jack) and less finishing support. I don't think there will be any objection here, since I think I am the only linux using EZ8/EZBus owner on the planet :)

Does anyone have the ICE1712 chip documentation?

ice1712 chip spec is open. you can find it on ALSA's ftp. maybe mirrored on somewhere else, too.

but usually it's not enough for writing the complete driver, since the choice and connection of codec chips depends on the board.

Quoted 2 lines

How were the drivers
for the other ice1712 based cards written?

in most cases, we have contact with the hardware vendor, and get some information about the hardware.

Quoted 2 lines

Were the manufacturers
contacted and data released under some sort of non-disclosure agreement?

depends.

Takashi

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

author
#3 lore raw
Quoted 11 lines · Takashi Iwai

At Thu, 05 Feb 2004 03:50:30 -0500,

Quoted 8 lines · Doug

Here is what I have done to the ice1712.c file in order to add support for my EZ8 card. It's a temporary hack (emphesis on 'hack') until I add code to reliably identify the ez8 from the hoontech (both cards share the same subvendorid).

/* EZ8 Hack */
int ez8=0;
MODULE_PARM(ez8, "i");

I added this at the end of all ofthe MODULE_PARM() definitions.

Quoted 8 lines
Quoted 4 lines

On line 2505, I made this change:

for (tbl = card_tables+(ez8 ? 1 : 0); *tbl; tbl++) { /* EZ8 Hack */

i'd suggest to check ez8 option in hoontech.c rather than in the ice1712.c routine.

Good advice, but after I reealized the chip docs were right there on the alsa ftp the whole time, I went ahead and decided to do it right. I put ice1712.c back to its original state, adding a new struct snd_ice1712_card_info called snd_ice1712_event_cards, and MODULE_DEVICES, etc. I created an event.c (and .h) and will add support following suit with hoontech.c and friends. Now, armed with the chip specs, I will find a way to uniquely identify the ez8 card, and tailor the driver to its features. I'll post the results when finished (or stuck).

Thanks for the info!

Signature · 9 lines
http://nostar.isa-geek.com/



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
#4 lore raw
In reply to Takashi Iwai

Here is a patch for EZ8 support with the snd-ice1712 driver. I kept everything contained within hoontech.c, as you suggested. I never bothered to go farther trying to uniquely identify between the 2 cards since, this has been working fine for me. Also, I have contacted both Hoontech and Event, informing them of the conflict by not creating their own uniqe subvendor id. Hopefully one or both will release a driver update that will give either one a unique id. I never made a patch before, but it looks fine to me. Please let me know otherwise.

Just load the driver with the ez8=1 option to enable EZ8 support.

Quoted 43 lines · Takashi Iwai

At Thu, 05 Feb 2004 03:50:30 -0500,

Quoted 6 lines · Doug

Here is what I have done to the ice1712.c file in order to add support for my EZ8 card. It's a temporary hack (emphesis on 'hack') until I add code to reliably identify the ez8 from the hoontech (both cards share the same subvendorid).

/* EZ8 Hack */
int ez8=0;
MODULE_PARM(ez8, "i");

Quoted 7 lines

I added this at the end of all ofthe MODULE_PARM() definitions.

On line 2505, I made this change:

for (tbl = card_tables+(ez8 ? 1 : 0); *tbl; tbl++) { /* EZ8 Hack */

Just a quick and dirty way to skip over the hoontech card_table entry so that my EZ8 is recognized as a generic device, while still correctly detecting my Delta 1010LT card when ez8=1 is added as argument to the snd-ice1712 module. Module functions normally if ez8 is not added to command line (or is set to 0). This would not work if an ez8 and hoontech were used together.

i'd suggest to check ez8 option in hoontech.c rather than in the ice1712.c routine.

Quoted 3 lines

This, of course, is only a temporary fix for my own use, while I work on code to correctly differentiate between the ez8 and the hoontech card. In addition, there are a few EZ8 specific features that don't seem to be implemented with the generic driver. Since ADAT is fully functional, though, I now will spend much more time using the card/driver (with ardour/jack) and less finishing support. I don't think there will be any objection here, since I think I am the only linux using EZ8/EZBus owner on the planet :)

Does anyone have the ICE1712 chip documentation?

ice1712 chip spec is open. you can find it on ALSA's ftp. maybe mirrored on somewhere else, too.

but usually it's not enough for writing the complete driver, since the choice and connection of codec chips depends on the board.

Quoted 2 lines

How were the drivers
for the other ice1712 based cards written?

in most cases, we have contact with the hardware vendor, and get some information about the hardware.

Quoted 8 lines
Quoted 1 line

Were the manufacturers contacted and data released under some sort of non-disclosure agreement?

depends.

Takashi

--
http://nostar.isa-geek.com/

Index: alsa-kernel/pci/ice1712/hoontech.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/hoontech.c,v retrieving revision 1.3
diff -c -r1.3 hoontech.c
*** alsa-kernel/pci/ice1712/hoontech.c 5 Mar 2004 09:08:39 -0000 1.3
--- alsa-kernel/pci/ice1712/hoontech.c 1 Apr 2004 03:31:52 -0000
***************
*** 32,37 ****
--- 32,40 ----
#include "ice1712.h"
#include "hoontech.h"

+ /* EZ8 Hack: pass ez8=1 for EZ8 card */
+ int ez8=0;
+ MODULE_PARM(ez8, "i");

static void __devinit snd_ice1712_stdsp24_gpio_write(ice1712_t *ice, unsigned char byte) {
***************
*** 151,156 ****
--- 154,173 ----
static int __devinit snd_ice1712_hoontech_init(ice1712_t *ice)

  {
        int box, chn;

+
+ /* EZ8 Hack: Change shortname and subvendor id, Recall functions called in
+ * snd_ice1712_chip_init when it still thinks it is a Hoontech DSP24 card.
+ */
+ if (ez8) {

+               strcpy(ice->card->shortname, "Event Electronics EZ8");
+               ice->eeprom.subvendor = 0;
+               ice->gpio.write_mask = ice->eeprom.gpiomask;
+               ice->gpio.direction = ice->eeprom.gpiodir;
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask);
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir);
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate);
+               return 0;

+ }

        ice->num_total_dacs = 8;
        ice->num_total_adcs = 8;

Index: alsa-kernel/pci/ice1712/ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v retrieving revision 1.47
diff -c -r1.47 ice1712.c
*** alsa-kernel/pci/ice1712/ice1712.c 26 Mar 2004 12:25:51 -0000 1.47
--- alsa-kernel/pci/ice1712/ice1712.c 1 Apr 2004 03:31:55 -0000
***************
*** 41,46 ****
--- 41,49 ----
* 2003.02.20 Taksahi Iwai <[email protected]>
* Split vt1724 part to an independent driver.
* The GPIO is accessed through the callback functions now.

+  *
+  * 2004.03.31 Doug McLain <[email protected]>
+  *    Added support for Event Electronics EZ8 card to hoontech.c.

*/

#5 lore raw

Whats the word on this patch? Does something need to change? Is it ok as is?

Quoted 128 lines · Doug McLain

Here is a patch for EZ8 support with the snd-ice1712 driver. I kept everything contained within hoontech.c, as you suggested. I never bothered to go farther trying to uniquely identify between the 2 cards since, this has been working fine for me. Also, I have contacted both Hoontech and Event, informing them of the conflict by not creating their own uniqe subvendor id. Hopefully one or both will release a driver update that will give either one a unique id. I never made a patch before, but it looks fine to me. Please let me know otherwise.

Just load the driver with the ez8=1 option to enable EZ8 support.

Quoted 53 lines · Takashi Iwai

At Thu, 05 Feb 2004 03:50:30 -0500,

Quoted 6 lines · Doug

Here is what I have done to the ice1712.c file in order to add support for my EZ8 card. It's a temporary hack (emphesis on 'hack') until I add code to reliably identify the ez8 from the hoontech (both cards share the same subvendorid).

/* EZ8 Hack */
int ez8=0;
MODULE_PARM(ez8, "i");

Quoted 7 lines

I added this at the end of all ofthe MODULE_PARM() definitions.

On line 2505, I made this change:

for (tbl = card_tables+(ez8 ? 1 : 0); *tbl; tbl++) { /* EZ8 Hack */

Just a quick and dirty way to skip over the hoontech card_table entry so that my EZ8 is recognized as a generic device, while still correctly detecting my Delta 1010LT card when ez8=1 is added as argument to the snd-ice1712 module. Module functions normally if ez8 is not added to command line (or is set to 0). This would not work if an ez8 and hoontech were used together.

i'd suggest to check ez8 option in hoontech.c rather than in the ice1712.c routine.

Quoted 3 lines

This, of course, is only a temporary fix for my own use, while I work on code to correctly differentiate between the ez8 and the hoontech card. In addition, there are a few EZ8 specific features that don't seem to be implemented with the generic driver. Since ADAT is fully functional, though, I now will spend much more time using the card/driver (with ardour/jack) and less finishing support. I don't think there will be any objection here, since I think I am the only linux using EZ8/EZBus owner on the planet :)

Does anyone have the ICE1712 chip documentation?

ice1712 chip spec is open. you can find it on ALSA's ftp. maybe mirrored on somewhere else, too.
but usually it's not enough for writing the complete driver, since the choice and connection of codec chips depends on the board.

Quoted 1 line

How were the drivers for the other ice1712 based cards written?

in most cases, we have contact with the hardware vendor, and get some information about the hardware.

Quoted 1 line

Were the manufacturers contacted and data released under some sort of non-disclosure agreement?

depends.

Takashi

Signature · 30 lines
http://nostar.isa-geek.com/


------------------------------------------------------------------------

Index: alsa-kernel/pci/ice1712/hoontech.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/hoontech.c,v
retrieving revision 1.3
diff -c -r1.3 hoontech.c
*** alsa-kernel/pci/ice1712/hoontech.c  5 Mar 2004 09:08:39 -0000       1.3
--- alsa-kernel/pci/ice1712/hoontech.c  1 Apr 2004 03:31:52 -0000
***************
*** 32,37 ****
--- 32,40 ----
  #include "ice1712.h"
  #include "hoontech.h"

+ /* EZ8 Hack:  pass ez8=1 for EZ8 card */
+ int ez8=0;
+ MODULE_PARM(ez8, "i");

  static void __devinit snd_ice1712_stdsp24_gpio_write(ice1712_t *ice, unsigned char byte)
  {
***************
*** 151,156 ****
--- 154,173 ----
  static int __devinit snd_ice1712_hoontech_init(ice1712_t *ice)
  {
        int box, chn;
(quoted diff) +14 -0
+
+       /* EZ8 Hack: Change shortname and subvendor id, Recall functions called in
+        * snd_ice1712_chip_init when it still thinks it is a Hoontech DSP24 card.
+        */
+       if (ez8) {
+               strcpy(ice->card->shortname, "Event Electronics EZ8");
+               ice->eeprom.subvendor = 0;
+               ice->gpio.write_mask = ice->eeprom.gpiomask;
+               ice->gpio.direction = ice->eeprom.gpiodir;
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask);
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir);
+               snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate);
+               return 0;
+       }
 
        ice->num_total_dacs = 8;
        ice->num_total_adcs = 8;

Index: alsa-kernel/pci/ice1712/ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v retrieving revision 1.47
diff -c -r1.47 ice1712.c
*** alsa-kernel/pci/ice1712/ice1712.c 26 Mar 2004 12:25:51 -0000 1.47
--- alsa-kernel/pci/ice1712/ice1712.c 1 Apr 2004 03:31:55 -0000
***************
*** 41,46 ****
--- 41,49 ----
* 2003.02.20 Taksahi Iwai <[email protected]>
* Split vt1724 part to an independent driver.
* The GPIO is accessed through the callback functions now.

(quoted diff) +3 -0
+  *
+  * 2004.03.31 Doug McLain <[email protected]>
+  *    Added support for Event Electronics EZ8 card to hoontech.c.
   */
Signature · 9 lines
http://nostar.isa-geek.com/



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
#6 lore raw

Doug,

At Fri, 09 Apr 2004 13:59:58 -0400,

Quoted 3 lines · Doug McLain

Whats the word on this patch? Does something need to change? Is it ok as is?

sorry i've been too busy for other works for these weeks. i'll check your patch now.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#7 lore raw

At Tue, 13 Apr 2004 12:01:30 +0200,

Quoted 11 lines · I wrote:

Doug,

At Fri, 09 Apr 2004 13:59:58 -0400,

Quoted 3 lines · Doug McLain

Whats the word on this patch? Does something need to change? Is it ok as is?

sorry i've been too busy for other works for these weeks. i'll check your patch now.

now it's applied to cvs with a slight modification, to make ez8 option as an array (possibly you can connect multiple ice1712 boards).

thanks for the patch!

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#8 lore raw

Groovy... I have a second EZ8 card sitting unused in a PC at my buddy's house. If he ever takes it out of the PC and brings it here, like he has been promising for weeks, I'll experiment with multiple cards. I'm also looking forward to connecting 2 PC's together via the 2 EZ8 cards to digitally transfer some cubase 8-track projects to ardour.

Doug

Quoted 23 lines · Takashi Iwai

At Tue, 13 Apr 2004 12:01:30 +0200,

Quoted 9 lines · I wrote:

Doug,

At Fri, 09 Apr 2004 13:59:58 -0400,

Quoted 1 line · Doug McLain

Whats the word on this patch? Does something need to change? Is it ok as is?

sorry i've been too busy for other works for these weeks. i'll check your patch now.

now it's applied to cvs with a slight modification, to make ez8 option as an array (possibly you can connect multiple ice1712 boards).

thanks for the patch!

Takashi

Signature · 9 lines
http://nostar.isa-geek.com/



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click