INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Audio dropouts on Raspberry Pi 3  (Read 3408 times)

beard

  • Recent member
  • *
  • Posts: 11
Audio dropouts on Raspberry Pi 3
« on: May 11, 2018, 02:09:33 pm »

I recently upgraded my master license from MC21 to MC24, and just performed a clean upgrade/install on my Raspberry Pi 3 model B (2016) following Awesome Donkey's stickied post (completely removed the MC21 installation). I should note that aside from periodic crashes to desktop on the Pi, MC21 was performing perfectly and completely filled my needs. Unfortunately, I am now getting 2 to 3 audio dropouts per track -- very brief, millisecond drops. 

Here's my setup:

- RPi 3 Model B running Raspian Jessie, up to date
- Phantom YoYo PCM2704 USB DAC using S/PDIF to audio receiver (hw:card=DAC,DEV=0 [ALSA])
- Windows 10 MC24 running as a dumb client for remote control (but please note this issue occurs whether or not the Windows client is running)
- Mixed library of MP3 and FLAC running from a powered external USB drive

As I mentioned, I never had this problem with MC21 running the same setup. I have tried various suggestions from searching the forum, such as increasing buffering in Options > Audio > Device settings, and increasing pre-buffering in Options > Audio > Prebuffering. I found no other relevant suggestions for my setup (most suggestions are for Windows or Mac systems).

I'd really rather not revert back to MC21, but the daily crash to desktop was much less bothersome than the audio dropouts.

Thanks in advance for the support. Please let me know if more information is required to debug.


Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7813
  • Autumn shade...
Re: Audio dropouts on Raspberry Pi 3
« Reply #1 on: May 11, 2018, 02:11:42 pm »

It might be a long shot, but you could see if setting up thread priorities helps any.

https://yabb.jriver.com/interact/index.php/topic,115349.msg797319.html#msg797319
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #2 on: May 11, 2018, 03:41:36 pm »

Thank you for the swift reply. I successfully set up thread priorities, but the issue remains. That said, it does seem to have slightly reduced the frequency of dropouts -- from 2 to 3 per track, down to 1 or 2.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13874
Re: Audio dropouts on Raspberry Pi 3
« Reply #3 on: May 11, 2018, 04:10:35 pm »

Thank you for the swift reply. I successfully set up thread priorities, but the issue remains. That said, it does seem to have slightly reduced the frequency of dropouts -- from 2 to 3 per track, down to 1 or 2.
It might be because of background thumbnailing.
Set that option to Low priority for the Pi and see if that helps.
Also, check to make sure you are using a hardware device in the audio settings. You can also tinker with the buffer settings under the audio device specific settings.
Logged

erviv

  • World Citizen
  • ***
  • Posts: 220
Re: Audio dropouts on Raspberry Pi 3
« Reply #4 on: May 11, 2018, 09:26:15 pm »

I had similar problems on MC23. However once I upgraded my rpi to stretch from Jessie the audio dropouts disappeared. I have since also upgraded to MC  24 and continue to have clean performance.
Logged
MacBook Pro i5 2.3Ghz 8 GB (early 2011) 1Tb SSD; 3 Raspberry pi’s 4 and 2@ 3B (o/s: Buster).

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #5 on: May 12, 2018, 08:52:30 am »

Thank you all for the suggestions. The comment about thumbnailing gave me some hope, as it makes sense that the thumbnails would be rebuilding after installing MC24 from scratch and restoring the library. But despite lowering thumbnail priority from medium to low, there are still one or two dropouts on every track played.  I have also noticed this: if I interact with MC24 (e.g., skip or rate tracks, modify playlists), be it through the Win10 client or via VNC, the frequency of dropouts increases. If I leave everything alone, it goes back down to one or two per track.

I hadn't considered updating Raspian to Stretch, but that may be my next step.  Just out of curiosity, erviv, did you start from a fresh install of Stretch, or did you dist-upgrade Jessie?  I've been hesitant to upgrade given the warnings of possible failures.
Logged

Zhillsguy

  • Galactic Citizen
  • ****
  • Posts: 325
Re: Audio dropouts on Raspberry Pi 3
« Reply #6 on: May 12, 2018, 11:22:36 pm »

Long shot here......by chance did Dolby Digital Output Encoding or any sample rate conversion get turned on under DSP Studio? If so try turning it off.
Logged
Ryzen 5 W11 x64 MC 29 HTPC/Server and HP G2 Mini Elitedesk W11 MC 29 (music only zone), various Android Phones and Tablets for control of both, powering two lanai surround systems, 5.1 and 4.1 respectively.

erviv

  • World Citizen
  • ***
  • Posts: 220
Re: Audio dropouts on Raspberry Pi 3
« Reply #7 on: May 13, 2018, 07:28:00 am »

I did a fresh install of stretch, on a new sd card.  This worked quite well, then on my second rpi I did an upgrade from Jessie. This didn’t work very well so I did a fresh install.  Both my rpi’s are now running on stretch.  I have not had any audio issues since I upgraded to stretch.
If you follow this approach it would be a good idea to back up your library to an external drive.
Logged
MacBook Pro i5 2.3Ghz 8 GB (early 2011) 1Tb SSD; 3 Raspberry pi’s 4 and 2@ 3B (o/s: Buster).

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #8 on: May 14, 2018, 08:51:16 am »

Thanks again for the suggestions. I do have DSP turned on, because I have high sample rate tracks in my collection that I need to convert down for my DAC.  MC21 did this without issue, and turning it off is a non-starter for me.

I have since discovered 2 more use cases that make the issue much worse (meaning, many more dropouts during playback): jumping between smartlists in the interface, and moving files onto the drive where the music is stored.  MC21 handled both of these situations without issue.

I haven't had the time or inclination to start a new installation of Raspian with Stretch.  But is that the best recommended course of action here?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #9 on: May 14, 2018, 09:30:12 am »

It would be worth trying turning off all DSP, just as a test.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13874
Re: Audio dropouts on Raspberry Pi 3
« Reply #10 on: May 14, 2018, 09:54:06 am »

Interacting with the running client through either remote desktop or VNC consumes a fair amount of resources.
Do you have any issues when you not connected to the desktop at all?
Logged

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #11 on: May 14, 2018, 10:45:57 am »

I unchecked everything in DSP Studio, and the issues persist.  I run MediaCenter headless on the Pi, so I usually interact with it via the Windows client on my laptop unless I need to make configuration changes, in which case I open a VNC session. If I close the Windows client and VNC, I'll still get a dropout or two per track.  But I can consistently recreate the issue by a) copying a large number of files to the library hard drive over LAN, or b) clicking between various smartlists in the interface when connected via VNC.  Neither of these activities caused problems on MC21.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #12 on: May 14, 2018, 10:50:45 am »

Could this be a power problem?
https://www.raspberrypi.org/documentation/hardware/raspberrypi/power/README.md

What is plugged into the USB ports?
Logged

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #13 on: May 14, 2018, 12:11:36 pm »

The only things plugged into USB are the USB DAC, and a desktop USB hard drive with its own power supply. So it doesn't seem to be a power issue.  I never had audio dropouts with the exact same configuration in MC21. 
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #14 on: May 14, 2018, 12:14:57 pm »

Is the DAC separately powered?

If not, what does it draw?

The standard Pi power supply doesn't allow for much more than the Pi.  The link above explains that.
Logged

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #15 on: May 14, 2018, 12:31:31 pm »

No, the DAC receives power from the Pi, but as I've mentioned, this has never been a problem in more than 2 years of operation with MC21.  Have the power requirements of MediaCenter changed in the new versions?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #16 on: May 14, 2018, 12:37:58 pm »

Yes, I've noticed that you've said that it worked before, but since it doesn't now, I'm trying to help find the reason.

What does the DAC draw?

Did you read the topic I linked to?
Logged

erviv

  • World Citizen
  • ***
  • Posts: 220
Re: Audio dropouts on Raspberry Pi 3
« Reply #17 on: May 14, 2018, 04:53:25 pm »

I'm not sure if upgrading to Stretch will solve your issue. In my case the only external power draw is a mouse and keyboard.  My DAC is connected via USB and is self powered. My external drive is connected to my router. The router is wired via Ethernet cable to the Rpi.
Still it is worth a try.  If you are concerned about over-writing your current setup I suggest you buy a new micro SD card, around $10, and give it a go.  It will take several hours including time to rebuild your thumbnails.
Good luck.
Logged
MacBook Pro i5 2.3Ghz 8 GB (early 2011) 1Tb SSD; 3 Raspberry pi’s 4 and 2@ 3B (o/s: Buster).

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #18 on: May 14, 2018, 05:04:19 pm »

I read the RasPi power article, thanks. I was already aware of the Pi's power limitations, so I bought a Plugable 4 port USB hub with an external 12.5W 5V 2.5A power adapter when I bought the Pi 3 two years ago. Because my external drive is powered and I run the Pi headless, I ended up not needing it. 

Today I dusted off the hub and plugged the DAC into that, such that the Pi has nothing to power via USB.  The problem still occurs, same use cases, same frequency.

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #19 on: May 14, 2018, 06:27:52 pm »

Could you do a test of playing just ordinary FLAC or any other lossless files?
Logged

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #20 on: May 15, 2018, 03:48:50 pm »

I've been listening to a playlist of just FLAC files for the past couple of hours.  There does seem to be an improvement when I just let the list run -- I didn't notice any audio dropouts.  Unfortunately as soon as I copy or move files around on the hard drive, or jump around smartlists, I get dropouts. 
Logged

beard

  • Recent member
  • *
  • Posts: 11
Re: Audio dropouts on Raspberry Pi 3
« Reply #21 on: May 15, 2018, 11:33:15 pm »

Just found that my HD Tracks (96000 Hz 3000+kpbs FLAC files) are not listenable in MC24 on the Pi. So many dropouts and so much stuttering, I have to skip them whenever they play.  Because of my DAC, I am converting the 96000 Hz down to 44,100 Hz in DSP Studio.

At this point, I'd just like to know: what is my recommended course of action? Revert back to MC21? Perhaps MC23 instead? I just want the same experience I had in MC21, just hopefully without the periodic crash to desktop and broken smartlists.  I am happy to provide whatever log or info, or perform whatever test necessary.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Audio dropouts on Raspberry Pi 3
« Reply #22 on: May 16, 2018, 06:55:16 am »

We have a couple of changes coming for image handling on the Pi.  They may fix this problem.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13874
Re: Audio dropouts on Raspberry Pi 3
« Reply #23 on: May 17, 2018, 09:26:44 am »

Just found that my HD Tracks (96000 Hz 3000+kpbs FLAC files) are not listenable in MC24 on the Pi. So many dropouts and so much stuttering, I have to skip them whenever they play.  Because of my DAC, I am converting the 96000 Hz down to 44,100 Hz in DSP Studio.

At this point, I'd just like to know: what is my recommended course of action? Revert back to MC21? Perhaps MC23 instead? I just want the same experience I had in MC21, just hopefully without the periodic crash to desktop and broken smartlists.  I am happy to provide whatever log or info, or perform whatever test necessary.
It would be nice to cut down the number of variables here.
You could install the last build of MC23, it will accept your MC24 license and see if that has the same behavior.
Logged
Pages: [1]   Go Up