ALSA: hda - Update chmap tlv to report sink's capability
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Mon, 4 Apr 2016 13:53:54 +0000 (19:23 +0530)
committerTakashi Iwai <tiwai@suse.de>
Mon, 4 Apr 2016 14:04:24 +0000 (16:04 +0200)
commit44fde3b89ba1e154b3cec7d711703fff53852983
tree5798bfdde03fa87a7b51a1ef10cfe3ea8415040b
parenta99e31512aa435e8391ba5f5e64abeac9c5f2f32
ALSA: hda - Update chmap tlv to report sink's capability

The existing TLV callback implementation copies all of the
cea_channel_speaker_allocation map table to the TLV container
irrespective of what is reported by sink. This is of little use
to the userspace application.

With this patch, it parses the spk_alloc block as queried from
the ELD, and copies only the corresponding mapping channel
allocation entries from the cea channel speaker allocation table.
Thus the user can parse the TLV container to identify sink's
capability and set the channel map accordingly.

It shouldn't impact the behavior in AMD chipset, as this makes
use of already parsed spk alloc block to calculate the channel
map.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hda_chmap.h
sound/hda/hdmi_chmap.c
sound/pci/hda/patch_hdmi.c