summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorSumit Bhattacharya <sumitb@nvidia.com>2011-11-29 02:17:05 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-08 17:13:10 +0530
commit855e04ad25df842addc76d9f82ed4faf1c2efae1 (patch)
tree9a0da9376b6c6ba0e2f28622c1cb3ce64b04517c /sound/pci/hda/hda_intel.c
parent3dbacbbe26b577f88294e33af10caa8e5f526dec (diff)
ALSA: hda: Support disabling of clocks for Tegra
This change is basically a WAR. Tegra T30 HDA controller does not support presence detect event generateion when all HDA clocks are off. This change forcefully enables power disabling of HDA chip and clocks while not in use. As a side effect Tegra HDA driver misses the unsolicited HDMI plug in event when in power off mode. To overcome this limitation whenever user space tries to open an HDMI pcm stream Tegra HDA controller requests HDMI driver to setup presence detect registers after enabling the chip and waits until it gets valid ELD data. Bug 904530 Change-Id: I8c8cb6fe7935ba8b16c421beca68cb1d7f576212 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/66972 Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index cc32d89e8b03..973e46706cdb 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2491,6 +2491,18 @@ static int azx_resume(struct azx *chip)
if (snd_hda_codecs_inuse(chip->bus))
azx_init_chip(chip, 1);
+#if defined(CONFIG_SND_HDA_PLATFORM_DRIVER) && \
+ defined(CONFIG_SND_HDA_POWER_SAVE)
+ else if (chip->driver_type == AZX_DRIVER_NVIDIA_TEGRA) {
+ struct hda_bus *bus = chip->bus;
+ struct hda_codec *c;
+
+ list_for_each_entry(c, &bus->codec_list, list) {
+ snd_hda_power_up(c);
+ snd_hda_power_down(c);
+ }
+ }
+#endif
snd_hda_resume(chip->bus);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);