I am using a RPi4 and have connected it to ethernet and wifi, and run shareport to stream audio to my HDMI hifi (so I can have a wifi hifi!).
I also installed Rhythmbox, so I can stream the radio to my hi-fi. If I use shareport and stream audio over wifi or ethernet,I get periodic, but irregular audio dropouts.
So, I installed Rhythmbox to see if this was a shareport thing, but I get the same issue.
I then added bashtop, so I could see the data rates over the ethernet, and changed the refresh to 1s, and monitored the data rate which seemed to remain fairly constant - and it didn't drop (which it shouldn't). Even my wifi should be really good, as it can sustain c. 10Mb/s.
Looking at bashtop, which is set to 1s refresh, I can see that the CPU clock sometimes drops to 900MHz from 1.5GHz but that is not associated with the dropouts. There is no evidence of increased CPU loads around the dropouts, and the network is stable around dropouts.
I have the following settings in my /boot/config.txt file that have been recommended:-
hdmi_force_hotplug=1 hdmi_drive=2 hdmi_safe=1 config_hdmi_boost=4 arm_freq_min=710 core_freq_min=270
but they don't seem to reduce the drop-outs.
In addition, the HDMI screen is set to 640x480 (but is 60Hz) to see if that helps - despite the screen normally not being used. My "logic" also suggests that if the workload of the screen was an issue then I would see higher CPU utilisation, but then again, I don't know enough to be certain!
The kernel I am using is 5.10.63.
I have my TV in standby mode, as my hifi then outputs to my TV, and I am observing the bashtop using VNC.
The audio is using ALSA as far as I can tell.
The dropouts can be e.g. a couple of times of about 5 seconds with maybe a minute or two between, or it can be 30-90 minutes and one or more dropouts spaced maybe a minute or two apart. The longest dropouts may be maybe 1 minute, and the shortest maybe 5 seconds.
To me, it seems like this is not the apps (e.g. rhythmbox/ shareport) and it I don't think it is the network - so I am puzzled as to how to stop the dropouts.
In case it was the graphics being worked too hard, I tried setting the screen resolution to CEA mode 16 and then CEA mode 1 and there was no difference - still the same audio dropouts at about the same rate.
Just to clarify, the drop-outs typically last c. 5 seconds, but I am sure there have been longer ones - and the time between drop-outs can be from maybe 30s to maybe 30-90 minutes.
I tried VLC, and was able to stream internet radio, with some dropouts, but I feel it is not as much - but that may be wishful thinking!
So, I then copied some mp3 files onto a memory stick attached to my RPi, and have been playing them back-to-back in VLC - and I feel there are fewer drop-outs, but there are definitely dropouts.
To me (being naive) it suggests either the audio hardware or the drivers.
I did have a little look into Broadcom GPU, which was slated as having poor performance.
As it is like a mute button being pressed, I feel the processing is going on, but somewhere the data isn't reaching the HDMI port. Is there a way to tell if the drivers installed are correct/ up to date?
To try to eliminate the audio path/ network/ ... I used Rhythmbox to stream internet radio, and listened with Bluetooth headphones, and there were no dropouts - so far!
To me, this suggests the issue is related to the HDMI audio path. If I have the TV on, and showing the 'Pi, from memory, the video wasn't an issue, but the audio dropouts still happened, but I will retest...
Any clues would be most appreciated. (Or solutions even more appreciated!)
Many thanks for your help.