Revolution 5.1 - add capture support
cover Revolution 5.1 - add capture support
This is the promised patch to enable capture support on the M-Audio Revolution 5.1 card.
part 1: add AK5365 support to i2c/other/ak4xxx-adda.c part 2: register the card's AK5365 ADC with ALSA
The mute button support is still missing.
If I find time, I will post a patch on top of these two to enable the mute button.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [PATCH 1/2] Revolution 5.1 - add AK5365 ADC support
Add support for the AK5365 ADC.
alsa-kernel/i2c/other/ak4xxx-adda.c +25 -0
@@ -598,6 +598,31 @@if (err <0 ) goto __error; } + +if (ak->type ==SND_AK5365 ) { +memset (ctl,0 ,sizeof (*ctl)); +if (ak->channel_names ==NULL ) +strcpy (ctl->id.name,"Capture Volume" ); +else +strcpy (ctl->id.name, ak->channel_names[0 ]); + ctl->id.index = ak->idx_offset *2 ; + ctl->id.iface =SNDRV_CTL_ELEM_IFACE_MIXER ; + ctl->count =1 ; + ctl->info = snd_akm4xxx_stereo_volume_info; + ctl->get = snd_akm4xxx_stereo_volume_get; + ctl->put = snd_akm4xxx_stereo_volume_put; +/* Registers 4 & 5 (see AK5365 data sheet, pages 34 and 35): +* valid values are from 0x00 (mute) to 0x98 (+12dB). */ + ctl->private_value = +AK_COMPOSE (0 ,4 ,0 ,0x98 ); + ctl->private_data = ak; + err =snd_ctl_add (ak->card, +snd_ctl_new (ctl,SNDRV_CTL_ELEM_ACCESS_READ | +SNDRV_CTL_ELEM_ACCESS_WRITE )); +if (err <0 ) + goto __error; + } +if (ak->type ==SND_AK4355 || ak->type ==SND_AK4358 ) num_emphs =1 ;else
alsa-kernel/include/ak4xxx-adda.h +2 -1
@@ -53,7 +53,8 @@unsigned int idx_offset;/* control index offset */ enum {SND_AK4524 ,SND_AK4528 ,SND_AK4529 , -SND_AK4355 ,SND_AK4358 ,SND_AK4381 +SND_AK4355 ,SND_AK4358 ,SND_AK4381 , +SND_AK5365 } type;unsigned int *num_stereo;/* array of combined counts * for the mixer
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [PATCH 2/2] Revolution 5.1 - register the AK5365 ADC with ALSA
In reply to Jochen VossEnable capture support for the M-Audio Revolution 5.1 card, by registering the ADC with ALSA.
alsa-kernel/pci/ice1712/revo.c +28 -2
@@ -98,6 +98,9 @@static char *revo51_channel_names[] = {"PCM Playback Volume" ,"PCM Center Playback Volume" ,"PCM LFE Playback Volume" ,"PCM Rear Playback Volume" }; +static unsigned int revo51_adc_num_stereo[] = {2 }; +static char *revo51_adc_channel_names[] = {"PCM Capture Volume" }; +static struct snd_akm4xxx akm_revo_front__devinitdata = { .type =SND_AK4381 , .num_dacs =2 ,
@@ -159,7 +162,26 @@ .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_addr = VT1724_REVO_CS1 | 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 struct snd_akm4xxx akm_revo51_adc__devinitdata = { + .type =SND_AK5365 , + .num_adcs =2 , + .num_stereo = revo51_adc_num_stereo, + .channel_names = revo51_adc_channel_names +}; + +static struct snd_ak4xxx_private akm_revo51_adc_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 =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 ,
@@ -202,9 +224,13 @@snd_ice1712_gpio_write_bits (ice,VT1724_REVO_MUTE ,VT1724_REVO_MUTE );break ;case VT1724_SUBDEVICE_REVOLUTION51 : - ice->akm_codecs =1 ; + ice->akm_codecs =2 ;if ((err =snd_ice1712_akm4xxx_init (ak, &akm_revo51, &akm_revo51_priv, ice)) <0 )return err; + err =snd_ice1712_akm4xxx_init (ak +1 , &akm_revo51_adc, + &akm_revo51_adc_priv, ice); +if (err <0 ) +return err;/* unmute all codecs - needed! */ snd_ice1712_gpio_write_bits (ice,VT1724_REVO_MUTE ,VT1724_REVO_MUTE );break ;
alsa-kernel/pci/ice1712/revo.h +1 -1
@@ -42,7 +42,7 @@#define VT1724_REVO_CCLK 0x02#define VT1724_REVO_CDIN 0x04/* not used */ #define VT1724_REVO_CDOUT 0x08 -#define VT1724_REVO_CS0 0x10/* not used */ +#define VT1724_REVO_CS0 0x10/* AK5365 chipselect for Rev. 5.1 */ #define VT1724_REVO_CS1 0x20/* front AKM4381 chipselect */ #define VT1724_REVO_CS2 0x40/* surround AKM4355 chipselect */ #define VT1724_REVO_MUTE (1<<22)/* 0 = all mute, 1 = normal operation */
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Tue, 8 Aug 2006 19:57:58 +0100,
Quoted 6 lines · Jochen Voss
This is the promised patch to enable capture support on the M-Audio Revolution 5.1 card.
part 1: add AK5365 support to
i2c/other/ak4xxx-adda.cpart 2: register the card's AK5365 ADC with ALSA
Thanks, I applied them to ALSA HG tree now.
Quoted 4 lines
The mute button support is still missing.
If I find time, I will post a patch on top of these two to enable the mute button.
OK. The switch should be named "Capture Switch" or rather "PCM Capture Switch" since the volume is "PCM Capture Volume".
We normall don't use "mute" in the control name because the switch is supposed to be positive: on = on, off = off.
Takashi
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642