diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2005-12-20 16:30:49 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:30:58 -0500 |
commit | a5875159dd6cec0ec743971343aee8dceac281d7 (patch) | |
tree | 72395f42105af60721e17bd443815901805cf532 /sound | |
parent | 39596dc898270fcaaa8a712b63fc033f86d874cf (diff) |
[ALSA] snd-ca0106: Fixes sound output for Creative Audigy SE aka.SB0570.
Modules: CA0106 driver
Fixes ALSA bug#1636
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ca0106/ca0106.h | 1 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index 7088317ec4ce..c8131ea92ed6 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h | |||
@@ -577,6 +577,7 @@ struct snd_ca0106_details { | |||
577 | int ac97; | 577 | int ac97; |
578 | int gpio_type; | 578 | int gpio_type; |
579 | int i2c_adc; | 579 | int i2c_adc; |
580 | int spi_dac; | ||
580 | }; | 581 | }; |
581 | 582 | ||
582 | // definition of the chip-specific record | 583 | // definition of the chip-specific record |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 5964cdc93f73..1cf6f1fa98b1 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -183,6 +183,17 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
183 | .name = "Live! 7.1 24bit [SB0413]", | 183 | .name = "Live! 7.1 24bit [SB0413]", |
184 | .gpio_type = 1, | 184 | .gpio_type = 1, |
185 | .i2c_adc = 1 } , | 185 | .i2c_adc = 1 } , |
186 | /* New Audigy SE. Has a different DAC. */ | ||
187 | /* SB0570: | ||
188 | * CTRL:CA0106-DAT | ||
189 | * ADC: WM8768GEDS | ||
190 | * DAC: WM8775EDS | ||
191 | */ | ||
192 | { .serial = 0x100a1102, | ||
193 | .name = "Audigy SE [SB0570]", | ||
194 | .gpio_type = 1, | ||
195 | .i2c_adc = 1, | ||
196 | .spi_dac = 1 } , | ||
186 | /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */ | 197 | /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */ |
187 | { .serial = 0x10091462, | 198 | { .serial = 0x10091462, |
188 | .name = "MSI K8N Diamond MB [SB0438]", | 199 | .name = "MSI K8N Diamond MB [SB0438]", |
@@ -273,6 +284,20 @@ void snd_ca0106_ptr_write(struct snd_ca0106 *emu, | |||
273 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 284 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
274 | } | 285 | } |
275 | 286 | ||
287 | int snd_ca0106_spi_write(struct snd_ca0106 *emu, | ||
288 | u32 value) | ||
289 | { | ||
290 | snd_ca0106_ptr_write(emu, SPI, 0, value); | ||
291 | return 0; | ||
292 | } | ||
293 | |||
294 | int snd_ca0106_spi_read(struct snd_ca0106 *emu, | ||
295 | u32 *value) | ||
296 | { | ||
297 | *value = snd_ca0106_ptr_read(emu, SPI, 0); | ||
298 | return 0; | ||
299 | } | ||
300 | |||
276 | int snd_ca0106_i2c_write(struct snd_ca0106 *emu, | 301 | int snd_ca0106_i2c_write(struct snd_ca0106 *emu, |
277 | u32 reg, | 302 | u32 reg, |
278 | u32 value) | 303 | u32 value) |
@@ -1304,6 +1329,13 @@ static int __devinit snd_ca0106_create(struct snd_card *card, | |||
1304 | if (chip->details->i2c_adc == 1) { /* The SB0410 and SB0413 use I2C to control ADC. */ | 1329 | if (chip->details->i2c_adc == 1) { /* The SB0410 and SB0413 use I2C to control ADC. */ |
1305 | snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */ | 1330 | snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */ |
1306 | } | 1331 | } |
1332 | if (chip->details->spi_dac == 1) { /* The SB0570 use SPI to control DAC. */ | ||
1333 | u32 tmp; | ||
1334 | snd_ca0106_spi_write(chip, 0xf0622); /* Enable speakers output. */ | ||
1335 | snd_ca0106_spi_read(chip, &tmp); /* Read the value. */ | ||
1336 | snd_ca0106_spi_write(chip, 0xe1400); | ||
1337 | snd_ca0106_spi_read(chip, &tmp); /* Read the value. */ | ||
1338 | } | ||
1307 | 1339 | ||
1308 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, | 1340 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, |
1309 | chip, &ops)) < 0) { | 1341 | chip, &ops)) < 0) { |