Commit 96d9e934 authored by Jochen Voss's avatar Jochen Voss Committed by Jaroslav Kysela

[ALSA] Revolution 5.1 - register the AK5365 ADC with ALSA

Enable capture support for the M-Audio Revolution 5.1 card,
by registering the ADC with ALSA.
Signed-off-by: default avatarJochen Voss <voss@seehuhn.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 683fe153
...@@ -98,6 +98,9 @@ static unsigned int revo51_num_stereo[] = {2, 1, 1, 2}; ...@@ -98,6 +98,9 @@ static unsigned int revo51_num_stereo[] = {2, 1, 1, 2};
static char *revo51_channel_names[] = {"PCM Playback Volume", "PCM Center Playback Volume", static char *revo51_channel_names[] = {"PCM Playback Volume", "PCM Center Playback Volume",
"PCM LFE Playback Volume", "PCM Rear 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 = { static struct snd_akm4xxx akm_revo_front __devinitdata = {
.type = SND_AK4381, .type = SND_AK4381,
.num_dacs = 2, .num_dacs = 2,
...@@ -159,7 +162,26 @@ static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = { ...@@ -159,7 +162,26 @@ static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = {
.data_mask = VT1724_REVO_CDOUT, .data_mask = VT1724_REVO_CDOUT,
.clk_mask = VT1724_REVO_CCLK, .clk_mask = VT1724_REVO_CCLK,
.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2, .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, .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1 | VT1724_REVO_CS2,
.add_flags = VT1724_REVO_CCLK, /* high at init */ .add_flags = VT1724_REVO_CCLK, /* high at init */
.mask_flags = 0, .mask_flags = 0,
...@@ -202,9 +224,13 @@ static int __devinit revo_init(struct snd_ice1712 *ice) ...@@ -202,9 +224,13 @@ static int __devinit revo_init(struct snd_ice1712 *ice)
snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
break; break;
case VT1724_SUBDEVICE_REVOLUTION51: 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) if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo51, &akm_revo51_priv, ice)) < 0)
return err; 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! */ /* unmute all codecs - needed! */
snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE);
break; break;
......
...@@ -42,7 +42,7 @@ extern struct snd_ice1712_card_info snd_vt1724_revo_cards[]; ...@@ -42,7 +42,7 @@ extern struct snd_ice1712_card_info snd_vt1724_revo_cards[];
#define VT1724_REVO_CCLK 0x02 #define VT1724_REVO_CCLK 0x02
#define VT1724_REVO_CDIN 0x04 /* not used */ #define VT1724_REVO_CDIN 0x04 /* not used */
#define VT1724_REVO_CDOUT 0x08 #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_CS1 0x20 /* front AKM4381 chipselect */
#define VT1724_REVO_CS2 0x40 /* surround AKM4355 chipselect */ #define VT1724_REVO_CS2 0x40 /* surround AKM4355 chipselect */
#define VT1724_REVO_MUTE (1<<22) /* 0 = all mute, 1 = normal operation */ #define VT1724_REVO_MUTE (1<<22) /* 0 = all mute, 1 = normal operation */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment