Add channel map for hdmi audio, originally it is in
audio info frame function, but removed by
commit
6b97462b6407 ("MLK-18690-3: hdp api: Remove
info frame API function")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
frame.channels = channels;
frame.coding_type = HDMI_AUDIO_CODING_TYPE_STREAM;
+ if (channels == 2)
+ frame.channel_allocation = 0;
+ else if (channels == 4)
+ frame.channel_allocation = 0x3;
+ else if (channels == 8)
+ frame.channel_allocation = 0x13;
+
ret = hdmi_audio_infoframe_pack(&frame, buf + 1, sizeof(buf) - 1);
if (ret < 0) {
DRM_ERROR("failed to pack audio infoframe: %d\n", ret);