Skip to content

Commit

Permalink
ALSA: hda - allow multi-channel HDMI audio playback when ELD is not p…
Browse files Browse the repository at this point in the history
…resent

The YAMAHA AV-X1800 requires audio infoframe to include speaker-channel
mapping to play >2 channel HDMI audio. In theory that mapping should be
derived from its speaker configurations contained in its ELD. However we
currently cannot get ELD in console before the KMS functionalities are ready.
This is a more or less general issue at least in the near future. As a
workaround, we propose to allow playback of mult-channel audio when ELD
is not available.

Signed-off-by: Wu Fengguang <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Wu Fengguang authored and tiwai committed Feb 11, 2009
1 parent 44a678d commit a1667e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sound/pci/hda/patch_intelhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
/*
* CA defaults to 0 for basic stereo audio
*/
if (!eld->eld_ver)
return 0;
if (!eld->spk_alloc)
return 0;
if (channels <= 2)
return 0;

/*
* 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 (!eld->spk_alloc)
eld->spk_alloc = 0xffff;

/*
* expand ELD's speaker allocation mask
*
Expand Down

0 comments on commit a1667e4

Please sign in to comment.