summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c12
-rw-r--r--sound/pci/hda/patch_hdmi.c32
2 files changed, 42 insertions, 2 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);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index e968cc9cbf31..b03efbc17132 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -870,6 +870,34 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
hinfo->formats = per_cvt->formats;
hinfo->maxbps = per_cvt->maxbps;
+#ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA
+ if ((codec->preset->id == 0x10de0020) &&
+ (!eld->eld_valid || !eld->sad_count)) {
+ int err = 0;
+ unsigned long timeout;
+
+ if (!eld->eld_valid) {
+ err = tegra_hdmi_setup_hda_presence();
+ if (err < 0) {
+ snd_printk(KERN_WARNING
+ "HDMI: No HDMI device connected\n");
+ return -ENODEV;
+ }
+ }
+
+ timeout = jiffies + msecs_to_jiffies(5000);
+ for (;;) {
+ if (eld->eld_valid && eld->sad_count)
+ break;
+
+ if (time_after(jiffies, timeout))
+ break;
+
+ mdelay(10);
+ }
+ }
+#endif
+
/* Restrict capabilities by ELD if this isn't disabled */
if (!static_hdmi_pcm && eld->eld_valid) {
snd_hdmi_eld_update_pcm_info(eld, hinfo);
@@ -1062,8 +1090,8 @@ static int hdmi_parse_codec(struct hda_codec *codec)
* 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))
+ if ((!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
+ AC_PWRST_EPSS)) && (codec->preset->id != 0x10de0020))
codec->bus->power_keep_link_on = 1;
#endif