From: Takashi Iwai Subject: Re: Re: M-Audio Revolution 5.1 Support Date: Fri, 02 Dec 2005 12:03:47 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Fri_Dec__2_12:03:47_2005-1" Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: David Peroutka Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Dec__2_12:03:47_2005-1 Content-Type: text/plain; charset=US-ASCII At Thu, 1 Dec 2005 20:19:28 +0000 (UTC), David Peroutka wrote: > > Pieter-Jan Malfait 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 > > > > 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 :) 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 --Multipart_Fri_Dec__2_12:03:47_2005-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="revo51-test.diff" Content-Transfer-Encoding: 7bit Index: alsa-kernel/pci/ice1712/revo.c =================================================================== RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/ice1712/revo.c,v retrieving revision 1.13 diff -u -r1.13 revo.c --- alsa-kernel/pci/ice1712/revo.c 17 Nov 2005 14:54:26 -0000 1.13 +++ alsa-kernel/pci/ice1712/revo.c 2 Dec 2005 11:02:10 -0000 @@ -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 diff -u -r1.1 revo.h --- alsa-kernel/pci/ice1712/revo.h 25 Feb 2003 14:53:42 -0000 1.1 +++ alsa-kernel/pci/ice1712/revo.h 2 Dec 2005 11:02:10 -0000 @@ -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[]; --Multipart_Fri_Dec__2_12:03:47_2005-1-- ------------------------------------------------------- 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