[SOLVED] Audio glitching on Pi 5 - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] Audio glitching on Pi 5 (/showthread.php?tid=6710) |
Audio glitching on Pi 5 - robkyf - 07-13-2024 Inspired by a post on another forum, I tried moOde V9.0.4 for a Pi Zero 2 W outputting over micro-USB > USB-B to the ESS9018 Sabre32 DAC in an Audiolab 8200 CD player. The result was a huge improvement in sound quality over my previous solution of using the line output in an old iBasso DX50 DAP to feed the same DAC. Enthused by this success, I tried moOde V9.0.4 for a Pi 5 outputting over USB-A > USB-B to the same DAC. But with this setup, the audio (mostly 16 or 24/44.1 FLAC) is glitching every 10-20 seconds. I’ve tried both basic and mid-range audio USB-A to USB-B cables but the problem is present with both. I can’t figure out why the Pi Zero solution works perfectly but the Pi 5 one doesn’t. In both cases, the music files are stored on the SD card, the volume type is Fixed (0dB), and nothing else apart from the official power supply is attached to the Pi Zero or the Pi 5. Any suggestions on what I’m doing wrong? RE: Audio glitching on Pi 5 - Tim Curtis - 07-13-2024 Reboot and then post the contents of the startup log. The log can be viewed via the SSH command moodeutl -l or downloaded via the Logs section in System Config, or via Menu, System info from any of the Config screens. The startup log will be at the end of System info output. RE: Audio glitching on Pi 5 - robkyf - 07-13-2024 (07-13-2024, 01:46 PM)Tim Curtis Wrote: Reboot and then post the contents of the startup log. Thanks Tim. The Startup Log looks like this: Code: 20240713 155721 worker: -- Start moOde 9 series RE: Audio glitching on Pi 5 - Tim Curtis - 07-13-2024 I don't see anything suspicious in the log. You might want to run the ifconfig command and see if there are any network issues for example dropped packets reported for the wlan0 interface. Also run the iwconfig command for signal strength/quality. If those commands don't report any issues then its not obvious to me what might be happening on your end. RE: Audio glitching on Pi 5 - TheOldPresbyope - 07-14-2024 @robkyf Couple of thoughts... 1) The Pi 5, like the Pi 4 models, has both USB2.0 and USB3.0 ports. You should be sure your DAC is connected to a USB2.0 port. In principle, USB3.0 ports are backward-compatible with USB2.0 devices, but there are always edge cases. 2) you could set MPD to elevated log level (m > Config > Audio > MPD settings) and enable moDe's debug logging (m > Config > System > Logs). Check their logs, /var/log/moode.log and /var/log/mpd/log for periodic ( e.g., every 10s - 20s) error messages. As well, you can watch the Raspberry Pi OS system message stream for periodic error messages Code: journalctl -f Good hunting! Regards, Kent RE: Audio glitching on Pi 5 - simonb - 07-14-2024 A couple of question and a suggestion: 1. Have you tried moving the flac files to a usb stick and playing from there? 2. Can you post the PCi express settings from Code: /boot/firmware/config.txt please? Mine is : # PCI Express #dtparam=pciex1 dtparam=pciex1_gen=3 I set mine to pciex1_gen=3 and it behaves much better. The sound quality improved. 3. Can you run the command while playing the flac files: Code: iostat -xt --pretty 1 5 Output will be like this: Code: 07/14/2024 06:32:10 AM Code: avg-cpu: %user %nice %system %iowait %steal %idle f/s f_await aqu-sz %util Device 0.00 0.00 3.35 14.80 mmcblk0 0.00 0.00 0.00 0.00 sda[/code] RE: Audio glitching on Pi 5 - robkyf - 07-14-2024 Thanks @Tim Curtis . No issues that I can see with my network: rob@moode:~ $ ifconfig wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.XXX.X.XX netmask 255.XXX.XXX.X broadcast 192.XXX.X.XXX inet6 fe80::9a24:5b64:dc0a:cbe5 prefixlen 64 scopeid 0x20<link> ether d8:3a:dd:eb:8d:1d txqueuelen 1000 (Ethernet) RX packets 5741 bytes 1426874 (1.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 6762 bytes 7088307 (6.7 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 rob@moode:~ $ iwconfig wlan0 IEEE 802.11 ESSID:"RobNetwork" Mode:Managed Frequency:5.2 GHz Access Point: 40:AE:30:79:62:3C Bit Rate=433.3 Mb/s Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=62/70 Signal level=-48 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 RE: Audio glitching on Pi 5 - robkyf - 07-14-2024 Thanks @TheOldPresbyope. Re. the USB port: yes, I've tried the two USB 2.0 and 3.0 ports on the Pi 5 and all have the same glitching. Re. the moOde system logs: I've set those as you've suggested but while I am logged in to moOde/Pi I get a Permission Denied message for both logs. Sorry, I'm probably making some obvious mistake here: #moode login: rob Password: Host: moode RPiOS: 12.6 Bookworm 64-bit | Linux: 6.6.31 64-bit Model: Pi-5B 4GB Audio: Audiolab 8200 Series rob@moode:~ $ /var/log/moode.log -bash: /var/log/moode.log: Permission denied Re. the journal, I can access that but there doesn't seem to be any relationship between the results and the audible glitches during playback: rob@moode:~ $ journalctl -f Jul 14 09:50:02 moode systemd[1]: sysstat-collect.service: Deactivated successfully. Jul 14 09:50:02 moode systemd[1]: Finished sysstat-collect.service - system activity accounting tool. Jul 14 09:54:35 moode dbus-daemon[500]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.201' (uid=0 pid=7675 comm="timedatectl") Jul 14 09:54:35 moode systemd[1]: Starting systemd-timedated.service - Time & Date Service... Jul 14 09:54:35 moode dbus-daemon[500]: [system] Successfully activated service 'org.freedesktop.timedate1' Jul 14 09:54:35 moode systemd[1]: Started systemd-timedated.service - Time & Date Service. Jul 14 09:55:09 moode systemd[1]: systemd-timedated.service: Deactivated successfully. Jul 14 10:00:02 moode systemd[1]: Starting sysstat-collect.service - system activity accounting tool... Jul 14 10:00:02 moode systemd[1]: sysstat-collect.service: Deactivated successfully. Jul 14 10:00:02 moode systemd[1]: Finished sysstat-collect.service - system activity accounting tool. RE: Audio glitching on Pi 5 - robkyf - 07-14-2024 Thanks @simonb. Re. playing the music files from a USB stick: I've not tried that yet but will do so and report on whether there's any change. Re. the PCi express headings, I may have misunderstood (sorry, complete Pi novice) but running the command you suggest returns the following only, which doesn't seem to say a lot: rob@moode:~ $ /boot/firmware/config.txt /boot/firmware/config.txt: line 6: [cm4]: command not found /boot/firmware/config.txt: line 8: [pi4]: command not found /boot/firmware/config.txt: line 9: hdmi_force_hotplug:0=1: command not found /boot/firmware/config.txt: line 10: hdmi_force_hotplug:1=1: command not found /boot/firmware/config.txt: line 12: [all]: command not found Re. iostat command, most of the time the results I get when playing a FLAC file look like the same as yours, but one line did return quite different results (and seemed to coincide with an audible glitch): 07/14/2024 10:42:25 AM avg-cpu: %user %nice %system %iowait %steal %idle 0.00 0.00 1.00 0.25 0.00 98.75 r/s rkB/s rrqm/s %rrqm r_await rareq-sz Device 3.00 384.00 0.00 0.00 4.33 128.00 mmcblk0 w/s wkB/s wrqm/s %wrqm w_await wareq-sz Device 3.00 20.00 2.00 40.00 4.00 6.67 mmcblk0 d/s dkB/s drqm/s %drqm d_await dareq-sz Device 0.00 0.00 0.00 0.00 0.00 0.00 mmcblk0 f/s f_await aqu-sz %util Device 2.00 1.00 0.03 2.00 mmcblk0 RE: Audio glitching on Pi 5 - Tim Curtis - 07-14-2024 The moOde startup log can be viewed via the SSH command "moodeutl -l" or "cat /var/log/moode.log" or downloaded via the Logs section in System Config, or via Menu, System info from any of the Config screens. The startup log will be at the end of System info output. Use the "cat" command to view files for example Code: cat /boot/firmware/config.txt |