aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ca0106/ca0106_main.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-07-24 06:06:16 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:57:55 -0400
commitb18cd538a92247307247a53f57c477edbcedbb79 (patch)
tree0fd32216c26bc78f95be8b8f56052e370f7f7f43 /sound/pci/ca0106/ca0106_main.c
parent69b311a4dabc9163288be1fe993cb7db47541e67 (diff)
[ALSA] ca0106: Add analog mute controls for cards with SPI DAC
Add four mute controls for the analog output channels for cards that use an SPI DAC, like the SB0570 SB Live! 24-bit / Audigy SE. The Wolfson DAC doesn't support muting left/right so the controls are mono. The chip state struct gets a 32-byte array to act as a shadow of the spi dac registers. Only two registers are used for mute, but more would be needed for analog gain, de-emphasis, DAC power down, phase inversion, and other features. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ca0106/ca0106_main.c')
-rw-r--r--sound/pci/ca0106/ca0106_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 58ffa0cacfb1..512fda946c66 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk> 2 * Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
3 * Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit 3 * Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
4 * Version: 0.0.23 4 * Version: 0.0.24
5 * 5 *
6 * FEATURES currently supported: 6 * FEATURES currently supported:
7 * Front, Rear and Center/LFE. 7 * Front, Rear and Center/LFE.
@@ -79,6 +79,8 @@
79 * Add support for MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97. From kiksen, bug #901 79 * Add support for MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97. From kiksen, bug #901
80 * 0.0.23 80 * 0.0.23
81 * Implement support for Line-in capture on SB Live 24bit. 81 * Implement support for Line-in capture on SB Live 24bit.
82 * 0.0.24
83 * Add support for mute control on SB Live 24bit (cards w/ SPI DAC)
82 * 84 *
83 * BUGS: 85 * BUGS:
84 * Some stability problems when unloading the snd-ca0106 kernel module. 86 * Some stability problems when unloading the snd-ca0106 kernel module.
@@ -1484,8 +1486,13 @@ static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
1484 int size, n; 1486 int size, n;
1485 1487
1486 size = ARRAY_SIZE(spi_dac_init); 1488 size = ARRAY_SIZE(spi_dac_init);
1487 for (n=0; n < size; n++) 1489 for (n = 0; n < size; n++) {
1490 int reg = spi_dac_init[n] >> SPI_REG_SHIFT;
1491
1488 snd_ca0106_spi_write(chip, spi_dac_init[n]); 1492 snd_ca0106_spi_write(chip, spi_dac_init[n]);
1493 if (reg < ARRAY_SIZE(chip->spi_dac_reg))
1494 chip->spi_dac_reg[reg] = spi_dac_init[n];
1495 }
1489 } 1496 }
1490 1497
1491 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, 1498 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,