From c678d51bdce5c0c20f2629aa991ae4df5efd4002 Mon Sep 17 00:00:00 2001 From: Pawin Vongmasa Date: Thu, 10 May 2018 18:39:25 -0700 Subject: [PATCH] Add multichannel support Test: make vts -j123 && vts-tradefed run commandAndExit vts \ --skip-all-system-status-check \ --skip-preconditions -m VtsHalMediaOmxStoreV1_0Host \ -l INFO Bug: 69811887 Change-Id: I6ddf882d5a0d991acc8123ed6d220835fc6cce5c --- .../audio/media_audio_hidl_test_common.cpp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp index 4c68219b47..99671d4116 100644 --- a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp +++ b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp @@ -90,6 +90,51 @@ void setupPCMPort(sp omxNode, OMX_U32 portIndex, int32_t nChannels, param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; break; + case 3: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelCF; + break; + case 4: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelLR; + param.eChannelMapping[3] = OMX_AUDIO_ChannelRR; + break; + case 5: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelCF; + param.eChannelMapping[3] = OMX_AUDIO_ChannelLR; + param.eChannelMapping[4] = OMX_AUDIO_ChannelRR; + break; + case 6: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelCF; + param.eChannelMapping[3] = OMX_AUDIO_ChannelLFE; + param.eChannelMapping[4] = OMX_AUDIO_ChannelLR; + param.eChannelMapping[5] = OMX_AUDIO_ChannelRR; + break; + case 7: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelCF; + param.eChannelMapping[3] = OMX_AUDIO_ChannelLFE; + param.eChannelMapping[4] = OMX_AUDIO_ChannelLR; + param.eChannelMapping[5] = OMX_AUDIO_ChannelRR; + param.eChannelMapping[6] = OMX_AUDIO_ChannelCS; + break; + case 8: + param.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + param.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + param.eChannelMapping[2] = OMX_AUDIO_ChannelCF; + param.eChannelMapping[3] = OMX_AUDIO_ChannelLFE; + param.eChannelMapping[4] = OMX_AUDIO_ChannelLR; + param.eChannelMapping[5] = OMX_AUDIO_ChannelRR; + param.eChannelMapping[6] = OMX_AUDIO_ChannelLS; + param.eChannelMapping[7] = OMX_AUDIO_ChannelRS; + break; default: EXPECT_TRUE(false); }