From: Takashi Iwai Date: Tue, 11 Jan 2011 17:07:14 +0000 (+0100) Subject: ALSA: hda - Don't refer ELD when unplugged X-Git-Tag: next-20110726~34^2~309^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6e15865f87e8f9973e02cd536b7a49cba6d11d69;p=karo-tx-linux.git ALSA: hda - Don't refer ELD when unplugged When unplugged, we shouldn't refer to ELD information for PCM open any more. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d1b1b5796c98..27e8597f66ad 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -827,7 +827,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, *codec_pars = *hinfo; eld = &spec->sink_eld[idx]; - if (eld->sad_count > 0) { + if (eld->eld_valid && eld->sad_count > 0) { hdmi_eld_update_pcm_info(eld, hinfo, codec_pars); if (hinfo->channels_min > hinfo->channels_max || !hinfo->rates || !hinfo->formats)