Posts by chewitt

    The only way to ensure something 100% boots from SD is to erase eMMC (preventing eMMC boot) or to use the special HDMI dongles that force different BL1 (silicon bootrom) boot priority. However, for reflash of eMMC you only need to ensure that the kernel is running from SD card. The initial u-boot stage from eMMC and then discovery and boot of kernel and userspace files on SD is fine since the binaries that run are on the SD card. If you attempt to flash eMMC when booted from eMMC it will start and the lock-up when you overwrite the apps that you are using to perform the flash.

    Code
    [   52.388210] sd 1:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=DRIVER_OK
    ...
    [  215.015888] sd 1:0:0:0: [sdb] Unsupported sector size 67108864.

    The physical drive is detected, but I see ^ those two errors reported and there is a three minute gap between the initial probing and then a disconnect and second probing and there is no attempt to mount filesystems.

    I didn't find anything from some initial Googling on the errors, but things point towards 'geometry' issues. Was the drive formatted under Windows? .. If yes, what was the sector size used? - Do you have any other PCIe > USB cases that can handle the drive?

    We don't support LE 10.x/11.x on the 3A+ due to the 512MB RAM configuration (under 1GB will not give a good experience). Older releases like LE 9.2.x are more efficient on 512MB boards due to the older video pipeline; although the boot firmware in our older images is older and doesn't always support the latest revisions of earlier Pi hardware. That's not the issue here (the error looks more like an SD card creation issue) but something to be aware of if/once you get it to boot and then find the performance underwhelming.

    LE has lots of binary emulators available although the Kodi GUI doesn't do the greatest job of helping users understand which ones work ok or best on any given piece of hardware (an RPi4 will not handle everything). If you do a little research things run fine from LE.

    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.