diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-14 20:31:54 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-14 20:31:54 -0400 |
commit | 6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch) | |
tree | 06a5a9a08519950575505273eabced331ed51405 /sound/pci/ice1712/revo.c | |
parent | ee673eaa72d8d185012b1027a05e25aba18c267f (diff) | |
parent | 8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff) |
Merge commit 'origin'
Manual fixup of conflicts on:
arch/powerpc/include/asm/dcr-regs.h
drivers/net/ibm_newemac/core.h
Diffstat (limited to 'sound/pci/ice1712/revo.c')
-rw-r--r-- | sound/pci/ice1712/revo.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 4d2631434dc8..b508bb360b97 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ALSA driver for ICEnsemble ICE1712 (Envy24) | 2 | * ALSA driver for ICEnsemble ICE1712 (Envy24) |
3 | * | 3 | * |
4 | * Lowlevel functions for M-Audio Revolution 7.1 | 4 | * Lowlevel functions for M-Audio Audiophile 192, Revolution 7.1 and 5.1 |
5 | * | 5 | * |
6 | * Copyright (c) 2003 Takashi Iwai <tiwai@suse.de> | 6 | * Copyright (c) 2003 Takashi Iwai <tiwai@suse.de> |
7 | * | 7 | * |
@@ -48,7 +48,7 @@ static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * change the rate of envy24HT, AK4355 and AK4381 | 51 | * change the rate of Envy24HT, AK4355 and AK4381 |
52 | */ | 52 | */ |
53 | static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) | 53 | static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) |
54 | { | 54 | { |
@@ -83,8 +83,8 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) | |||
83 | tmp = snd_akm4xxx_get(ak, 0, reg); | 83 | tmp = snd_akm4xxx_get(ak, 0, reg); |
84 | tmp &= ~(0x03 << shift); | 84 | tmp &= ~(0x03 << shift); |
85 | tmp |= dfs << shift; | 85 | tmp |= dfs << shift; |
86 | // snd_akm4xxx_write(ak, 0, reg, tmp); | 86 | /* snd_akm4xxx_write(ak, 0, reg, tmp); */ |
87 | snd_akm4xxx_set(ak, 0, reg, tmp); /* the value is written in reset(0) */ | 87 | snd_akm4xxx_set(ak, 0, reg, tmp); /* value is written in reset(0) */ |
88 | snd_akm4xxx_reset(ak, 0); | 88 | snd_akm4xxx_reset(ak, 0); |
89 | } | 89 | } |
90 | 90 | ||
@@ -216,6 +216,7 @@ static const struct snd_akm4xxx_dac_channel revo51_dac[] = { | |||
216 | AK_DAC("PCM Center Playback Volume", 1), | 216 | AK_DAC("PCM Center Playback Volume", 1), |
217 | AK_DAC("PCM LFE Playback Volume", 1), | 217 | AK_DAC("PCM LFE Playback Volume", 1), |
218 | AK_DAC("PCM Rear Playback Volume", 2), | 218 | AK_DAC("PCM Rear Playback Volume", 2), |
219 | AK_DAC("PCM Headphone Volume", 2), | ||
219 | }; | 220 | }; |
220 | 221 | ||
221 | static const char *revo51_adc_input_names[] = { | 222 | static const char *revo51_adc_input_names[] = { |
@@ -279,7 +280,7 @@ static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = { | |||
279 | 280 | ||
280 | static struct snd_akm4xxx akm_revo51 __devinitdata = { | 281 | static struct snd_akm4xxx akm_revo51 __devinitdata = { |
281 | .type = SND_AK4358, | 282 | .type = SND_AK4358, |
282 | .num_dacs = 6, | 283 | .num_dacs = 8, |
283 | .ops = { | 284 | .ops = { |
284 | .set_rate_val = revo_set_rate_val | 285 | .set_rate_val = revo_set_rate_val |
285 | }, | 286 | }, |
@@ -508,7 +509,7 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
508 | ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; | 509 | ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; |
509 | break; | 510 | break; |
510 | case VT1724_SUBDEVICE_REVOLUTION51: | 511 | case VT1724_SUBDEVICE_REVOLUTION51: |
511 | ice->num_total_dacs = 6; | 512 | ice->num_total_dacs = 8; |
512 | ice->num_total_adcs = 2; | 513 | ice->num_total_adcs = 2; |
513 | break; | 514 | break; |
514 | case VT1724_SUBDEVICE_AUDIOPHILE192: | 515 | case VT1724_SUBDEVICE_AUDIOPHILE192: |
@@ -524,16 +525,20 @@ static int __devinit revo_init(struct snd_ice1712 *ice) | |||
524 | ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL); | 525 | ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL); |
525 | if (! ak) | 526 | if (! ak) |
526 | return -ENOMEM; | 527 | return -ENOMEM; |
527 | ice->akm_codecs = 2; | ||
528 | switch (ice->eeprom.subvendor) { | 528 | switch (ice->eeprom.subvendor) { |
529 | case VT1724_SUBDEVICE_REVOLUTION71: | 529 | case VT1724_SUBDEVICE_REVOLUTION71: |
530 | ice->akm_codecs = 2; | 530 | ice->akm_codecs = 2; |
531 | if ((err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, &akm_revo_front_priv, ice)) < 0) | 531 | err = snd_ice1712_akm4xxx_init(ak, &akm_revo_front, |
532 | &akm_revo_front_priv, ice); | ||
533 | if (err < 0) | ||
532 | return err; | 534 | return err; |
533 | if ((err = snd_ice1712_akm4xxx_init(ak + 1, &akm_revo_surround, &akm_revo_surround_priv, ice)) < 0) | 535 | err = snd_ice1712_akm4xxx_init(ak+1, &akm_revo_surround, |
536 | &akm_revo_surround_priv, ice); | ||
537 | if (err < 0) | ||
534 | return err; | 538 | return err; |
535 | /* unmute all codecs */ | 539 | /* unmute all codecs */ |
536 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, VT1724_REVO_MUTE); | 540 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, |
541 | VT1724_REVO_MUTE); | ||
537 | break; | 542 | break; |
538 | case VT1724_SUBDEVICE_REVOLUTION51: | 543 | case VT1724_SUBDEVICE_REVOLUTION51: |
539 | ice->akm_codecs = 2; | 544 | ice->akm_codecs = 2; |