Posts by chewitt

    If you write viable u-boot to eMMC the box is hard-wired to boot from that always; same is true for both vendor u-boot in Android and the upstream u-boot in the LE image. Thus no image can "boot from SD when inserted" .. although since u-boot is generally configured to use boot files (aligned to that version of u-boot) on SD card if present, users can be forgiven for being factually incorrect.

    Android u-boot on eMMC:

    - Can find the legacy LE image on SD card image and use it

    - Can find the upstream LE image on SD card and use it

    Upstream u-boot on eMMC:

    - Can find the upstream LE image on SD card and use it

    - Cannot find the legacy LE image

    So if the goal is to use the 11.0.3 image both Android/vendor and upstream u-boot can boot (from eMMC) and find an SD card image. I'm just not sure what you achieve booting 11.0.3 from SD over eMMC .. it just runs marginally slower from SD.

    I'm done with this thread.

    Raspberry Pi 3B and an Amlogic S905 board are not based on the same silicon and their different drivers expose different packing techniques aka 'data formats' to achieve IEC958 output; the key thing is that they support IEC958 output. The upstream Amlogic drivers are not as mature as they could be (not on the same level as RPi) but I dug out a C2 board and tested it with the same AVR port/cable as the WP2 and both are giving me multi-channel PCM and PT output with a range of media.

    The one difference I think can see between my config and yours is that I have "adjust refresh" enabled and the mode whitelist configured for 1080p @ 60/59.94/50/24/23.976 modes and rate doubling (30/29.97/25 are deliberately omitted so interlaced media works). Your AVR is offering the same so perhaps try that.

    Code
    2023-08-16 17:39:46.444 T:1079     info <general>: CAEStreamParser::SyncDTS - dts stream detected (6 channels, 48000Hz, 16bit BE, period: 512, syncword: 0x7ffe8001, target rate: 0x18, framesize 2012))
    2023-08-16 17:39:46.444 T:1079     info <general>: Creating audio stream (codec id: 86020, channels: 6, sample rate: 48000, pass-through)

    ^ shows that a DTS stream with 5.1 channels is found, and PT is enabled.

    Code
    2023-08-16 17:39:46.656 T:808     debug <general>: CActiveAESink::OpenSink - trying to open device ALSA:hdmi:CARD=ODROIDC2,DEV=0
    2023-08-16 17:39:46.656 T:808      info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=ODROIDC2,DEV=0"
    2023-08-16 17:39:46.670 T:808      info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=ODROIDC2,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02"

    ^ shows that the HDMI device is opened.

    ^ shows two RAW channels are opened for playback (which is correct for PT mode) and the sink is opened. The HDMI spec requires the audio to be encoded for transmission as a 'stereo' bearer signal. If Kodi is configured for PCM (no PT) output you need to set the speaker config so we can decode and re-encode 5.1 for a 5.1 layout, or perhaps decode and downmix 5.1 to 2.0 or 2.1. If Kodi is configured for PT audio then we decode the stream to detect what it is, but then use that knowledge to not modify/re-encode the original bitstream (passing it though) in the original encoded stereo format. Different HDMI specs alter how the encoding is done, but even ATMOS is still transmitted as (a more complex encoded) stereo signal.

    In short, I'm not seeing anything wrong or different from the WP2 board that I have connected here /shrug

    NB: The Pulseaudio comment from Da Flex can be ignored. This message is normal on all LE installs; we do not enable Pulse with PT support since we only use Pulse for Bluetooth audio which does not support PT modes.

    In post #1 you state "Booted into Libreelec 11.0.3 from the card."

    In reality the box booted vendor u-boot from eMMC (as S905 silicon is hard-coded to look for boot firmware on eMMC first and it existed via the factory image, so it did boot it) but then LE11 was found and loaded from the SD card, thus proving that the SD card slot works, and much like the Hub .. you just need to feed it the right software.

    If you have written the LE11 board image to eMMC it will now be booting upstream u-boot (not vendor) which uses different boot files/config but the boot flow remains the same; silicon checks eMMC first and if it finds boot firmware it runs it regardless of what's on the SD card. If you want to force the box to boot from SD card the only way is either a) erasing eMMC (or the first few MB) so that u-boot is not discoverable on eMMC, or b) using a special HDMI dongle (as mentioned in the other thread). Assuming A which is easier: If silicon (BL1 in the boot chain) cannot find boot firmware (BL2) on eMMC *then* it will check for a correctly structured SD card for boot firmware. Correctly structured means magic headers at specific disk sectors, the BL1 bootrom has no ability to look for files in partitions/filesystems.

    At this stage if you put the "board" image on an SD card, the box will boot u-boot from eMMC, which will then find the LE boot files on SD and boot them (upstream u-boot has logic to check SD and USB for boot files first). If you put the "box" image on SD the same might happen too. In either case, eMMC is not "active" after the initial u-boot step and can be safely overwritten from userspace using emmctool and you choice of software: either the "backup-wp2.img.gz" file (to restore the factory image) or perhaps the LE11 image again. It is unusual that the /storage partition resize failed .. but it's not the end of the world. You can fix this at any time by running "touch /storage/.please_resize_me && reboot" .. and on reboot the partition will be erased and recreated using 100% of the remaining space on disk.

    NB: Upstream u-boot doesn't map the power button or reset button to have any boot-level functions, but that's not particularly important if you understand the (different from vendor u-boot) boot flow.

    I haven't tested with a C2 board for a while, but a quick test with a WeTek Play2 (also GXBB, identical in software) and HDMI pass-through seems to work fine here (AVR shows DTS correctly). NB: If you want multi-channel PCM output (PT disabled) you'll need to set the speaker layout in Kodi to 5.1 or 7.1 etc. else it will be 2.0 (default).

    Code
    if dbus_dep.found() and fftw_dep.found()                                                  
      all_modules += [                                                                        
        [ 'module-equalizer-sink', 'module-equalizer-sink.c', [], [], [dbus_dep, fftw_dep, libm_dep] ],
      ]                                                                                       
    endif

    ^ from PulseAudio meson.build file. The equalizer sink is only built when FFTW is present: https://www.fftw.org/download.html

    I wouldn't attempt to do this as a separate plugin.. You'd just custom built and image with FFTW added and then Pulse should find it and build itself with the equaliser module included, and then the Kodi GUI add-on has something to configure. Sounds simple enough but there's likely a little more to the actual 'doing' of it :)

    Code
    RPi4:~ # date
    Tue Aug 15 11:17:41 +04 2023
    RPi4:~ # connmanctl clock
      Time = 1692083766
      TimeUpdates = auto
      Timezone = Asia/Dubai
      TimezoneUpdates = auto
      Timeservers = [  ]
      TimeserverSynced = True

    Have you forced/set the list of NTP servers? .. we use pool.ntp.org by default ^ so there should be no need to set anything.