The forums may be unavailable today (Feb 3) between 17 and 22 o'clock due to system maintenance. (February 03) x
Kodi somehow breaks system audio with CS43131 USB DAC
#1
I got a new JCALLY JM20 CS43131 USB-C DAC dongle to replace my Apple version. This goes into my headphone amp. I only use my desktop with stereo wired headphones. No surround or passthrough. I used this for about a week with my Win11 PC with no issues in Tidal, Foobar, YouTube, etc. I fiddled with various sample rates but ended up leaving it at 24/192 since I use Peace APO to apply EQ settings. I have used Peace with the Apple dongle and various other DACs without issue with Kodi for years. The JM20 uses the CS43131 chip and, as I understand it, it's a cheap but very good DAC chip used in many USB DACs. It supports higher sample rates compared to the Apple dongle and it is closer to the line-level out that you'd get from a true desktop DAC. 

Then when I tried to play a video in Kodi using the JM20 as the sound output, I would get popping/dropout noises every 10 seconds. Nothing I did could fix this. I have tried:
  • all number of Kodi sound settings (Best Match/Fixed/Resample/Keep Audio Device Alive/Low Volume Noise, Adjust Refresh Rate, etc)
  • setting Win11 sound settings to 24/48, 16/48, 32/192, etc. 
  • lowering volume or raising it on the dongle (generally I leave everything on 100% with a negative preamp in Peace)
  • turning Peace APO on and off = no change
  • using a USB-A to C adapter to try a diff port (working Apple dongle uses exact same C port as JM20)
  • running Kodi fullscreen or windowed
  • Uninstalled Kodi, nuked user profile, reinstalled with default settings 
  • Updated BIOS and turned off a Ryzen PBO underclock (back to defaults)

I have also noticed that when Kodi is running and the JM20 dongle is plugged in, all audio in Windows has pops/drops. If I play a track in Tidal and then start Kodi, as soon as Kodi is loaded, Tidal will begin to pop. If I close Kodi, Tidal stops popping. This applies to everything: YouTube, etc. If I stop playing the video and just leave Kodi running (playing nothing) with nothing else playing on the PC, I can hear pops/clicks/drops roughly every 10 seconds until I shut it down. Playing videos using MPC-HC works fine, unless Kodi is running. Then the MPC-HC video will pop just like everything else until Kodi is shut down.

At this point, I would just assume this cheapo Aliexpress JM20 is defective, but why is it only defective with Kodi?

Both of these logs are with a brand-new vanilla Kodi 21.1 install with a fresh user profile playing a local test file. No addons or anything. My untrained eye couldn't see anything obvious in the logs. I also have a Scarlett Solo interface and this also works fine with Kodi and Peace APO. 

Log with JM20 and popping 

Log with Apple dongle and clean audio
Reply
#2
There is nothing obviously wrong in the log. It's difficult to fix those things without having the hardware on hand. Maybe some DirectSound buffer adjustments, but there is a risk of creating problems for other audio devices...

The v22 nightlies have XAudio2 output, a more modern API, which will likely work better and still use the APO. Could you try it? (as a separate portable install to avoid disturbing your "normal" install).
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Thanks for replying. Unfortunately, the latest nightly has the same issue: popping/dropping/whatever you want to call it every 10 seconds. I just uninstalled 21.1 and had it remove the user profile since it was brand-new vanilla with no settings changed.

All of the below behavior was just retested with default settings with KodiSetup-20240928-12ac3e20-master-x64 (Win11 audio set to 24/48 and retested once at 16/44) and seems identical to 21.1:
 
  • When Kodi is started, the popping starts but it is not consistently 10 seconds (random and quieter, closer to once a minute). Retested full screen vs windowed, no difference.
  • When I play the same test file (but could be any basic 1080p file, to be clear) in MPC-HC, it plays fine with no pops, either windowed or full screen. As soon as I start Kodi (with nothing playing in Kodi), 10 second popping begins. I keep MPC-HC playing and quit Kodi. The popping immediately stops.
  • Just for fun I did try a file with a TrueHD track (still pops) and then its AC3 compatibility track (also pops)
  • When I play the file in Kodi and then stop (using stop button) popping continues for a while but not every 10 seconds (30 seconds, then silent until 1:40, i.e., random)
  • System noises like an email chime will also pop while Kodi is running but doing nothing.
  • Interestingly, Kodi navigation sounds NEVER seem to pop. This is unlike the Win Sound panel format "test" button, which will ALWAYS pop/drop the test xylophone noise while Kodi is running, every time. Test noise seems to be 100% clean when Kodi is not running.
  • I had been playing various games without issue before I discovered the Kodi pop/drop thing but I just retested two games: No pops. Once Kodi is started, game audio will pop.
  • Forgot to mention in my first post that I tried turning off USB power saving in the Win11 power control panel.
Reply
#4
I also just tried installing a semi-compatible Windows driver for this DAC. It's made for some other dongle with the same DAC chip and USB bridge. It seems to work fine. I can change sample rate, shows ASIO output from Foobar, etc. Anyway poking around in Kodi made me realize that new audio system in the Kodi nightlies is something you have to manually select. I thought it was all under the hood type stuff.

So I hadn't actually tried XAUDIO yet but now I have and there is no change. Still has pops. I couldn't remember if I tried WASAPI output on the nightly either. But I tested and it doesn't make a difference. Still has pops. 

I also have tried uninstalling the Peace APO from the JM20 interface. That doesn't do anything. I had previously used an SMSL DL200 desktop DAC+AMP that uses an ES9039Q2M chip. This worked fine with Kodi but it reminded me that the DL200 came with ASIO drivers that showed up as a new selectable output in Windows. These new drivers (for some other company's CS43131 DAC) don't work the same way. The ASIO component has to be in the player, like installing the ASIO component for Foobar. Anyway, there's no ASIO output in Kodi I can switch to and test, like I thought there would be. I personally don't care about ASIO, I just wanted to try it for testing. 

EDIT: Here's one more bizarre thing: Running Foobar in ASIO output while Kodi is running has the exact same half-second drop outs (the popping noise isn't as noticeable). The new drivers' Win control panel shows the ASIO information (so it seems like the drivers and ASIO are working fine) and also lets me change the buffer sizes. I can set buffers to anything from 5ms to 100ms without any issues EXCEPT that it does not stop the popping at all. Quitting Kodi immediately stops the dropouts. Just restarting Kodi and not playing anything brings the dropouts back. This is really weird.
Reply
#5
I somehow never found this thread with my searching but this person is having the same problem and looks like there is no solution. The TempoTec Sonata HD Pro uses the same CS43131 chip. It seems like Kodi just isn't compatible with how this chip is implemented. I can't figure out what makes Kodi so much different than every other program on my PC (so far).
Reply
#6
OK one final data point and I'll give up: I ordered this JM20 mainly for using with my crappy Amazon Fire tablet for travel with a splitter to share audio with my wife on planes. Apple dongle limits itself to half power with Android, I guess. It sounded great on my PC so I thought I'd just use it there too.

Anyway, I finally dug out the Fire tablet and charged it and played a movie in Kodi. Works fine there. No pops or drops.
Reply
#7
There were no errors in the logs and without the ability to reproduce the issue I don't see how to solve it.
There are many virtual audio devices on that computer, which is unusual for computers running Kodi. Maybe they have something to do with the problem, maybe not. You could try uninstalling them temporarily to see what happens.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi somehow breaks system audio with CS43131 USB DAC0