Skip to content

Commit

Permalink
ALSA: hda - hdmi: Set infoframe and channel mapping even without sink
Browse files Browse the repository at this point in the history
Currently infoframe contents and channel mapping are only set when a
sink (monitor) is present.

However, this does not make much sense, since
1) We can make a very reasonable guess on CA after 18e3918 ("ALSA:
   hda - hdmi: Fallback to ALSA allocation when selecting CA") or by
   relying on a previously valid ELD (or we may be using a
   user-specified channel map).
2) Not setting infoframe contents and channel count simply means they
   are left at a possibly incorrect state - playback is still allowed
   to proceed (with missing or wrongly mapped channels).

Reasons for monitor_present being 0 include disconnected cable, video
driver issues, or codec not being spec-compliant. Note that in
actual disconnected-cable case it should not matter if these settings
are wrong as they will be re-set after jack detection, though.

Change the behavior to allow the infoframe contents and the channel
mapping to be set even without a sink/monitor, either based on the
previous valid ELD contents, if any, or based on sensible defaults
(standard channel layouts or provided custom map, sink type HDMI).

Signed-off-by: Anssi Hannula <[email protected]>
Tested-by: Stephan Raue <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
anssih authored and tiwai committed May 5, 2014
1 parent 59991da commit 561a7d6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,10 +1127,6 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
AMP_OUT_UNMUTE);

eld = &per_pin->sink_eld;
if (!eld->monitor_present) {
hdmi_set_channel_count(codec, per_pin->cvt_nid, channels);
return;
}

if (!non_pcm && per_pin->chmap_set)
ca = hdmi_manual_channel_allocation(channels, per_pin->chmap);
Expand Down

0 comments on commit 561a7d6

Please sign in to comment.