Skip to contentSkip to conversation

Add support for the latest IndigoIOx and IndigoDJx cards

PATCH In review Giuliano Pochini 2 participants 3 messages Feb 1, 2009 – Feb 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add support for the latest IndigoIOx and IndigoDJx cards

The following is a very beta patch and is not meant to be merged yet. It has been compile-tested only because I haven't the those cards. Hopefully I'll be able to test it myself soon.

As you can see, I reused the existing IndigoIO and IndigoDJ driver because they are the same cards with a different interface. The firmware is different, though. The driver registers the card as a plain -IO or -DJ without the trailing "x" (I will fix it later if someone thinks it's important).

alsa-kernel/pci/echoaudio/echoaudio.h +3 -0
diff -dup alsa-driver__orig/alsa-kernel/pci/echoaudio/echoaudio.h alsa-driver/alsa-kernel/pci/echoaudio/echoaudio.h
@@ -189,6 +189,9 @@
 #define INDIGO			0x0090
 #define INDIGO_IO		0x00a0
 #define INDIGO_DJ		0x00b0
+#define DC8			0x00c0
+#define INDIGO_IOX		0x00d0
+#define INDIGO_DJX		0x00e0
 #define ECHO3G			0x0100
 
 
alsa-kernel/pci/echoaudio/indigodj.c +6 -2
diff -dup alsa-driver__orig/alsa-kernel/pci/echoaudio/indigodj.c alsa-driver/alsa-kernel/pci/echoaudio/indigodj.c
@@ -59,17 +59,21 @@
 
 MODULE_FIRMWARE("ea/loader_dsp.fw");
 MODULE_FIRMWARE("ea/indigo_dj_dsp.fw");
+MODULE_FIRMWARE("ea/indigo_djx_dsp.fw");
 
 #define FW_361_LOADER		0
 #define FW_INDIGO_DJ_DSP	1
+#define FW_INDIGO_DJX_DSP	2
 
 static const struct firmware card_fw[] = {
 	{0, "loader_dsp.fw"},
-	{0, "indigo_dj_dsp.fw"}
+	{0, "indigo_dj_dsp.fw"},
+	{0, "indigo_djx_dsp.fw"}
 };
 
 static struct pci_device_id snd_echo_ids[] = {
-	{0x1057, 0x3410, 0xECC0, 0x00B0, 0, 0, 0},	/* Indigo DJ*/
+	{0x1057, 0x3410, 0xECC0, 0x00B0, 0, 0, 0},	/* Indigo DJ */
+	{0x1057, 0x3410, 0xECC0, 0x00E0, 0, 0, 0},	/* Indigo DJx */
 	{0,}
 };
 
alsa-kernel/pci/echoaudio/indigodj_dsp.c +7 -2
diff -dup alsa-driver__orig/alsa-kernel/pci/echoaudio/indigodj_dsp.c alsa-driver/alsa-kernel/pci/echoaudio/indigodj_dsp.c
@@ -37,9 +37,11 @@ static int update_vmixer_level(struct ec
 static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
 {
 	int err;
+	u16 subdev;
 
 	DE_INIT(("init_hw() - Indigo DJ\n"));
-	if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO_DJ))
+	subdev = subdevice_id & 0xfff0;
+	if (snd_BUG_ON(subdev != INDIGO_DJ && subdev != INDIGO_DJX))
 		return -ENODEV;
 
 	if ((err = init_dsp_comm_page(chip))) {
@@ -50,7 +52,10 @@ static int init_hw(struct echoaudio *chi
 	chip->device_id = device_id;
 	chip->subdevice_id = subdevice_id;
 	chip->bad_board = TRUE;
-	chip->dsp_code_to_load = &card_fw[FW_INDIGO_DJ_DSP];
+	if (subdev == INDIGO_DJ)
+		chip->dsp_code_to_load = &card_fw[FW_INDIGO_DJ_DSP];
+	else
+		chip->dsp_code_to_load = &card_fw[FW_INDIGO_DJX_DSP];
 	/* Since this card has no ASIC, mark it as loaded so everything
 	   works OK */
 	chip->asic_loaded = TRUE;
alsa-kernel/pci/echoaudio/indigoio.c +6 -2
diff -dup alsa-driver__orig/alsa-kernel/pci/echoaudio/indigoio.c alsa-driver/alsa-kernel/pci/echoaudio/indigoio.c
@@ -60,17 +60,21 @@
 
 MODULE_FIRMWARE("ea/loader_dsp.fw");
 MODULE_FIRMWARE("ea/indigo_io_dsp.fw");
+MODULE_FIRMWARE("ea/indigo_iox_dsp.fw");
 
 #define FW_361_LOADER		0
 #define FW_INDIGO_IO_DSP	1
+#define FW_INDIGO_IOX_DSP	2
 
 static const struct firmware card_fw[] = {
 	{0, "loader_dsp.fw"},
-	{0, "indigo_io_dsp.fw"}
+	{0, "indigo_io_dsp.fw"},
+	{0, "indigo_iox_dsp.fw"}
 };
 
 static struct pci_device_id snd_echo_ids[] = {
-	{0x1057, 0x3410, 0xECC0, 0x00A0, 0, 0, 0},	/* Indigo IO*/
+	{0x1057, 0x3410, 0xECC0, 0x00A0, 0, 0, 0},	/* Indigo IO */
+	{0x1057, 0x3410, 0xECC0, 0x00D0, 0, 0, 0},	/* Indigo IOx */
 	{0,}
 };
 
alsa-kernel/pci/echoaudio/indigoio_dsp.c +7 -2
diff -dup alsa-driver__orig/alsa-kernel/pci/echoaudio/indigoio_dsp.c alsa-driver/alsa-kernel/pci/echoaudio/indigoio_dsp.c
@@ -37,9 +37,11 @@ static int update_vmixer_level(struct ec
 static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
 {
 	int err;
+	u16 subdev;
 
 	DE_INIT(("init_hw() - Indigo IO\n"));
-	if (snd_BUG_ON((subdevice_id & 0xfff0) != INDIGO_IO))
+	subdev = subdevice_id & 0xfff0;
+	if (snd_BUG_ON(subdev != INDIGO_IO && subdev != INDIGO_IOX))
 		return -ENODEV;
 
 	if ((err = init_dsp_comm_page(chip))) {
@@ -50,7 +52,10 @@ static int init_hw(struct echoaudio *chi
 	chip->device_id = device_id;
 	chip->subdevice_id = subdevice_id;
 	chip->bad_board = TRUE;
-	chip->dsp_code_to_load = &card_fw[FW_INDIGO_IO_DSP];
+	if (subdev == INDIGO_IO)
+		chip->dsp_code_to_load = &card_fw[FW_INDIGO_IO_DSP];
+	else
+		chip->dsp_code_to_load = &card_fw[FW_INDIGO_IOX_DSP];
 	/* Since this card has no ASIC, mark it as loaded so everything
 	   works OK */
 	chip->asic_loaded = TRUE;

--
Giuliano.

#1 lore raw

On Sun Feb 01, 2009 at 11:03:20PM +0100, Giuliano Pochini wrote:

i like your patch better, for the unique PCI ID and firmware

enables DJx providing it is a module (so FS exists for firmware)

card 1: DJ [Indigo DJ], device 0: PCM [Indigo DJ]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7

unfortunately SampleRate is still FUBAR

eg sounds like 48000 playing @ 44.1 but adding -sr 44100 to jackd or mplayer results in the same pitch

-sr 32000 sounds pitched up (software downsampling, then card still playing at 44 or something)

if the firmware was *cough* open i might try to figure it out :)

#2 lore raw
Quoted 18 lines · On Mon, 2 Feb 2009 20:16:06 -0500 carmen <[email protected]> wrote:

On Sun Feb 01, 2009 at 11:03:20PM +0100, Giuliano Pochini wrote:

i like your patch better, for the unique PCI ID and firmware

enables DJx providing it is a module (so FS exists for firmware)

card 1: DJ [Indigo DJ], device 0: PCM [Indigo DJ]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7

Quoted 5 lines

unfortunately SampleRate is still FUBAR

eg sounds like 48000 playing @ 44.1 but adding -sr 44100 to jackd or mplayer results in the same pitch

-sr 32000 sounds pitched up (software downsampling, then card still playing at 44 or something)

Uhm, I don't know. I don't have the card (yet), and I can't test it. I'll recheck the code as soon as I can. Did you try something simpler, eg. aplay/arecord and speakertest ?

Quoted 1 line

if the firmware was *cough* open i might try to figure it out :)

Nope, they don't release the sources.

--
Giuliano.