summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_eld.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2011-11-16 16:29:48 +0800
committerTakashi Iwai <tiwai@suse.de>2011-11-16 10:44:58 +0100
commit2d1b439bdb3cee0ae5ccbd7f65e1e5852b1c2718 (patch)
treecafe2d6ab6fe09981468ad61c13bd22d2f8fd079 /sound/pci/hda/hda_eld.c
parent744626dada90cb1231a65b08874aa7a9f11c2ea8 (diff)
ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()
It looks more natural and saves two lines of code. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r--sound/pci/hda/hda_eld.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index a065d6d2d6f..7ae7578bdcc 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -297,6 +297,14 @@ static int hdmi_update_eld(struct hdmi_eld *e,
buf + ELD_FIXED_BYTES + mnl + 3 * i);
}
+ /*
+ * HDMI sink's ELD info cannot always be retrieved for now, e.g.
+ * in console or for audio devices. Assume the highest speakers
+ * configuration, to _not_ prohibit multi-channel audio playback.
+ */
+ if (!e->spk_alloc)
+ e->spk_alloc = 0xffff;
+
e->eld_valid = true;
return 0;