Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16173
b: refs/heads/master
c: a587515
h: refs/heads/master
i:
  16171: 4bb8c16
v: v3
  • Loading branch information
James Courtier-Dutton authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 6a305e8 commit 05342aa
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39596dc898270fcaaa8a712b63fc033f86d874cf
refs/heads/master: a5875159dd6cec0ec743971343aee8dceac281d7
1 change: 1 addition & 0 deletions trunk/sound/pci/ca0106/ca0106.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ struct snd_ca0106_details {
int ac97;
int gpio_type;
int i2c_adc;
int spi_dac;
};

// definition of the chip-specific record
Expand Down
32 changes: 32 additions & 0 deletions trunk/sound/pci/ca0106/ca0106_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,17 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
.name = "Live! 7.1 24bit [SB0413]",
.gpio_type = 1,
.i2c_adc = 1 } ,
/* New Audigy SE. Has a different DAC. */
/* SB0570:
* CTRL:CA0106-DAT
* ADC: WM8768GEDS
* DAC: WM8775EDS
*/
{ .serial = 0x100a1102,
.name = "Audigy SE [SB0570]",
.gpio_type = 1,
.i2c_adc = 1,
.spi_dac = 1 } ,
/* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */
{ .serial = 0x10091462,
.name = "MSI K8N Diamond MB [SB0438]",
Expand Down Expand Up @@ -273,6 +284,20 @@ void snd_ca0106_ptr_write(struct snd_ca0106 *emu,
spin_unlock_irqrestore(&emu->emu_lock, flags);
}

int snd_ca0106_spi_write(struct snd_ca0106 *emu,
u32 value)
{
snd_ca0106_ptr_write(emu, SPI, 0, value);
return 0;
}

int snd_ca0106_spi_read(struct snd_ca0106 *emu,
u32 *value)
{
*value = snd_ca0106_ptr_read(emu, SPI, 0);
return 0;
}

int snd_ca0106_i2c_write(struct snd_ca0106 *emu,
u32 reg,
u32 value)
Expand Down Expand Up @@ -1304,6 +1329,13 @@ static int __devinit snd_ca0106_create(struct snd_card *card,
if (chip->details->i2c_adc == 1) { /* The SB0410 and SB0413 use I2C to control ADC. */
snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */
}
if (chip->details->spi_dac == 1) { /* The SB0570 use SPI to control DAC. */
u32 tmp;
snd_ca0106_spi_write(chip, 0xf0622); /* Enable speakers output. */
snd_ca0106_spi_read(chip, &tmp); /* Read the value. */
snd_ca0106_spi_write(chip, 0xe1400);
snd_ca0106_spi_read(chip, &tmp); /* Read the value. */
}

if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
chip, &ops)) < 0) {
Expand Down

0 comments on commit 05342aa

Please sign in to comment.