SOLVED: Sound only from left channel on Sony USB headset with LE 10 and RPi 4

  • Hello, thanks so much for the amazing LibreELEC release. Unfortunately, I’m having one problem keeping me on 9.2.8 for the time being.

    I’m using a Raspberry Pi 4 with 4gb ram, with a Sony Gold Wireless Headset (Gold Wireless Headset Canada). It connects with a USB dongle rather than Bluetooth, and has worked perfectly perfectly with LibreELEC for as long as I can remember (certainly back to version 6 or 7).

    However, on LE 10.0 the sound only comes from the left side and is of very poor quality (I think it’s just a mono signal). There’s no other issues, i.e. it appears in the Audio Output options as “ALSA: Wireless Stereo Headset, Analog” and “ALSA:Wireless Headset, S/PDIF. It’s just mono sound in one channel. (I always used “Analog” but S/PDIF is the same result).

    I tested the headset on another RPi4 to be sure, and the issue is the same.

    Any assistance is appreciated. If this a known issue I apologize, I searched for similar threads but may have missed it! Thanks for all your incredible work! :)

  • Go to Best Answer
  • Thanks for replying, Da Flex, my apologies for not keeping a closer eye on the thread.

    I ran LibreELEC-RPi4.arm-11.0-nightly-20211106-5cfc876 on the same device/hardware, unfortunately the problem persists, i.e. audio out the left headphone only. I tried various combinations of options in the Audio settings just to see if it might make a difference, no luck.

    If there’s any further info I can provide, please let me know, thank you! :)

  • Thanks for testing! Hmm, this headset is pretty unusual, so it could be a driver issue. To be sure, we need a log file.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • No problem!

    kodi.log:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I also thought the output of dmesg might be useful:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I hope this helps, and again, I really appreciate your input!

  • Thanks, the error is visible!

    Code
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>: CActiveAESink::OpenSink - ALSA Initialized:
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>:   Output Device : Wireless Stereo Headset
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>:   Sample Rate   : 48000
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>:   Sample Format : AE_FMT_S16NE
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>:   Channel Count : 2
    2021-11-08 18:53:06.185 T:1106    DEBUG <general>:   Channel Layout: FL, UNKNOWN1

    I'll ping a dev...

  • This headset uses a very weird channel layout, 3 channels where the first one unknown/unused - I've never seen such an odd setup before:

    Code
    INFO <general>: m_channels : UNKNOWN1, FL, FR

    Kodi doesn't cope with that too well, it expects to get a normal 2-channel setup with left and right.

    It might be possible to work around that by creating a /storage/.config/asound.conf file (that's the equivalent of ~/.asoundrc on other linux distros) and creating a custom pcm using the route plugin.

    read more about it here: https://www.alsa-project.org/wiki/Asoundrc here https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html and some LE specific info in this forum thread RE: Volume Control for Chrome Add-On

    so long,

    Hias

  • Thank you for responding! I'm hopeful there is a way to resolve this, as this headset has worked on prior releases (as far back as I can remember). I'm posting the debug log and dmesg output for a fresh install LE 9.2.8 as it might shine some more light on the issue.

    LE 9.2.8 debug log:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    LE 9.2.8 dmesg output:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I notice that in the LE 10.0.1 log provided earlier that when the headset is initialised by ALSA that the result is:

    2021-11-08 18:53:06.185 T:1106 DEBUG <general>: Channel Layout: FL, UNKNOWN1

    while the result on the correctly working 9.2.8 is:

    2019-04-11 16:28:39.983 T:2977952576 DEBUG: Channel Layout: FL, FR

    It appears that LE 10 is trying to use the mysterious "UNKNOWN1" channel whereas prior versions are correctly using the left and right channels. My post title is a bit erroneous - it's really an issue of only using the left channel rather than "mono" sound.

    Again - I'm grateful for any assistance. I really want to be able to watch TV in bed without disturbing others and a replacement headset is not financially viable right now :S

  • No problem!

    LE 9.2.8 amixer -c Headset contents:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    LE 10.0.1 amixer -c Headset contents:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    The only difference appears to be a carriage return before and after the final stanza.

    Edited once, last by Crackerjack79: Added diff note (November 11, 2021 at 5:27 PM).

  • Oh, this is weird, the "Playback Channel Map" should have 2 values (eg "0,0" or "3,4"), but there's only in both cases. Probably luck that it worked before.

    Try creating a /storage/.config/asound.conf file with the following content:

    Code
    pcm.myoutput {
      type hw
      card "Headset"
      chmap [ "FL,FR" ]
      channels 2
      hint.description "my output with fixed chmap"
    }

    This should give you an "ALSA: Headset ()" (or similar) device with a fixed channel map to make kodi happy.

    so long,

    Hias

  • Oh, this is weird, the "Playback Channel Map" should have 2 values (eg "0,0" or "3,4"), but there's only in both cases. Probably luck that it worked before.

    Try creating a /storage/.config/asound.conf file with the following content:

    Code
    pcm.myoutput {
      type hw
      card "Headset"
      chmap [ "FL,FR" ]
      channels 2
      hint.description "my output with fixed chmap"
    }

    This should give you an "ALSA: Headset ()" (or similar) device with a fixed channel map to make kodi happy.

    so long,

    Hias

    This works! Thank you so much for your assistance! I've edited the post title to be easier to find for anyone else with this issue.

    This forum and project are amazing, I'm thrilled this is resolved :)

    Thank you again! :) :) :thumbup: :thumbup:

  • Hi I think I have a similar issue with my USB speakers.

    I'm on LibreElec 10.01

    I have a Microsoft Digital Sound System.

    On LibreElec 9.xx it used to work out of the box.

    Now I only have sound on the left speaker.

    Here's the log: http://ix.io/3Ptn

    I tried to create the a /storage/.config/asound.conf file with the following content:

    Code
    pcm.myoutput {  
        type hw  
        card "System"  
        chmap [ "FL,FR" ]  
        channels 2  
        hint.description "my output with fixed chmap"
    }

    But that did not work.

    The output of amixer -c System is


    Any suggestion on what to do?

    Thanks in advance

  • Correction to the above. It does work. :) :)

    I had to select the newly created device in the Audio Settings, and now it works.

    I have no idea however if the LFE (low frequency enhancement) channel will be set correctly.

    But so far so good.

    Thanks a lot for the ideas, and long live LibreElec Kodi for RPI.