[alsa-devel] [PATCH] ALSA: hda - hdmi: Re-setup pin and infoframe on plug-in on all codecs
hdmi_setup_audio_infoframe() does not set up pin and infoframe if there is no connected sink. If a sink is connected while audio playback is already in progress, the pin and infoframe will not be properly set up, causing no audio or wrongly mapped audio.
On Intel Haswell codecs the hdmi_setup_audio_infoframe() is already called again from hdmi_present_sense() when an ELD appears because transcoder:port mapping may have changed.
Make the call non-Haswell-specific so that audio will be properly set up if the playback was started before a sink was connected.
Tested on non-Haswell Intel HDMI codec by plugging sink in during playback.
Signed-off-by: Anssi Hannula anssi.hannula@iki.fi --- sound/pci/hda/patch_hdmi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 804adb8..a1fe4bb 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1462,11 +1462,12 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) pin_eld->eld_size = eld->eld_size; pin_eld->info = eld->info;
- /* Haswell-specific workaround: re-setup when the transcoder is - * changed during the stream playback + /* + * Re-setup pin and infoframe. This is needed e.g. when + * - sink is first plugged-in (infoframe is not set up if !monitor_present) + * - transcoder can change during stream playback on Haswell */ - if (is_haswell(codec) && - eld->eld_valid && !old_eld_valid && per_pin->setup) + if (eld->eld_valid && !old_eld_valid && per_pin->setup) hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); }
At Fri, 25 Oct 2013 01:45:18 +0300, Anssi Hannula wrote:
hdmi_setup_audio_infoframe() does not set up pin and infoframe if there is no connected sink. If a sink is connected while audio playback is already in progress, the pin and infoframe will not be properly set up, causing no audio or wrongly mapped audio.
On Intel Haswell codecs the hdmi_setup_audio_infoframe() is already called again from hdmi_present_sense() when an ELD appears because transcoder:port mapping may have changed.
Make the call non-Haswell-specific so that audio will be properly set up if the playback was started before a sink was connected.
Tested on non-Haswell Intel HDMI codec by plugging sink in during playback.
Signed-off-by: Anssi Hannula anssi.hannula@iki.fi
Applied this one, too. Thanks.
Takashi
sound/pci/hda/patch_hdmi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 804adb8..a1fe4bb 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1462,11 +1462,12 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) pin_eld->eld_size = eld->eld_size; pin_eld->info = eld->info;
/* Haswell-specific workaround: re-setup when the transcoder is
* changed during the stream playback
/*
* Re-setup pin and infoframe. This is needed e.g. when
* - sink is first plugged-in (infoframe is not set up if !monitor_present)
*/* - transcoder can change during stream playback on Haswell
if (is_haswell(codec) &&
eld->eld_valid && !old_eld_valid && per_pin->setup)
}if (eld->eld_valid && !old_eld_valid && per_pin->setup) hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm);
-- 1.8.1.5
participants (2)
-
Anssi Hannula
-
Takashi Iwai