aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c52
1 files changed, 30 insertions, 22 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index e3a14068115c..615460f55138 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -92,6 +92,30 @@ void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int ch)
92 } 92 }
93} 93}
94 94
95static unsigned int spi_dac_init[] = {
96 0x00ff,
97 0x02ff,
98 0x0400,
99 0x0520,
100 0x0600,
101 0x08ff,
102 0x0aff,
103 0x0cff,
104 0x0eff,
105 0x10ff,
106 0x1200,
107 0x1400,
108 0x1480,
109 0x1800,
110 0x1aff,
111 0x1cff,
112 0x1e00,
113 0x0530,
114 0x0602,
115 0x0622,
116 0x1400,
117};
118
95static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume) 119static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
96{ 120{
97 unsigned int silent_page; 121 unsigned int silent_page;
@@ -182,28 +206,12 @@ static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume)
182 outl(tmp, emu->port + A_IOCFG); 206 outl(tmp, emu->port + A_IOCFG);
183 } 207 }
184 if (emu->card_capabilities->spi_dac) { /* Audigy 2 ZS Notebook with DAC Wolfson WM8768/WM8568 */ 208 if (emu->card_capabilities->spi_dac) { /* Audigy 2 ZS Notebook with DAC Wolfson WM8768/WM8568 */
185 u32 tmp; 209 int size, n;
186 tmp = snd_emu10k1_spi_write(emu, 0x00ff); 210
187 tmp = snd_emu10k1_spi_write(emu, 0x02ff); 211 size = ARRAY_SIZE(spi_dac_init);
188 tmp = snd_emu10k1_spi_write(emu, 0x0400); 212 for (n=0; n < size; n++)
189 tmp = snd_emu10k1_spi_write(emu, 0x0520); 213 snd_emu10k1_spi_write(emu, spi_dac_init[n]);
190 tmp = snd_emu10k1_spi_write(emu, 0x0600); 214
191 tmp = snd_emu10k1_spi_write(emu, 0x08ff);
192 tmp = snd_emu10k1_spi_write(emu, 0x0aff);
193 tmp = snd_emu10k1_spi_write(emu, 0x0cff);
194 tmp = snd_emu10k1_spi_write(emu, 0x0eff);
195 tmp = snd_emu10k1_spi_write(emu, 0x10ff);
196 tmp = snd_emu10k1_spi_write(emu, 0x1200);
197 tmp = snd_emu10k1_spi_write(emu, 0x1400);
198 tmp = snd_emu10k1_spi_write(emu, 0x1480);
199 tmp = snd_emu10k1_spi_write(emu, 0x1800);
200 tmp = snd_emu10k1_spi_write(emu, 0x1aff);
201 tmp = snd_emu10k1_spi_write(emu, 0x1cff);
202 tmp = snd_emu10k1_spi_write(emu, 0x1e00);
203 tmp = snd_emu10k1_spi_write(emu, 0x0530);
204 tmp = snd_emu10k1_spi_write(emu, 0x0602);
205 tmp = snd_emu10k1_spi_write(emu, 0x0622);
206 tmp = snd_emu10k1_spi_write(emu, 0x1400);
207 snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10); 215 snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10);
208 /* Enable GPIOs 216 /* Enable GPIOs
209 * GPIO0: Unknown 217 * GPIO0: Unknown