diff options
| -rw-r--r-- | sound/pci/cs5535audio/cs5535audio.h | 3 | ||||
| -rw-r--r-- | sound/pci/cs5535audio/cs5535audio_olpc.c | 9 |
2 files changed, 1 insertions, 11 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h index 93602cf2858a..31ecb33ffff9 100644 --- a/sound/pci/cs5535audio/cs5535audio.h +++ b/sound/pci/cs5535audio/cs5535audio.h | |||
| @@ -92,9 +92,6 @@ struct cs5535audio { | |||
| 92 | struct snd_pcm_substream *playback_substream; | 92 | struct snd_pcm_substream *playback_substream; |
| 93 | struct snd_pcm_substream *capture_substream; | 93 | struct snd_pcm_substream *capture_substream; |
| 94 | struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS]; | 94 | struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS]; |
| 95 | #ifdef CONFIG_OLPC | ||
| 96 | int ec_analog_input_mode; | ||
| 97 | #endif | ||
| 98 | }; | 95 | }; |
| 99 | 96 | ||
| 100 | #ifdef CONFIG_PM | 97 | #ifdef CONFIG_PM |
diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c index ff7b68ba6179..2bd6588b4353 100644 --- a/sound/pci/cs5535audio/cs5535audio_olpc.c +++ b/sound/pci/cs5535audio/cs5535audio_olpc.c | |||
| @@ -38,8 +38,7 @@ static int snd_cs5535audio_ctl_get(struct snd_kcontrol *kcontrol, | |||
| 38 | reg1 = snd_ac97_read(cs5535au->ac97, AC97_AD_MISC); | 38 | reg1 = snd_ac97_read(cs5535au->ac97, AC97_AD_MISC); |
| 39 | reg2 = snd_ac97_read(cs5535au->ac97, AC97_AD_TEST2); | 39 | reg2 = snd_ac97_read(cs5535au->ac97, AC97_AD_TEST2); |
| 40 | 40 | ||
| 41 | if ((reg1 & AD1888_VREFOUT_EN_BIT) && (reg2 & AD1888_HPF_EN_BIT) && | 41 | if ((reg1 & AD1888_VREFOUT_EN_BIT) && (reg2 & AD1888_HPF_EN_BIT)) |
| 42 | cs5535au->ec_analog_input_mode) | ||
| 43 | ucontrol->value.integer.value[0] = 1; | 42 | ucontrol->value.integer.value[0] = 1; |
| 44 | else | 43 | else |
| 45 | ucontrol->value.integer.value[0] = 0; | 44 | ucontrol->value.integer.value[0] = 0; |
| @@ -58,10 +57,6 @@ static int snd_cs5535audio_ctl_put(struct snd_kcontrol *kcontrol, | |||
| 58 | /* value is 1 if analog input is desired */ | 57 | /* value is 1 if analog input is desired */ |
| 59 | value = ucontrol->value.integer.value[0]; | 58 | value = ucontrol->value.integer.value[0]; |
| 60 | 59 | ||
| 61 | /* use ec mode as flag to determine if any change needed */ | ||
| 62 | if (cs5535au->ec_analog_input_mode == value) | ||
| 63 | return 0; | ||
| 64 | |||
| 65 | /* sets High Z on VREF Bias if 1 */ | 60 | /* sets High Z on VREF Bias if 1 */ |
| 66 | if (value) | 61 | if (value) |
| 67 | err = snd_ac97_update_bits(ac97, AC97_AD_MISC, | 62 | err = snd_ac97_update_bits(ac97, AC97_AD_MISC, |
| @@ -88,8 +83,6 @@ static int snd_cs5535audio_ctl_put(struct snd_kcontrol *kcontrol, | |||
| 88 | else | 83 | else |
| 89 | geode_gpio_clear(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); | 84 | geode_gpio_clear(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); |
| 90 | 85 | ||
| 91 | cs5535au->ec_analog_input_mode = value; | ||
| 92 | |||
| 93 | return 1; | 86 | return 1; |
| 94 | } | 87 | } |
| 95 | 88 | ||
