Skip to content

alsa: multichannel PCM unsupported #1000

Open

Description

Apparently this doesn't work yet. If I interpret this correctly, there is no kernel support for this yet. If I force ALSA to output more than 2 channels, none of them seem to arrive at the receiver either (unfortunately my receiver doesn't show the PCM format it gets).

I wonder what the 8 sub devices are for?

Activity

  1. popcornmix commented on Jun 2, 2015

    @popcornmix
    Collaborator

    The 8 sub devices allow up to 8 processes to output audio simultaneously (and they get mixed together by GPU).

    @julianscheel didn't you get multichannel alsa working? It may be as simple as rebuilding alsa driver to report 8 channels as the maximum.

  2. julianscheel commented on Jun 3, 2015

    @julianscheel
    Contributor

    @popcornmix I did not try PCM multichannel so far. What I was doing is being able to use HDMI and analog output in parallel from different substreams (#847) - I never cleaned that code up to push it, though :( - I hope I'll find some time to do it.
    Unfortunately I don't even have any >2 channel HDMI audio receiver, so I can't test that.

  3. popcornmix commented on Jun 3, 2015

    @popcornmix
    Collaborator

    Yes, please do. It might just work (apart from channel mapping). I did add support for multichannel to the firmware side a while back, but without anyone actively testing it, it wasn't enabled in kernel driver.

    If you know how the channel mapping is meant to be passed from alsa userland -> alsa driver then I suspect I can support that (you can adjust channel mapping though a vcgencmd, but a standard way would be better).

  4. popcornmix commented on Jun 5, 2015

    @popcornmix
    Collaborator

    DTS-HD passthrough also almost works. I just had to raise the max. channel count to 8, and the max. samplerate to 192000 in the spdif device.

    Are you saying you have had HD audio successfully play through HDMI on Pi? I can play 192kHz 8 channel PCM but I believe we drop samples at that rate. Any attempt at passthrough fails to lock on.
    (Although there was a firmware tweak to the fifo settings a couple of weeks back that could have helped).

  5. popcornmix commented on Jun 5, 2015

    @popcornmix
    Collaborator

    If nobody else does, I might attempt to give it a try.

    If you can plumb in the support into kernel driver, then I can problably help on the firmware side.
    I could add a new method to audioservice (e.g. VC_AUDIO_MSG_TYPE_CHANNELMAP) that takes a parameter like the vcgencmd hdmi_channel_map.

    In theory the edid can be read (tvservice -d edid.dat) and the firmware does parse this so could provide it through other means. I believe that in general edid information is not considered reliable enough to used by default. We used to automatically choose passthrough options in Kodi based on edid, but have since made this purely a user selectable option as there are just too many bad edids out there (Kodi doesn't trust the edid on windows/linux platforms either).

  6. popcornmix commented on Jun 5, 2015

    @popcornmix
    Collaborator

    @wm4 Let me know how you were playing the file (perhaps point at the file you used and commands used to play it) and I'll see if I get the same results here (I've got a Yahama receiver at work and an Onkyo at home).

    Before the recent fifo tweaks we found some receivers played stereo 192kHz audio perfectly, but some suffered from dropouts. You might imagine either we are outputting valid data or we weren't but it seems the real answer is more complicated.

    What receiver are you using? It possibly is more tolerant than mine.

  7. popcornmix commented on Jun 8, 2015

    @popcornmix
    Collaborator

    I've never got DTS-HD passthrough working. I'd be very interested if you do actually get audio out, but I suspect it may not be possible.
    Whilst an 8channel 192kHz wav file can almost be played, I suspect if you listen carefully to a sine wave you will hear the odd glitch.
    The hardware wasn't really designed for this data rate. I believe 192kHz stereo is perfect and 48kHz 8 channel is perfect, but 192kHz 8 channel does drop the odd sample.

  8. 49 remaining items

  9. keylimesoda commented on Jan 4, 2016

    @keylimesoda

    It looks like @wm4 has closed his private repo. Changes can now be reviewed (along with further discussion) on the pull request here:

    #1166

  10. keylimesoda commented on Jan 4, 2016

    @keylimesoda

    Old links were 404 on me. Looks like you changed the name slightly.

    Is this the correct link now?

    https://github.com/wm4/linux/tree/multichannel_pcm2

  11. Ruffio commented on Aug 16, 2016

    @Ruffio

    @wm4 has your issue been resolved? If so, please close this issue. Thanks.

  12. keylimesoda commented on Sep 2, 2016

    @keylimesoda

    @Ruffio PR is here: #1257

  13. clivem commented on Sep 2, 2016

    @clivem

    The patches in #1257 were applied then reverted. They caused more problems than they solved.......

  14. shalnoff commented on Jan 6, 2017

    @shalnoff

    is it still pending?

  15. piques commented on Jan 27, 2017

    @piques

    Hi, does the A52 alsa plugin work on the RPi3?

    Any help is appreciated. Sorry for being off-topic, I thought the folks here have RPis and multi-channel and this would be a good place to ask. I can create a new issue and I also posted about this here. Thank you.

  16. TheBigW commented on Apr 24, 2017

    @TheBigW

    no it seems it doesn't :(. I just tested on my fresh updated raspbian installation with speaker-test for 6 channels. It abords with an error:

    ALSA lib conf.c:4705:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}

    I would really need this for a room correction setup with osmc using brutefir ... now I probably need to consider different hardware even though the raspi is great for htpc use. I still use it for music playback.

  17. JamesH65 commented on May 18, 2017

    @JamesH65
    Contributor

    Seems to still be valid - @popcornmix Any thoughts?

  18. added
    Waiting for internal comment
    on May 18, 2017
  19. MarcoRavich commented on Dec 15, 2020

    @MarcoRavich

    Hi everyone, dunno if this can help to solve the problem, but seems this guy done some kernel hacks to get multichannel work: https://www.instructables.com/Raspberry-Pi-Music-Server-With-Built-in-Crossover-/

    His GH here: https://github.com/jrubinstein/raspiDSP

    Hope that helps/inspires !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Waiting for internal commentconfirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions