Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi channel PCM audio #29

Closed
popcornmix opened this issue Aug 7, 2013 · 5 comments
Closed

Support multi channel PCM audio #29

popcornmix opened this issue Aug 7, 2013 · 5 comments

Comments

@popcornmix
Copy link
Owner

Would be nice to support multichannel PCM output over HDMI, for example when decoding 6 channel AAC.

Requires firmware support in audio_mixer to handle arbritrary mixing of up to 8 input channels to up to 8 output channels.

@popcornmix
Copy link
Owner Author

Added in Hexxeh/rpi-firmware@ca3703d
Still needs plumbing in omxplayer.

You need to set config OMX_IndexConfigBrcmAudioDownmixCoefficients8x8 to audio_mixer.
The coeff is an array of 64 16.16 fixed point mixing coefficients.
The standard "dolby" 8 channel -> 2 channel matrix looks like:

   static const unsigned int coefficients_8[]= {
//input: FL     FR      C    LFE     SL     SR     RL     RR
      65536,     0, 46341, 46341, 46341,     0, 46341,     0,  // FL
          0, 65536, 46341, 46341,     0, 46341,     0, 46341,  // FR
          0,     0,     0,     0,     0,     0,     0,     0,  // C
          0,     0,     0,     0,     0,     0,     0,     0,  // SL
          0,     0,     0,     0,     0,     0,     0,     0,  // SR
          0,     0,     0,     0,     0,     0,     0,     0,  // LFE
          0,     0,     0,     0,     0,     0,     0,     0,  // RL
          0,     0,     0,     0,     0,     0,     0,     0,  // RR
   };

@bilditup1
Copy link

I'm glad someone's decided to pay attention to this! Thanks ppcrnmx!

@popcornmix
Copy link
Owner Author

First pass at multichannel PCM HDMI output has been pushed out.
Required updated firmware which is currently only on "next" branch.
sudo BRANCH=next rpi-update

use option "--layout 5.1" for example (2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 7.0, 7.1 are the supported options).

Testers welcome.

chinasaur pushed a commit to chinasaur/firmware that referenced this issue Aug 3, 2014
See: raspberrypi/linux#352

firmware: audioplus: avoid a race condition that can cause lost hdmi audio when pausing and unpausing too quickly

firmware: dispmanx: Correct VC_IMAGE_TRANSFORM_T to DISPMANX_TRANFORM_T where appropriate

firmware: audio: add support for arbitrary 8x8 channel mixing to be specified from host
See: popcornmix/omxplayer#29
@LukasSkywalker
Copy link

Sorry to post this here, but I wasn't able to find other contact info. Is it possible to use the current omxplayer with multichannel support in an existing OpenELEC build without recompiling the whole system?

@popcornmix
Copy link
Owner Author

Note: this github repo is for the command line omxplayer which ships with raspbian.
It is different from the omxplayer that is part of xbmc.

But, multichannel PCM is supported out of the box with xbmx (and so with OpenELEC).
Just set number of channels appropriately (e.g. to 5.1 or 7.1) and play a multichannel file.

Further questions are best directed here: http://forum.kodi.tv/forumdisplay.php?fid=166

neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi/linux#352

firmware: audioplus: avoid a race condition that can cause lost hdmi audio when pausing and unpausing too quickly

firmware: dispmanx: Correct VC_IMAGE_TRANSFORM_T to DISPMANX_TRANFORM_T where appropriate

firmware: audio: add support for arbitrary 8x8 channel mixing to be specified from host
See: popcornmix/omxplayer#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants