Skip to content

Commit

Permalink
intelhdmi - dont power off HDA link
Browse files Browse the repository at this point in the history
For codecs without EPSS support (G45/IbexPeak), the hotplug event will
be lost if the HDA is powered off during the time. After that the pin
presence detection verb returns inaccurate info.

So always power-on HDA link for !EPSS codecs.

KarL offers the fact and Takashi recommends to flag hda_bus. Thanks!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Wu Fengguang authored and Takashi Iwai committed Dec 11, 2009
1 parent b14224b commit 0287d97
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ struct hda_bus {
unsigned int rirb_error:1; /* error in codec communication */
unsigned int response_reset:1; /* controller was reset */
unsigned int in_reset:1; /* during reset operation */
unsigned int power_keep_link_on:1; /* don't power off HDA link */
};

/*
Expand Down
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,8 @@ static void azx_power_notify(struct hda_bus *bus)
}
if (power_on)
azx_init_chip(chip);
else if (chip->running && power_save_controller)
else if (chip->running && power_save_controller &&
!bus->power_keep_link_on)
azx_stop_chip(chip);
}
#endif /* CONFIG_SND_HDA_POWER_SAVE */
Expand Down
11 changes: 11 additions & 0 deletions sound/pci/hda/patch_intelhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,17 @@ static int intel_hdmi_parse_codec(struct hda_codec *codec)
}
}

/*
* G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event
* can be lost and presence sense verb will become inaccurate if the
* HDA link is powered off at hot plug or hw initialization time.
*/
#ifdef CONFIG_SND_HDA_POWER_SAVE
if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
AC_PWRST_EPSS))
codec->bus->power_keep_link_on = 1;
#endif

return 0;
}

Expand Down

0 comments on commit 0287d97

Please sign in to comment.