This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP4 HDMI Sound Channels remap

I have a custom omap4 board (motorola droid 4) running latest kitkat and because I lack the dolby/dts decoder I'm using the ffmpeg to decode the sound in LPCM format but the channel order is not correct. the LFE is swapped with Center

the audio policy is

  hdmi {
    outputs {
      stereo {
        sampling_rates 44100|48000
        channel_masks AUDIO_CHANNEL_OUT_STEREO
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_OUT_AUX_DIGITAL
      }
      multichannel {
        sampling_rates 44100|48000
        channel_masks dynamic
        formats AUDIO_FORMAT_PCM_16_BIT
        devices AUDIO_DEVICE_OUT_AUX_DIGITAL
        flags AUDIO_OUTPUT_FLAG_DIRECT
      }
    }
  }


where should I look for the changes ?

tried to modify hdmi_audio_hal.h

/* Speaker allocation bits */
#define CEA_SPKR_FLFR   (1 << 0)
#define CEA_SPKR_LFE    (1 << 1)
#define CEA_SPKR_FC     (1 << 2)
#define CEA_SPKR_RLRR   (1 << 3)
#define CEA_SPKR_RC     (1 << 4)
#define CEA_SPKR_FLCFRC (1 << 5)
#define CEA_SPKR_RLCRRC (1 << 6)

or in hdmi_audio_hw.c

#define MASK_CEA_QUAD     ( CEA_SPKR_FLFR | CEA_SPKR_RLRR )
#define MASK_CEA_SURROUND ( CEA_SPKR_FLFR | CEA_SPKR_FC | CEA_SPKR_RC )
#define MASK_CEA_5POINT1  ( CEA_SPKR_FLFR | CEA_SPKR_FC | CEA_SPKR_LFE | CEA_SPKR_RLRR )
#define MASK_CEA_7POINT1  ( CEA_SPKR_FLFR | CEA_SPKR_FC | CEA_SPKR_LFE | CEA_SPKR_RLRR | CEA_SPKR_RLCRRC )
#define SUPPORTS_ARR(spkalloc, profile) (((spkalloc) & (profile)) == (profile))

but is not working

is this a kernel setting or an android one ?

Regards

Lucian