]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/ca0106/ca0106_main.c
Merge branch 'topic/ca0106-spdif-stream' into topic/ca0106
[linux-2.6-omap-h63xx.git] / sound / pci / ca0106 / ca0106_main.c
index c27fd90101d6651ab0ddfe8d0431ad95b9e6e7d0..0e62205d4081d3da96606c9b48f7b568d221f7ca 100644 (file)
@@ -254,7 +254,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
           .name   = "MSI K8N Diamond MB",
           .gpio_type = 2,
           .i2c_adc = 1,
-          .spi_dac = 2 } ,
+          .spi_dac = 1 } ,
         /* Shuttle XPC SD31P which has an onboard Creative Labs
          * Sound Blaster Live! 24-bit EAX
          * high-definition 7.1 audio processor".
@@ -305,9 +305,15 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = {
                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
                                 SNDRV_PCM_INFO_MMAP_VALID),
        .formats =              SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
+#if 0 /* FIXME: looks like 44.1kHz capture causes noisy output on 48kHz */
        .rates =                (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
                                 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000),
        .rate_min =             44100,
+#else
+       .rates =                (SNDRV_PCM_RATE_48000 |
+                                SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000),
+       .rate_min =             48000,
+#endif /* FIXME */
        .rate_max =             192000,
        .channels_min =         2,
        .channels_max =         2,
@@ -1708,6 +1714,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
        err = snd_ca0106_create(dev, card, pci, &chip);
        if (err < 0)
                goto error;
+       card->private_data = chip;
 
        for (i = 0; i < 4; i++) {
                err = snd_ca0106_pcm(chip, i);
@@ -1766,7 +1773,8 @@ static int snd_ca0106_suspend(struct pci_dev *pci, pm_message_t state)
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
        for (i = 0; i < 4; i++)
                snd_pcm_suspend_all(chip->pcm[i]);
-       snd_ac97_suspend(chip->ac97);
+       if (chip->details->ac97)
+               snd_ac97_suspend(chip->ac97);
        snd_ca0106_mixer_suspend(chip);
 
        ca0106_stop_chip(chip);
@@ -1795,7 +1803,8 @@ static int snd_ca0106_resume(struct pci_dev *pci)
 
        ca0106_init_chip(chip, 1);
 
-       snd_ac97_resume(chip->ac97);
+       if (chip->details->ac97)
+               snd_ac97_resume(chip->ac97);
        snd_ca0106_mixer_resume(chip);
        if (chip->details->spi_dac) {
                for (i = 0; i < ARRAY_SIZE(chip->spi_dac_reg); i++)