From: Takashi Iwai Date: Sat, 20 Dec 2008 08:42:09 +0000 (+0100) Subject: ALSA: ca0106 - Check ac97 availability at PM X-Git-Tag: v2.6.29-rc1~590^2~9^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50232d62cace101e03f8f40ca151b978c0db5a0d;p=profile%2Fivi%2Fkernel-x86-ivi.git ALSA: ca0106 - Check ac97 availability at PM Check the availability of ac97 at PM suspend/resume callbacks. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 2c71f9b..e01ecd3 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -1752,7 +1752,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); @@ -1781,7 +1782,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++)