Skip to contentSkip to conversation

M-Audio Revolution 5.1 Support

DISCUSSION Pieter-Jan Malfait 5 participants 8 messages Dec 1, 2005 – Dec 6, 2005

lore
Share & tools
lore
#0 lore raw

hello,

i've read on a couple of sites that the M-Audio Revolution 5.1 is not supported
by the alsa driver, however some of these sites were over a year old.. Is it
currently supported or will it be in the near future ?

thank you

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#1 lore raw
Quoted 9 lines · Pieter-Jan Malfait <pieterjan.malfait <at> gmail.com> writes:

hello,

i've read on a couple of sites that the M-Audio Revolution 5.1 is not supported
by the alsa driver, however some of these sites were over a year old.. Is it
currently supported or will it be in the near future ?

thank you

Quoted 9 lines

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Hello,

unfortunately, the Revolution 5.1 is currently not supported in ALSA; only Revolution 7.1 is supported. Both cards are based on VIA Envy 24HT controller, but there are some notable differences between the two models:

The front two output channels of the Revolution 7.1 use AKM AK4381 stereo DAC, the remaining 5.1 channels use AKM AK4355. Analog audio is sampled with the AKM AK5380 ADC.

The Revolution 5.1 uses different codecs. All output channels use AKM AK4358 (8-ch DAC, 24/192). Inputs are sampled by AKM AK5365 (24/96). Also, the Revolution 5.1 has a dedicated headphone output.

Also note, that the DAC used in Revolution 5.1 is the same as in Juli@, which is already supported in ALSA (ice1724).

I've also tried a kernel patch, that is supposed to add support for the M-Audio Revolution 5.1:

http://www.mph.eclipse.co.uk/pub/linux/patches/ice1712_revo.patch

but it does not work for me; apparently the driver failed to setup the output codec, so I can only hear some strange dizzling sounds, coming out at full volume :)

I hope that someone will be able to add ALSA support for this great card. I'm willing to help in this effort (by testing or coding).

Currently, I'm forced to use free-version of OSS drivers:

http://www.opensound.com/

which works very well for Revolution 5.1, but they are commercial closed-source binary-only modules.

Regards,

--
David

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#2 lore raw

Hi,

Quoted 3 lines

I hope that someone will be able to add ALSA support for this great card. I'm willing to help in this effort (by testing or coding).

I just purchased a M-Audio Revolution 5.1 (before i read about the support issues) to use mainly for digital output from my MythTV box to my amplifier. Pity it isn't supported in ALSA, i'm also willing to contribute to the development in the form of testing rather than coding (i'm a java j2ee programmer, no experience whatever at writing drivers..).

Quoted 1 line

Currently, I'm forced to use free-version of OSS drivers:

That's good news as i thought that the Revo 5.1 just wasn't supported on Linux. I've considered trading the Revo 5.1 for the Revo 7.1. Would that be a good decision or should i stick to using the OSS drivers for now and waiting for the Revo 5.1 to be supported by the ALSA driver?

thank you very much for your response!

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#3 lore raw
Quoted 1 line · Pieter-Jan Malfait

Revo 5.1 to be supported by the ALSA driver?

See https://bugtrack.alsa-project.org/alsa-bug/view.php?id=931 if you can provide hardware details.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#4 lore raw
In reply to David Peroutka

At Thu, 1 Dec 2005 20:19:28 +0000 (UTC),

Quoted 39 lines · David Peroutka
Quoted 9 lines · Pieter-Jan Malfait <pieterjan.malfait <at> gmail.com> writes:

hello,

i've read on a couple of sites that the M-Audio Revolution 5.1 is not supported
by the alsa driver, however some of these sites were over a year old.. Is it
currently supported or will it be in the near future ?

thank you

Quoted 9 lines

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Hello,

unfortunately, the Revolution 5.1 is currently not supported in ALSA; only Revolution 7.1 is supported. Both cards are based on VIA Envy 24HT controller, but there are some notable differences between the two models:

The front two output channels of the Revolution 7.1 use AKM AK4381 stereo DAC, the remaining 5.1 channels use AKM AK4355. Analog audio is sampled with the AKM AK5380 ADC.

The Revolution 5.1 uses different codecs. All output channels use AKM AK4358 (8-ch DAC, 24/192). Inputs are sampled by AKM AK5365 (24/96). Also, the Revolution 5.1 has a dedicated headphone output.

Also note, that the DAC used in Revolution 5.1 is the same as in Juli@, which is already supported in ALSA (ice1724).

Quoted 8 lines

I've also tried a kernel patch, that is supposed to add support for the M-Audio Revolution 5.1:

http://www.mph.eclipse.co.uk/pub/linux/patches/ice1712_revo.patch

but it does not work for me; apparently the driver failed to setup the output codec, so I can only hear some strange dizzling sounds, coming out at full volume :)

This patch can't work because the codecs are different.

The most important question for the support of this new board is which connection is used on it. Assume that it's using the same protocol as revo 7.1, we still need to know the clock, in, out, chip-select pins. You can check this by yourself with help of an electronic tool (or good eyes) by tracing the pin connections between VT1724 and codec chip.

The patch below is a shot in the dark (to ALSA CVS version!) If this doesn't work, first try a different value in akm_revo51_priv.caddr (e.g. 2 or 0). If still doesn't work, try .cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS1.
If stil doesn't work... try different combinations of clock, data and cs bits.

Takashi

Index: alsa-kernel/pci/ice1712/revo.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/ice1712/revo.c,v retrieving revision 1.13

pci/ice1712/revo.c +39 -2
diff -u -r1.13 revo.c
@@ -128,6 +128,24 @@
 	.mask_flags = 0,
 };
 
+static struct snd_akm4xxx akm_revo51 __devinitdata = {
+	.type = SND_AK4358,
+	.num_dacs = 6,
+	// .ops = { .set_rate_val = revo_set_rate_val } /* FIXME */
+};
+
+static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = {
+	.caddr = 1,
+	.cif = 0,
+	.data_mask = VT1724_REVO_CDOUT,
+	.clk_mask = VT1724_REVO_CCLK,
+	.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2,
+	.cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS2,
+	.cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2,
+	.add_flags = VT1724_REVO_CCLK, /* high at init */
+	.mask_flags = 0,
+};
+
 static int __devinit revo_init(struct snd_ice1712 *ice)
 {
 	struct snd_akm4xxx *ak;
@@ -138,21 +156,25 @@
 	case VT1724_SUBDEVICE_REVOLUTION71:
 		ice->num_total_dacs = 8;
 		ice->num_total_adcs = 2;
+		ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
+		break;
+	case VT1724_SUBDEVICE_REVOLUTION51:
+		ice->num_total_dacs = 6;
+		ice->num_total_adcs = 2;
 		break;
 	default:
 		snd_BUG();
 		return -EINVAL;
 	}
 
-	ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
 
 	/* second stage of initialization, analog parts and others */
 	ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
 	if (! ak)
 		return -ENOMEM;
-	ice->akm_codecs = 2;
 	switch (ice->eeprom.subvendor) {
 	case VT1724_SUBDEVICE_REVOLUTION71:
+		ice->akm_codecs = 2;
 		if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, &akm_revo_front_priv, ice)) < 0)
 			return err;
 		if ((err = snd_ice1712_akm4xxx_init(ak + 1, &akm_revo_surround, &akm_revo_surround_priv, ice)) < 0)
@@ -160,6 +182,13 @@
 		/* unmute all codecs */
 		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
 		break;
+	case VT1724_SUBDEVICE_REVOLUTION51:
+		ice->akm_codecs = 1;
+		if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo51, &akm_revo51_priv, ice)) < 0)
+			return err;
+		/* FIXME: unmute all codecs - needed? */
+		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
+		break;
 	}
 
 	return 0;
@@ -172,6 +201,7 @@
 
 	switch (ice->eeprom.subvendor) {
 	case VT1724_SUBDEVICE_REVOLUTION71:
+	case VT1724_SUBDEVICE_REVOLUTION51:
 		err = snd_ice1712_akm4xxx_build_controls(ice);
 		if (err < 0)
 			return err;
@@ -188,5 +218,12 @@
 		.chip_init = revo_init,
 		.build_controls = revo_add_controls,
 	},
+	{
+		.subvendor = VT1724_SUBDEVICE_REVOLUTION51,
+		.name = "M Audio Revolution-5.1",
+		.model = "revo51",
+		.chip_init = revo_init,
+		.build_controls = revo_add_controls,
+	},
 	{ } /* terminator */
 };

Index: alsa-kernel/pci/ice1712/revo.h
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/ice1712/revo.h,v retrieving revision 1.1

pci/ice1712/revo.h +1 -0
diff -u -r1.1 revo.h
@@ -28,6 +28,7 @@
 		"{MidiMan M Audio,Revolution 7.1},"
 
 #define VT1724_SUBDEVICE_REVOLUTION71	0x12143036
+#define VT1724_SUBDEVICE_REVOLUTION51	0x12143136
 
 /* entry point */
 extern struct snd_ice1712_card_info snd_vt1724_revo_cards[];
#5 lore raw
Quoted 69 lines

At Thu, 1 Dec 2005 20:19:28 +0000 (UTC),

Quoted 38 lines · David Peroutka
Quoted 8 lines · Pieter-Jan Malfait <pieterjan.malfait <at> gmail.com> writes:

hello,

i've read on a couple of sites that the M-Audio Revolution 5.1 is not supported
by the alsa driver, however some of these sites were over a year old.. Is it
currently supported or will it be in the near future ?

thank you

Quoted 9 lines

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Hello,

unfortunately, the Revolution 5.1 is currently not supported in ALSA; only Revolution 7.1 is supported. Both cards are based on VIA Envy 24HT controller, but there are some notable differences between the two models:

The front two output channels of the Revolution 7.1 use AKM AK4381 stereo DAC, the remaining 5.1 channels use AKM AK4355. Analog audio is sampled with the AKM AK5380 ADC.

The Revolution 5.1 uses different codecs. All output channels use AKM AK4358 (8-ch DAC, 24/192). Inputs are sampled by AKM AK5365 (24/96). Also, the Revolution 5.1 has a dedicated headphone output.

Also note, that the DAC used in Revolution 5.1 is the same as in Juli@, which is already supported in ALSA (ice1724).

Quoted 8 lines

I've also tried a kernel patch, that is supposed to add support for the M-Audio Revolution 5.1:

http://www.mph.eclipse.co.uk/pub/linux/patches/ice1712_revo.patch

but it does not work for me; apparently the driver failed to setup the output codec, so I can only hear some strange dizzling sounds, coming out at full volume :)

Takashi Iwai wrote:

This patch can't work because the codecs are different.

The most important question for the support of this new board is which connection is used on it. Assume that it's using the same protocol as revo 7.1, we still need to know the clock, in, out, chip-select pins. You can check this by yourself with help of an electronic tool (or good eyes) by tracing the pin connections between VT1724 and codec chip.

The patch below is a shot in the dark (to ALSA CVS version!) If this doesn't work, first try a different value in akm_revo51_priv.caddr (e.g. 2 or 0). If still doesn't work, try .cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS1.
If stil doesn't work... try different combinations of clock, data and cs bits.

Quoted 1 line

Takashi

Hi Takashi,

I've found the working values for akm_revo51_priv:

.caddr = 2,
.cs_addr = 0,

The card now plays music very nicely. I've attached a patch against alsa-driver-1.0.10 for other users. Note that you must adjust first two mixer controls named "DAC" controling volume of the left and right front channels.

Now, the only missing piece (for me :) is a volume control for headphone output. Any idea how to add it?

I do really appreciate your help and outstanding work of alsa team as whole.

Thanks!

--
David

revo.c renamed from revo.c.orig +43 -4
@@ -47,6 +47,7 @@
  */
 static void revo_set_rate_val(akm4xxx_t *ak, unsigned int rate)
 {
+	printk(KERN_DEBUG "revo_set_rate_val: rate=%d\n", rate);
 	unsigned char old, tmp, dfs;
 	int reg, shift;
 
@@ -61,7 +62,7 @@
 	else
 		dfs = 0;
 
-	if (ak->type == SND_AK4355) {
+	if (ak->type == SND_AK4355 || ak->type == SND_AK4358) {
 		reg = 2;
 		shift = 4;
 	} else {
@@ -128,6 +129,26 @@
 	.mask_flags = 0,
 };
 
+static akm4xxx_t akm_revo51 __devinitdata = {
+	.type = SND_AK4358,
+	.num_dacs = 6,
+	.ops = {
+		.set_rate_val = revo_set_rate_val
+	}
+};
+
+static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = {
+	.caddr = 2,
+	.cif = 0,
+	.data_mask = VT1724_REVO_CDOUT,
+	.clk_mask = VT1724_REVO_CCLK,
+	.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2,
+	.cs_addr = 0,
+	.cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2,
+	.add_flags = VT1724_REVO_CCLK, /* high at init */
+	.mask_flags = 0,
+};
+
 static int __devinit revo_init(ice1712_t *ice)
 {
 	akm4xxx_t *ak;
@@ -138,21 +159,24 @@
 	case VT1724_SUBDEVICE_REVOLUTION71:
 		ice->num_total_dacs = 8;
 		ice->num_total_adcs = 2;
+		ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
+		break;
+	case VT1724_SUBDEVICE_REVOLUTION51:
+		ice->num_total_dacs = 6;
+		ice->num_total_adcs = 2;
 		break;
 	default:
 		snd_BUG();
 		return -EINVAL;
 	}
 
-	ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
-
 	/* second stage of initialization, analog parts and others */
 	ak = ice->akm = kcalloc(2, sizeof(akm4xxx_t), GFP_KERNEL);
 	if (! ak)
 		return -ENOMEM;
-	ice->akm_codecs = 2;
 	switch (ice->eeprom.subvendor) {
 	case VT1724_SUBDEVICE_REVOLUTION71:
+		ice->akm_codecs = 2;
 		if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, &akm_revo_front_priv, ice)) < 0)
 			return err;
 		if ((err = snd_ice1712_akm4xxx_init(ak + 1, &akm_revo_surround, &akm_revo_surround_priv, ice)) < 0)
@@ -160,6 +184,13 @@
 		/* unmute all codecs */
 		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
 		break;
+	case VT1724_SUBDEVICE_REVOLUTION51:
+		ice->akm_codecs = 1;
+		if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo51, &akm_revo51_priv, ice)) < 0)
+			return err;
+		/* unmute all codecs - needed! */
+		snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
+		break;
 	}
 
 	return 0;
@@ -172,6 +203,7 @@
 
 	switch (ice->eeprom.subvendor) {
 	case VT1724_SUBDEVICE_REVOLUTION71:
+	case VT1724_SUBDEVICE_REVOLUTION51:
 		err = snd_ice1712_akm4xxx_build_controls(ice);
 		if (err < 0)
 			return err;
@@ -188,5 +220,12 @@
 		.chip_init = revo_init,
 		.build_controls = revo_add_controls,
 	},
+	{
+		.subvendor = VT1724_SUBDEVICE_REVOLUTION51,
+		.name = "M Audio Revolution-5.1",
+		.model = "revo51",
+		.chip_init = revo_init,
+		.build_controls = revo_add_controls,
+	},
 	{ } /* terminator */
 };
#6 lore raw

At Fri, 02 Dec 2005 21:52:49 +0100,

Quoted 76 lines · David Peroutka
Quoted 70 lines

At Thu, 1 Dec 2005 20:19:28 +0000 (UTC),

Quoted 38 lines · David Peroutka
Quoted 8 lines · Pieter-Jan Malfait <pieterjan.malfait <at> gmail.com> writes:

hello,

i've read on a couple of sites that the M-Audio Revolution 5.1 is not supported
by the alsa driver, however some of these sites were over a year old.. Is it
currently supported or will it be in the near future ?

thank you

Quoted 9 lines

kind regards,
PJ

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Hello,

unfortunately, the Revolution 5.1 is currently not supported in ALSA; only Revolution 7.1 is supported. Both cards are based on VIA Envy 24HT controller, but there are some notable differences between the two models:

The front two output channels of the Revolution 7.1 use AKM AK4381 stereo DAC, the remaining 5.1 channels use AKM AK4355. Analog audio is sampled with the AKM AK5380 ADC.

The Revolution 5.1 uses different codecs. All output channels use AKM AK4358 (8-ch DAC, 24/192). Inputs are sampled by AKM AK5365 (24/96). Also, the Revolution 5.1 has a dedicated headphone output.

Also note, that the DAC used in Revolution 5.1 is the same as in Juli@, which is already supported in ALSA (ice1724).

Quoted 8 lines

I've also tried a kernel patch, that is supposed to add support for the M-Audio Revolution 5.1:

http://www.mph.eclipse.co.uk/pub/linux/patches/ice1712_revo.patch

but it does not work for me; apparently the driver failed to setup the output codec, so I can only hear some strange dizzling sounds, coming out at full volume :)

Takashi Iwai wrote:

This patch can't work because the codecs are different.

The most important question for the support of this new board is which connection is used on it. Assume that it's using the same protocol as revo 7.1, we still need to know the clock, in, out, chip-select pins. You can check this by yourself with help of an electronic tool (or good eyes) by tracing the pin connections between VT1724 and codec chip.

The patch below is a shot in the dark (to ALSA CVS version!) If this doesn't work, first try a different value in akm_revo51_priv.caddr (e.g. 2 or 0). If still doesn't work, try .cs_addr = VT1724_REVO_CS0 | VT1724_REVO_CS1.
If stil doesn't work... try different combinations of clock, data and cs bits.

Quoted 1 line

Takashi

Hi Takashi,

I've found the working values for akm_revo51_priv:

Quoted 7 lines

.caddr = 2,
.cs_addr = 0,

The card now plays music very nicely. I've attached a patch against alsa-driver-1.0.10 for other users. Note that you must adjust first two mixer controls named "DAC" controling volume of the left and right front channels.

Thanks for checking. I committed the change to ALSA CVS now.

Quoted 3 lines

Now, the only missing piece (for me :) is a volume control for headphone output. Any idea how to add it?

The question is again how it's connected. Does it use another codec chip or the same one with a different channel?

In the former case, it might be set/reset with another GPIO pin as the chip select (CS). Usually this is used to select a given code to set up, and to initialize/finish the I2C/SPI transfer.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#7 lore raw
Quoted 6 lines

The question is again how it's connected. Does it use another codec chip or the same one with a different channel?

In the former case, it might be set/reset with another GPIO pin as the chip select (CS). Usually this is used to select a given code to set up, and to initialize/finish the I2C/SPI transfer.

Was taking a look at the source for the Revo 5.1, noticed a few things. You set it up as using only 6 DACs, going by the 5.1 I figure, but when you consider that it also has the headpone out, it would have the same number of DACs as the 7.1 (8 DACs in all).

Quoted 1 line

From what I've read, the 5.1 only uses one codec, and the headphones would just

be a separate channel. I tried adjusting the number of DACs to 8 in the driver, and did manage to get two DAC mixer sliders. I'm not really sure if that was the way to go or not. I tried adjusting the asound plugin to output to 8 channels, pcm
device surround71, but that didn't seem to work. I wondering if it needs to be setup separately thant the other 6 channels so that it would be considered it's own PCM device. That goes a bit beyond my realm of knowledge for driver development though...still trying to learn this. Been reading a lot of the documents and such.

Anyways, just thought I'd try and help where I could.

Trevor

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click