Posts by kjack9

    The results were...interesting!

    I used the linked img.gz file you posted with and the MINIX DTB from the resulting SD card. Note that the latest DTB file posted in the LibreELEC 8.2 thread didn't work.

    With your modified kernel, I do get 7.1 PCM @ 48khz at the receiver! But the sound is wrong. I get sound only about half the time, cutting out every 1 second or so. The pitch is also way too high, and it sounds like the actors are chipmunks. Which was hilarious in the drama-filled scene I tested with, but I digress.

    What other information can I provide to be of help?

    Just out of interest can you try S912 Kodi Krypton with the newer AML Linux Kernel from this post:

    [8.2.2.3] LibreELEC 8.2 for S912

    It's a straight .img.gz update into the update folder. If you have issues go back to the previous S912 LE Kodi Krypton.

    Sure, I'd be happy to try it. Is it safe to apply on top of 9.0 Alpha-8.90.4 or should I use a separate SD card to prevent my database from getting corrupted?

    For anyone who is also having this problem, I'm currently working around it with an addon called Audio Profiles.

    I setup two audio profiles - one with "Best Match" and passthrough enabled and one with "Fixed" @ 192hz. I then bound "switch profile" to one of the keys on my remote.

    If the movie has a bitstream-able codec (DTS, AC3, DTS-HD, TrueHD, etc), I use the passthrough profile. If the movie has a codec that will be converted to PCM (FLAC, opus, aac, etc), I use the fixed profile. With the fixed profile, the PCM output still has to be resampled from its original 48khz, but at least it's resampling up (to 128khz) rather than down (to 32khz).

    My $25 bounty on a true fix for this problem still stands.

    DaVu, thanks for responding.

    As you requested, I uploaded my kodi.log from the time of boot to just after stopping my test video. Note that I stripped out filenames and some other kinda-sensitive information, so don't be surprised when you see my <Removed> tags in there.

    kodi.log - Google Drive

    I also got a second MINIX U9-H in the mail today. It has the exact same behavior as the old one. The issue does not appear to be related to bad hardware at this point.

    Thanks for looking!

    -KJack

    I would REALLY appreciate some help with a PCM sound problem I'm having. In fact, I will be happy to PayPal anyone who provides a solution or a patch with a $25 donation via PayPal for their trouble (please let me know if this is against the rules). I am at my wits end.

    My entire library is encoded with Opus audio at 48khz. Playing any movie with a non-bitstreamed codec outputs as PCM, as you'd expect. According to Kodi and the log file, it is reading the stream at 48khz. The receiver is only getting 32khz, and is producing noisy (clipped) audio as a result.

    Note that this only occurs with multichannel audio files. Stereo files play fine as 48khz. Bitstreamed/passthrough audio for DTS, TrueHD, etc also works fine.

    Here a full debug log from playing a video with 7.1 Opus audio:

    kodi.log

    Here is an excerpt showing that the audio stream created is 48khz:

    Code
    12:57:43.150 T:3656377168  NOTICE: Creating audio stream (codec id: 86077, channels: 8, sample rate: 48000, no pass-through)

    Kodi's CodecInfo showing 48khz: http://imgur.com/hBp9NWI

    Yamaha Receiver showing 32khz: http://imgur.com/jZ8dFNP

    Interestingly, the problem happens with audio set to "Fixed" as well.

    • With audio set to Best Match and input file of 48khz, I get 32khz at the receiver
    • With audio set to Fixed @ 48khz and input file of 48khz, I get 32khz at the receiver
    • With audio set to Fixed @ 96khz and input file of 48khz, I get 64khz at the receiver (with stuttering, intermittent audio)
    • With audio set to Fixed @ 192hz and input file of 48khz, I get 128khz at the receiver

    So there is clearly something not lining up between what Kodi is requesting and what the Minix is outputting.

    Device: MINIX U9-H

    LibreELEC Version: 9.0 Alpha-8.90.4 (although the problem also happens on 8.3)

    DTB file: gxm_q200_2g_minix_neo_u9.dtb

    Receiver: Yamaha RX-V681

    Speaker Configuration: 7.1.0

    I don't know what else to look at. Again, I will send a $25 donation to anyone who can provide me a fix or a patch to resolve the issue. My next step is to try to save up for an NVIDIA Shield, but I know that has it's own issues. I'd rather not have to do that!

    Thank you,

    -KJack

    Edit: Replaced partial log with full log (thanks DaVu)

    kjack9

    I'm using passthrough. The word "non-passthrough" doesn't make sense for me.

    If I play an 5.1, 192kHz/24 bit flac file then my receiver shows Multi channel PCM, 192 kHz, 5.1.

    If I play a movie with an 5.1, 48kHz aac audio then my receiver shows Multi channel PCM, 48 kHz, 5.1.

    The sample rate is correct every time with every value.

    By 'non-passthrough' I mean audio streams that can't be bitstreamed to the receiver. So FLAC, AAC, MP3, etc.

    "If I play a movie with an 5.1, 48kHz aac audio then my receiver shows Multi channel PCM, 48 kHz, 5.1."

    This tells me that the issue is specific to me, and other people aren't experiencing it. I'm starting to suspect that I have a bad MINIX U9-H unit. I've ordered a replacement on Amazon to see if a hardware change makes the difference.

    You should share a sample file. No problem here even with 192 kHz audio, but I don't have any opus audio (not even know what it is).

    Any file with multichannel audio that doesn't support bitstreaming (passthrough) has this issue. So any time the MINIX needs to output multichannel PCM, the sample rate is incorrect. I should have noted previously - stereo doesn't seem to be affected. Only multichannel (5.1, etc) audio streams are output incorrectly.

    Are you saying that if you play a movie with a non-passthrough, 5.1 audio track (like mp3, aac, flac, etc) that it shows on your receiver as 48khz?

    I would REALLY appreciate some help with a PCM sound problem I'm having. In fact, I will be happy to PayPal anyone who provides a solution or a patch with a $25 donation via PayPal for their trouble (please let me know if this is against the rules). I am at my wits end.

    My entire library is encoded with Opus audio at 48khz. Playing any movie with Opus outputs as PCM, as you'd expect. According to Kodi and the log file, it is reading the stream at 48khz. The receiver is only getting 32khz, and is producing noisy (clipped) audio as a result.

    Kodi's CodecInfo showing 48khz: http://imgur.com/hBp9NWI

    Yamaha Receiver showing 32khz: http://imgur.com/jZ8dFNP

    I'm attaching a full debug log from playing a video with 5.1 Opus audio, but here is an excerpt showing that the audio stream created is 48khz:

    Code
    02:41:52.909 T:3743523664  NOTICE: Creating audio stream (codec id: 86077, channels: 6, sample rate: 48000, no pass-through)
    02:41:53.381 T:4081054544   DEBUG: CAESinkALSA::SelectALSAChannelMap - Selected ALSA map "FL FR LFE FC RL RR NA NA"
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 6 Output Channel Count: 8
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1 (ALSA: FL FR LFE FC RL RR NA NA)
    02:41:53.419 T:4081054544   DEBUG:   Channel Count : 8
    02:41:53.419 T:4081054544   DEBUG:   Channel Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1

    Interestingly, the problem happens with audio set to "Fixed" as well.

    • With audio set to Best Match and input file of 48khz, I get 32khz at the receiver
    • With audio set to Fixed @ 48khz and input file of 48khz, I get 32khz at the receiver
    • With audio set to Fixed @ 96khz and input file of 48khz, I get 64khz at the receiver (with stuttering audio)
    • With audio set to Fixed @ 192hz and input file of 48khz, I get 128khz at the receiver

    So there is clearly something not lining up between what Kodi is requesting and what the Minix is outputting.

    I don't know what else to look at. Again, I will send a $25 donation to anyone who can provide me a fix or a patch to resolve the issue. My next step is to try to save up for an NVIDIA Shield, but I know that has it's own issues. I'd rather not have to do that!

    Thank you,

    -KJack

    Hi all,

    Hardware: MINUX U9-H

    LibreELEC: adamg's LibreELEC 9.0 Alpha for Amlogic S905/S912 devices, version 8.90.3 (same behavior also in kszaq's LibreELEC 8.2 for S912, version 8.2.2.3)

    Receiver: Yamaha RX-V681

    I'm having some trouble with multichannel PCM output from Kodi to my Yamaha receiver. I have a 7.1 system, and Kodi audio is set to 7.1 with "Best Match". When I try to play any multichannel movie with an audio track that can't be bitstreamed (FLAC or Opus), my receiver gets 8 channels of PCM at only 32khz. I'm concerned that I'm losing significant fidelity due to this issue.

    Kodi's CodecInfo showing 48khz: http://imgur.com/hBp9NWI

    Yamaha Receiver showing 32khz: http://imgur.com/jZ8dFNP

    I'm attaching a full debug log from playing a video with 5.1 Opus audio, but here is an excerpt showing that the audio stream created is 48khz:

    Code
    02:41:52.909 T:3743523664  NOTICE: Creating audio stream (codec id: 86077, channels: 6, sample rate: 48000, no pass-through)
    02:41:53.381 T:4081054544   DEBUG: CAESinkALSA::SelectALSAChannelMap - Selected ALSA map "FL FR LFE FC RL RR NA NA"
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 6 Output Channel Count: 8
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1 (ALSA: FL FR LFE FC RL RR NA NA)
    02:41:53.419 T:4081054544   DEBUG:   Channel Count : 8
    02:41:53.419 T:4081054544   DEBUG:   Channel Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1

    There is no indication from Kodi that it's sending 32khz. Is my receiver lying to me about what it's receiving? Or is there some way I can prevent LibreELEC from choosing 32khz as the output sample rate?

    Any leads or directions to check in would be most appreciated. Thanks!

    -KJack

    Anyone have any ideas on the 'PCM sending dummy channels' issue? If not, can anyone direct me to some instructions on how to modify the read-only system partition so I can try the fix I mentioned?

    Thanks!

    -KJack

    Alright, answering myself here. According to this old post from ksqaz, the AMLogic kernel driver either sends 2.0 or the max number of channels that your receiver supports. In my case, that's 7.1. So I accept that's how it is for number of channels.

    I'm still super confused as to why I'm getting 32khz PCM rather than 48khz (which is what the source file is). Kodi seems to be saying it's sending 48khz, but the receiver is only getting 32khz. Any idea as to how or why this happens, or even a direction to look in would be most appreciated.

    Thanks!

    -KJack

    Anyone have any ideas on the 'PCM sending dummy channels' issue? If not, can anyone direct me to some instructions on how to modify the read-only system partition so I can try the fix I mentioned?

    Thanks!

    -KJack

    For any future dwellers looking to do password-based authentication for SSHFS shares, I have created a super-simple addon that will take care of this for you. It uses SSHFS from LibreELEC Network Tools to create a native (non-Kodi) SSHFS mount using password-based authentication.

    The addon .zip is attached to this post.

    Install

    Install addon from .zip file, select the downloaded zip

    LibreELEC Network Tools is a dependency. If you do not already have it installed, it will be installed for you. You will need to restart your box before you can use SSHFS Password Mount if Network Tools was not previously installed. If you don't, you'll get an error.

    Configuration

    The configuration for the addon must be completed in Kodi before running the script. The options are pretty self-explanatory.

    Username - the SSH username to connect to the SSH server with

    Hostname - the hostname or IP address of the SSH server you want to connect to

    Remote Path - the directory on the remote host that you want to connect to (like /media/movies)

    Local Path - the directory on the local host that you want to mount the connection into (like /storage/sshfs)

    Trigger video library update on success - runs a video library scan after successfully mounting the share

    Trigger music library update on success - runs a music library scan after successfully mounting the share

    I recommend disabling library scans for video and music on Kodi startup, and instead enable the appropriate options above.

    Using

    Once configured, simply run the addon. It will ask you for a password and then attempt to mount the share. It will let you know if there's a problem.

    Now you can add the new share to your video/music library by browsing to the directory you set in 'Local Path'.

    Autostart

    If you want this script to auto-start when Kodi starts, SSH into your box and execute the following...

    Code
    echo "import xbmc" >> ~/.kodi/userdata/autoexec.py
    echo "xbmc.executebuiltin('RunScript(script.sshfs-pw-mount)')" >> ~/.kodi/userdata/autoexec.py

    The SSHFS Password Mount password dialog will now pop up as soon as Kodi starts.

    I hope this helps someone!

    -KJack

    Thank you again!

    I can do with LED light as it is.

    What I have found is that the air mouse I am using does not have the proper mapping for buttons. Most annoying is the inability to go back using the back button. I need to flip the remote to use del key.

    Any hint?

    Thanks

    Get the "Keymap Editor" addon from the official repository. It has button detection and will let you assign a button to many functions through a GUI.

    If the editor doesn't have an action you need (it doesn't have all of them), you can edit /storage/.kodi/userdata/keymaps/gen.xml to add any additional actions. The Kodi wiki goes in depth on keymaps here.

    Hi there,

    Thanks for this, it's working 95% great!

    I do have a couple of issues with PCM multichannel audio, though. I've attached a log of trying to play a video with 5.1 Opus audio encoded. I have a 7.1 system, and Kodi audio is set to 7.1 with "Best Match".

    I would expect 6 channels of PCM @ 48khz to be output to the receiver, where the receiver can upmix (or not) to 7.1. However, the receiver is getting 8 channels of PCM at 32khz instead, according to my receiver.

    Here are some interesting parts of the log:

    Code
    02:41:52.909 T:3743523664  NOTICE: Creating audio stream (codec id: 86077, channels: 6, sample rate: 48000, no pass-through)
    02:41:53.381 T:4081054544   DEBUG: CAESinkALSA::SelectALSAChannelMap - Selected ALSA map "FL FR LFE FC RL RR NA NA"
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Input Channel Count: 6 Output Channel Count: 8
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR
    02:41:53.419 T:4081054544   DEBUG: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1 (ALSA: FL FR LFE FC RL RR NA NA)
    02:41:53.419 T:4081054544   DEBUG:   Channel Count : 8
    02:41:53.419 T:4081054544   DEBUG:   Channel Layout: FL, FR, LFE, FC, BL, BR, UNKNOWN1, UNKNOWN1

    It looks like it's making dummy "UNKNOWN" channels to add up to 8 for some reason?

    I found a very similar (identical?) issue on the OSMC forums that recommended a change to AML-M8AUDIO.conf, but of course I can't edit that since it's part of the read-only filesystem.

    This issue also happens identically on 8.2.2.3 - I tested both.

    What additional information can I provide to help troubleshoot this? Thanks!

    -KJack

    why?

    Because as a security architect, letting a non-encrypted, insecure device have SSH access to my NAS without a password makes my h.air stand on end. Anyone who got a hold of my SD card would have a certificate into my NAS. Not okay.

    I understand that LibreELEC doesn't support local OS encryption - this is the best alternative I can think of.