]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
ALSA: hda: HDMI channel allocations for audio infoframe
authorWu Fengguang <wfg@linux.intel.com>
Wed, 19 Nov 2008 00:56:17 +0000 (08:56 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Nov 2008 06:35:36 +0000 (07:35 +0100)
commit698544de8a31a7cadc26c27cbaa69ae82dd4f86c
tree6a12a06f9fa95af1ef1ad94eb1db59dac453a683
parent903b21d8b7bb49d3438abdd7b9d4145511e1cba2
ALSA: hda: HDMI channel allocations for audio infoframe

To play a 3+ channels LPCM/DSD stream via HDMI,

- HDMI sink must tell HDMI source about its speaker placements
  (via ELD, speaker-allocation field)
- HDMI source must tell the HDMI sink about channel allocation
  (via audio infoframe, channel-allocation field)

(related docs: HDMI 1.3a spec section 7.4, CEA-861-D section 7.5.3 and 6.6)

This patch attempts to set the CA(channel-allocation) byte in the audio infoframe
according to
- the number of channels in the current stream
- the speakers attached to the HDMI sink

A channel_allocations[] line must meet the following two criteria to be
considered as a valid candidate for CA:
1) its number of allocated channels = substream->runtime->channels
2) its speakers are a subset of the available ones on the sink side

If there are multiple candidates, the first one is selected.  This simple
policy shall cheat the sink into playing music, but may direct data to the
wrong speakers.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_intelhdmi.c