diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-07 09:58:39 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-07 10:52:50 (GMT) |
commit | 785f857d1cb0856b612b46a0545b74aa2596e44a (patch) | |
tree | dc7d18889a15f5dd835fa466ba95cfd9ce0a3c6c /sound/pci/hda/hda_intel.c | |
parent | 546bb6785265f3413fa76e06b9fdce58ee15ea87 (diff) | |
download | linux-fsl-qoriq-785f857d1cb0856b612b46a0545b74aa2596e44a.tar.xz |
ALSA: hda - Set codec to D3 forcibly even if not used
We've seen a problem with a pop-noise at suspend/resume on a HP
machine with ALC269, and it turned out to be an issue that the
controller going to D3 while the codec is unused.
When the device is once suspended and resumed and kept unused, the
driver doesn't initialize the codecs. Instead, the codec chips are
set up dynamically at the first usage. Now, suppose the device going
to suspend again before the codec is set up. The controller is turned
off to D3 while the codec chips are untouched. This caused a pop
noise because the codec chip might have been turned on implicitly by
the hardware.
As a workaround, the codec chip needs to be set to D3 when going to
suspend no matter whether it was used or not. Also, for making it
happening, the controller has to be always set up in the resume path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6e958bf..c19e71a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2351,17 +2351,6 @@ static void azx_power_notify(struct hda_bus *bus) * power management */ -static int snd_hda_codecs_inuse(struct hda_bus *bus) -{ - struct hda_codec *codec; - - list_for_each_entry(codec, &bus->codec_list, list) { - if (snd_hda_codec_needs_resume(codec)) - return 1; - } - return 0; -} - static int azx_suspend(struct pci_dev *pci, pm_message_t state) { struct snd_card *card = pci_get_drvdata(pci); @@ -2408,8 +2397,7 @@ static int azx_resume(struct pci_dev *pci) return -EIO; azx_init_pci(chip); - if (snd_hda_codecs_inuse(chip->bus)) - azx_init_chip(chip, 1); + azx_init_chip(chip, 1); snd_hda_resume(chip->bus); snd_power_change_state(card, SNDRV_CTL_POWER_D0); |