aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/virtuoso.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-05-13 03:23:02 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:17 -0400
commit92215f3a178080bd9d7c65879499e9474e54d55c (patch)
tree09b81a6f5bc2f88fa0ac9abb6a02ad2c27bb2c54 /sound/pci/oxygen/virtuoso.c
parent75146fc0f9368ea41419792ac8bfdd19273b4473 (diff)
[ALSA] virtuoso: add xonar_enable_output()
Move the setting of the output enable GPIO bit to a separate function. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/virtuoso.c')
-rw-r--r--sound/pci/oxygen/virtuoso.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index e95dc5717ed7..abd5313d19b5 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -162,6 +162,14 @@ static void cs4362a_write(struct oxygen *chip, u8 reg, u8 value)
162 oxygen_write_i2c(chip, I2C_DEVICE_CS4362A, reg, value); 162 oxygen_write_i2c(chip, I2C_DEVICE_CS4362A, reg, value);
163} 163}
164 164
165static void xonar_enable_output(struct oxygen *chip)
166{
167 struct xonar_data *data = chip->model_data;
168
169 msleep(data->anti_pop_delay);
170 oxygen_set_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit);
171}
172
165static void xonar_common_init(struct oxygen *chip) 173static void xonar_common_init(struct oxygen *chip)
166{ 174{
167 struct xonar_data *data = chip->model_data; 175 struct xonar_data *data = chip->model_data;
@@ -173,13 +181,12 @@ static void xonar_common_init(struct oxygen *chip)
173 data->has_power = !!(oxygen_read8(chip, data->ext_power_reg) 181 data->has_power = !!(oxygen_read8(chip, data->ext_power_reg)
174 & data->ext_power_bit); 182 & data->ext_power_bit);
175 } 183 }
176 oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_CS53x1_M_MASK); 184 oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL,
185 GPIO_CS53x1_M_MASK | data->output_enable_bit);
177 oxygen_write16_masked(chip, OXYGEN_GPIO_DATA, 186 oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
178 GPIO_CS53x1_M_SINGLE, GPIO_CS53x1_M_MASK); 187 GPIO_CS53x1_M_SINGLE, GPIO_CS53x1_M_MASK);
179 oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC); 188 oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC);
180 msleep(data->anti_pop_delay); 189 xonar_enable_output(chip);
181 oxygen_set_bits16(chip, OXYGEN_GPIO_CONTROL, data->output_enable_bit);
182 oxygen_set_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit);
183} 190}
184 191
185static void update_pcm1796_volume(struct oxygen *chip) 192static void update_pcm1796_volume(struct oxygen *chip)