diff options
Diffstat (limited to 'sound/pci/ca0106')
-rw-r--r-- | sound/pci/ca0106/ca0106.h | 12 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 15 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_mixer.c | 2 |
3 files changed, 21 insertions, 8 deletions
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index ec0f17ded4e0..14b8d9a91aae 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h | |||
@@ -664,10 +664,14 @@ struct snd_ca0106_pcm { | |||
664 | struct snd_ca0106_details { | 664 | struct snd_ca0106_details { |
665 | u32 serial; | 665 | u32 serial; |
666 | char * name; | 666 | char * name; |
667 | int ac97; | 667 | int ac97; /* ac97 = 0 -> Select MIC, Line in, TAD in, AUX in. |
668 | int gpio_type; | 668 | ac97 = 1 -> Default to AC97 in. */ |
669 | int i2c_adc; | 669 | int gpio_type; /* gpio_type = 1 -> shared mic-in/line-in |
670 | int spi_dac; | 670 | gpio_type = 2 -> shared side-out/line-in. */ |
671 | int i2c_adc; /* with i2c_adc=1, the driver adds some capture volume | ||
672 | controls, phone, mic, line-in and aux. */ | ||
673 | int spi_dac; /* spi_dac=1 adds the mute switch for each analog | ||
674 | output, front, rear, etc. */ | ||
671 | }; | 675 | }; |
672 | 676 | ||
673 | // definition of the chip-specific record | 677 | // definition of the chip-specific record |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index c27fd90101d6..0e62205d4081 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -254,7 +254,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
254 | .name = "MSI K8N Diamond MB", | 254 | .name = "MSI K8N Diamond MB", |
255 | .gpio_type = 2, | 255 | .gpio_type = 2, |
256 | .i2c_adc = 1, | 256 | .i2c_adc = 1, |
257 | .spi_dac = 2 } , | 257 | .spi_dac = 1 } , |
258 | /* Shuttle XPC SD31P which has an onboard Creative Labs | 258 | /* Shuttle XPC SD31P which has an onboard Creative Labs |
259 | * Sound Blaster Live! 24-bit EAX | 259 | * Sound Blaster Live! 24-bit EAX |
260 | * high-definition 7.1 audio processor". | 260 | * high-definition 7.1 audio processor". |
@@ -305,9 +305,15 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = { | |||
305 | SNDRV_PCM_INFO_BLOCK_TRANSFER | | 305 | SNDRV_PCM_INFO_BLOCK_TRANSFER | |
306 | SNDRV_PCM_INFO_MMAP_VALID), | 306 | SNDRV_PCM_INFO_MMAP_VALID), |
307 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, | 307 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, |
308 | #if 0 /* FIXME: looks like 44.1kHz capture causes noisy output on 48kHz */ | ||
308 | .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | 309 | .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | |
309 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000), | 310 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000), |
310 | .rate_min = 44100, | 311 | .rate_min = 44100, |
312 | #else | ||
313 | .rates = (SNDRV_PCM_RATE_48000 | | ||
314 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000), | ||
315 | .rate_min = 48000, | ||
316 | #endif /* FIXME */ | ||
311 | .rate_max = 192000, | 317 | .rate_max = 192000, |
312 | .channels_min = 2, | 318 | .channels_min = 2, |
313 | .channels_max = 2, | 319 | .channels_max = 2, |
@@ -1708,6 +1714,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci, | |||
1708 | err = snd_ca0106_create(dev, card, pci, &chip); | 1714 | err = snd_ca0106_create(dev, card, pci, &chip); |
1709 | if (err < 0) | 1715 | if (err < 0) |
1710 | goto error; | 1716 | goto error; |
1717 | card->private_data = chip; | ||
1711 | 1718 | ||
1712 | for (i = 0; i < 4; i++) { | 1719 | for (i = 0; i < 4; i++) { |
1713 | err = snd_ca0106_pcm(chip, i); | 1720 | err = snd_ca0106_pcm(chip, i); |
@@ -1766,7 +1773,8 @@ static int snd_ca0106_suspend(struct pci_dev *pci, pm_message_t state) | |||
1766 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 1773 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
1767 | for (i = 0; i < 4; i++) | 1774 | for (i = 0; i < 4; i++) |
1768 | snd_pcm_suspend_all(chip->pcm[i]); | 1775 | snd_pcm_suspend_all(chip->pcm[i]); |
1769 | snd_ac97_suspend(chip->ac97); | 1776 | if (chip->details->ac97) |
1777 | snd_ac97_suspend(chip->ac97); | ||
1770 | snd_ca0106_mixer_suspend(chip); | 1778 | snd_ca0106_mixer_suspend(chip); |
1771 | 1779 | ||
1772 | ca0106_stop_chip(chip); | 1780 | ca0106_stop_chip(chip); |
@@ -1795,7 +1803,8 @@ static int snd_ca0106_resume(struct pci_dev *pci) | |||
1795 | 1803 | ||
1796 | ca0106_init_chip(chip, 1); | 1804 | ca0106_init_chip(chip, 1); |
1797 | 1805 | ||
1798 | snd_ac97_resume(chip->ac97); | 1806 | if (chip->details->ac97) |
1807 | snd_ac97_resume(chip->ac97); | ||
1799 | snd_ca0106_mixer_resume(chip); | 1808 | snd_ca0106_mixer_resume(chip); |
1800 | if (chip->details->spi_dac) { | 1809 | if (chip->details->spi_dac) { |
1801 | for (i = 0; i < ARRAY_SIZE(chip->spi_dac_reg); i++) | 1810 | for (i = 0; i < ARRAY_SIZE(chip->spi_dac_reg); i++) |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 8727881a10b8..ad2888705d2a 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -855,8 +855,8 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) | |||
855 | 855 | ||
856 | #ifdef CONFIG_PM | 856 | #ifdef CONFIG_PM |
857 | struct ca0106_vol_tbl { | 857 | struct ca0106_vol_tbl { |
858 | unsigned int reg; | ||
859 | unsigned int channel_id; | 858 | unsigned int channel_id; |
859 | unsigned int reg; | ||
860 | }; | 860 | }; |
861 | 861 | ||
862 | static struct ca0106_vol_tbl saved_volumes[NUM_SAVED_VOLUMES] = { | 862 | static struct ca0106_vol_tbl saved_volumes[NUM_SAVED_VOLUMES] = { |