Posts by REXus

    So this is another option. It all depends on what you need - in my case, Raspberry Pi is connected to TV via HDMI, and TV via Toslink to speakers; also HiFi-Berry is connected to same speakers via analog input. In your configuration I should care about selected input on speakers, in my (or rather @HiassofT's) it only matters when TV is off.

    And yes, there is a next step - to add IR led and send commands to speakers depending on what type of media is actually played. At this moment my Raspberry controls relays powering speakers and game console, depending on TV and playing status.

    I had no idea that name of soundcard with empty parenthesis could be this. IT WORKS :) Thank you for your help.

    I hope some update won't break this :)

    For now I'll stay with your configuration (2x stereo), but I see the point of problem. Maybe I'll change it in the future, but for now... most 5.1 video files works in passthrough mode.

    Definitely your configration is better than mine - it shows in aplay :) but Kodi doesn't show "both" device. You don't have ctl.both - is that correct (I'm a total noob in ALSA things, but even in some guide I've found in Internet they adviced to add that lines without explanation)?

    One more question. You have configured my both devices as stereo. Of course, when video player will be using passthrough mode it doesn't matter, but what if software decoding of 5.1 will be nessesery?

    I've already read about this and probably I'll try it. But 1) this is unofficial build, with unofficial problems and unknown future 2) all I need is to clone audio to two sound cards (no separate config etc.) which can (?) be done by ALSA - so if it is possible, I would prefer to do it this way. Or maybe there are some diffrences in ALSA configuration in LE, so another build is nessesery?

    tl;dr, solution is HERE. Original thread below.

    I returned back to Raspberry Pi 3 and want to have two sound outputs: HDMI (for watching movies) and HiFi-Berry Analog (for listening music, when TV is off). Some time ago I've configured it to output same sound (best posibility for my configuration) on OSMC by adding following configuration (but, unfortunately, OSMC overwritted asound.conf with every update):

    That created virtual sound card which could be selected in Kodi settings. It worked fine - passthrough worked only via HDMI, PCM worked via both outputs. But when I've added this to /storage/.config/asound.conf - nothing happened. No new device is deceted neither by Kodi nor ALSA.

    What am I doing wrong?

    I have even older LG TV - before smart TV era. But it works well (which is good information for all LG TV owners) and I don't want to change it. So this is not an option.

    About grabbers and splitters - well, grabber can be not as expensive. Splitter - probably will be problematic (and expensive too), if I want to use HDMI CEC.

    Not so fast. As mentioned, chewitt also has a C2, so stay tuned until he did some testings.

    I'm not throwing away this board and I'll be very happy to hear it work :) but at this moment I see no benefit over Raspberry Pi (where sound works) - boblight has same problems, secondary sound output has unknown status (for Raspberry Pi I have HiFi-Berry, which sounds great, and the only problem is to configure system to stream sound via two sound cards at the same time - I have done it on OSMC, but it stopped to work with some update, and simply copying my configuration to LibreELEC doesn't work too).

    external HDMI grabber

    You mean HDMI splitter + some USB dongle to capture HDMI video? That would be very expensive soultion. Or there is some cheap dedicated stuff?...

    Devices that run GBM/DRMPRIME graphics do not support software grabbers

    Do any of supported by LibreELEC single board computers support hardware decoding with software grabbers?

    And, from Hyperion Github:

    Quote

    There is an outstanding Kodi fix for that.

    Now I understand how much that mean :)

    It looks like it is the end of my Odroid C2 tests as multimedia center. Working boblight was my mistake, 5.1 sound won't work for me and additional SPDIF output is probably much more complicated than described in their website.

    Is there a way to get boblight working with hardware decoding (platforms I'm testing are Odroid C2, Raspberry Pi 3 and 4)?

    It has to work fine on OSMC some time ago, and stopped with some update. Now I want to run my multimedia center with all features, and one of them is Amblone instalation, serviced by Boblightd on Linux. This part works fine. Problem is with playing videos (the most important thing) - when I enable DRM PRIME hardware acceleration, boblight doesn't work. When I disable DRM - boblight works fine, but performance is very poor (as the video is decoded by software). I guess the problem is with DRM (some protection that avoid boblight to get image), because some time ago Kodi didn't support that (I don't know if it stopped working with version that came with DRM support, but it is possible).

    Is there any way to get it both (Boblight AND hardware decoding)?

    Can you please go back to chewitt build, activate debug logging, replicate the issue, and post a link to the log?

    I'm curious whether the missing data formats are available on that build:

    • AE_FMT_S24NE3
    • AE_FMT_S32NE
    • AE_FMT_S16BE
    • AE_FMT_U8

    Tomorrow. But probably everything is exactly the same.

    The only explanation that makes sense to me is that there's something off with the EDID data on your HDMI connection.

    TV is over 10 years old, so it is possible. Question is - why everything is OK on Raspberry Pi? Pi HDMI driver does some workaround and I can expect that with some update it will be broken too?

    Multi-channel output depends on the ELD data read from EDID/HDMI and the usual "but it works in the legacy image!" claim means little due to a) the upstream codebase being 100% different, and b) the amount of hideous stuff the legacy kernel ignores/overrides/fakes to work around TVs and monitors that provide bad/broken EDID data.

    Probably this is the problem - drivers on Odroid can't "talk" to my TV - either because bad data from TV or some bugs within them.

    For another test I've installed last LibreELEC on Raspberry Pi 3 and again - it worked out of the box. Log (for comparison) is here. So - drivers on Raspberry Pi recognize (or do some workaround?) my TV properly. What was surprise to me - boblight is working too (not worked on OSMC), but only with DRM PRIME disabled (what disables hardware decoding too X( ).

    Maybe I sould stay on Raspberry Pi 3... or give a try with Raspberry Pi 4. More testing needed :-/

    You mean output channels in Kodi System settings? I've tried 5.1 and 2.0 with same result. At this moment it is 5.1.

    I've tested it without TV connected (rebooted board after disconnecting HDMI). Same result - speaker-test recognizes only stereo channels.

    Why bother about cables and receivers (which work with another source), when system don't even try to output 5.1?

    I know what LE works, and after experiences with OSMC I think it's pretty good idea.

    If problem is local to me, then only thing I haven't checked is situation where system check what is connected to HDMI and configures sound device to use TV capabilities (don't know if that's even possible). Well, maybe I have to disconnect Odroid C2 from TV and reboot it. Cables, ports, TV and speakers are good, beause it worked well with Raspberry Pi and OSMC (where eg. Boblight doesn't work - on Odroid C2 and LibreELEC Boblight works fine). Problem with software (or drivers) is shown by speaker-test (only two channels detected).

    Here is an output from Raspberry Pi (well, this one is not connected to any TV):

    All channels are detected (I should connect it to something to check if it really works).

    Why more people don't complain? I don't know, but how many of them are using 5.1 sound configuration (stereo runs out of the box)? More, how many of them can hear the diffrence between passthrough sound and stereo streched to 5.1 by speakers (what my speakers is doing by now and it sounds... well, not bad, but it's definitely not DTS 5.1)? Maybe I'm the first one who wants clear sound on this board :/

    I don't know - format used in Raspberry Pi is present on Odroid too.

    I've tried many configuations in /storage/.config/asound.conf - without success. Trying to force more than 2 channels causing speaker-test not working anymore.

    Maybe this could be another clue - error during reloading ALSA configuration (seems to be kind of bug/issue in LibreELEC):

    Code
    Kodi:~ # alsactl restore
    alsactl: load_state:1689: Cannot open /var/lib/alsa/asound.state for reading: No such file or directory
    alsa-lib /build/build.LibreELEC-AMLGX.arm-11.0.3/build/alsa-lib-1.2.8/src/ucm/main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
    Found hardware: "gx-sound-card" "" "" "" ""
    Hardware is initialized using a generic method

    Well, at this point - no, it don't look OK. I understand difference between passthrough (where both channels are RAW) and PCM output (where you should have one PCM track for each channel). In passthrough mode my problem is with frames (whatever it means - and, what is more important, how to change it), in PCM mode problem is with system configuration.

    If everything would work OK, then I could test my speakers with speaker-test, and hear noise from every speaker, repeatly. What is happening? Well...

    ... yes, again, it works in stereo mode. Four unknown channels gives no sound. The question is: how to change channel number/mapping to make it work? I don't have much ALSA knowledge, so everything I try is copying/mixing what I've found in Internet.

    Well, I've tried another cable, but with same result.

    Here is log with passthrough disabled - when I get stereo output. Frames is 2400, but channel layout seems to be uncofigured. Any way to change this (and, maybe, it same place where frames number can be changed)?

    Code
    2023-08-23 18:16:42.274 T:809     debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
    2023-08-23 18:16:42.274 T:809     debug <general>:   Output Device : ODROID-C2
    2023-08-23 18:16:42.274 T:809     debug <general>:   Sample Rate   : 48000
    2023-08-23 18:16:42.274 T:809     debug <general>:   Sample Format : AE_FMT_S24NE4
    2023-08-23 18:16:42.274 T:809     debug <general>:   Channel Count : 8
    2023-08-23 18:16:42.274 T:809     debug <general>:   Channel Layout: FL, FR, UNKNOWN1, UNKNOWN1, UNKNOWN1, UNKNOWN1, UNKNOWN1, UNKNOWN1
    2023-08-23 18:16:42.274 T:809     debug <general>:   Frames        : 2400
    2023-08-23 18:16:42.274 T:809     debug <general>:   Frame Size    : 32