RE: Audio glitching on Pi 5 - robkyf - 07-14-2024
(07-14-2024, 11:51 AM)Tim Curtis Wrote: 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
Hi @Tim Curtis - many thanks for patiently explaining that.
Ok, in response to @simonb, my PCi express headings seem to be the same as yours:
Code: [b]rob@moode[/b]:[b]~ $[/b] cat /boot/firmware/config.txt
# This file is managed by moOde
# Device filters
[cm4]
otg_mode=1
[pi4]
hdmi_force_hotplug:0=1
hdmi_force_hotplug:1=1
hdmi_enable_4kp60=0
[all]
dtoverlay=vc4-kms-v3d
max_framebuffers=2
display_auto_detect=1
disable_fw_kms_setup=1
arm_64bit=1
# General settings
arm_boost=0
disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
hdmi_group=0
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on
# Do not alter this section
# Integrated adapters
#dtoverlay=disable-bt
#dtoverlay=disable-wifi
# Audio overlays
#dtoverlay=none
#dtoverlay=force_eeprom_read=0
# PCI Express
#dtparam=pciex1
#dtparam=pciex1_gen=3
# Pi Touch
dtoverlay=rpi-backlight
#dtoverlay=vc4-kms-dsi-7inch,invx,invy
But @TheOldPresbyope, the MPD log does appear to return an error message for the following example audio file:
Code: rob@moode: cat /var/log/mpd/log
Jul 14 10:54 : player: played "SDCARD/Folke Rabe - What/Folke Rabe - What (Short).flac"
Jul 14 10:55 : player: played "SDCARD/Folke Rabe - What/Folke Rabe - What (Short).flac"
Jul 14 10:56 : player: played "SDCARD/Folke Rabe - What/Folke Rabe - What (Short).flac"
Jul 14 13:15 : mixer: Failed to read mixer for 'ALSA Default': no such mixer control: PCM
Jul 14 13:18 : mixer: Failed to read mixer for 'ALSA Default': no such mixer control: PCM
Jul 14 13:37 : exception: Failed to open "ALSA Default" (alsa); Failed to open ALSA device "_audioout": Unknown error 524
Jul 14 13:37 : exception: Failed to open "ALSA Default" (alsa); Failed to open ALSA device "_audioout": Unknown error 524
Jul 14 13:37 : player: problems opening audio device while playing "SDCARD/Folke Rabe - What/Folke Rabe - What (Short).flac" Jul 14 13:38 : player: played "SDCARD/Folke Rabe - What/Folke Rabe - What (Short).flac"
RE: Audio glitching on Pi 5 - Tim Curtis - 07-14-2024
Reboot and post the moode startup log
RE: Audio glitching on Pi 5 - robkyf - 07-14-2024
(07-14-2024, 01:04 PM)Tim Curtis Wrote: Reboot and post the moode startup log
Ok, rebooted startup log:
Code: [b]rob@moode[/b]:[b]~ $[/b] moodeutl -l
20240714 174314 worker: --
20240714 174314 worker: -- Start moOde 9 series
20240714 174314 worker: --
20240714 174314 worker: Successfully daemonized
20240714 174314 worker: Wait for Linux startup
20240714 174320 worker: Linux startup complete
20240714 174320 worker: Boot config is ok
20240714 174320 worker: Session loaded
20240714 174321 worker: Package locks applied
20240714 174321 worker: File check complete
20240714 174321 worker: Debug logging on
20240714 174321 worker: --
20240714 174321 worker: -- System
20240714 174321 worker: --
20240714 174322 worker: Host name: moode
20240714 174322 worker: RPi model: Pi-5B 1.0 4GB
20240714 174322 worker: moOde release: 9.0.4 2024-07-06
20240714 174322 worker: RaspiOS: 12.6 Bookworm 64-bit
20240714 174322 worker: Linux Kernel: 6.6.31 64-bit
20240714 174322 worker: MPD version: 0.23.14
20240714 174322 worker: User id: rob
20240714 174322 worker: Home folder: /home/rob
20240714 174322 worker: Time zone: Europe/London
20240714 174322 worker: Kbd layout: gb
20240714 174322 worker: HDMI ports(s): on
20240714 174322 worker: Sys LED0: on
20240714 174322 worker: Sys LED1: on
20240714 174322 worker: Reduce power: off
20240714 174322 worker: CPU governor: ondemand
20240714 174322 worker: Integ audio: vc4-kms-v3d
20240714 174322 worker: --
20240714 174322 worker: -- Network
20240714 174322 worker: --
20240714 174322 worker: Eth0
20240714 174322 worker: Ethernet: adapter exists
20240714 174322 worker: Ethernet: timeout off
20240714 174322 worker: Ethernet: address not assigned
20240714 174322 worker: Wlan0
20240714 174322 worker: Wireless: adapter exists
20240714 174322 worker: Wireless: country DE
20240714 174322 worker: Wireless: SSID RobNetwork
20240714 174322 worker: Wireless: other None
20240714 174322 worker: Wireless: timeout up to 90 secs
20240714 174322 worker: Wireless: connect to RobNetwork
20240714 174322 worker: Wireless: method dhcp
20240714 174322 worker: Wireless: address 192.XXX.X.XX
20240714 174322 worker: Wireless: netmask 255.XXX.XXX.X
20240714 174322 worker: Wireless: gateway 192.XXX.X.XX
20240714 174322 worker: Wireless: pri DNS 192.XXX.X.XX
20240714 174322 worker: Wireless: domain none found
20240714 174322 worker: --
20240714 174322 worker: -- File sharing
20240714 174322 worker: --
20240714 174322 worker: SMB file sharing: on
20240714 174322 worker: NFS file sharing: off
20240714 174322 worker: DLNA file sharing: off
20240714 174322 worker: --
20240714 174322 worker: -- Special configs
20240714 174322 worker: --
20240714 174322 worker: Plexamp: not installed
20240714 174322 worker: RoonBridge: not installed
20240714 174322 worker: Allo Piano 2.1: not detected
20240714 174322 worker: Allo Boss 2: not detected, OLED script ok
20240714 174322 worker: IQaudIO AMP*: not detected
20240714 174322 worker: --
20240714 174322 worker: -- ALSA debug
20240714 174322 worker: --
20240714 174322 worker: Cards: 0:Series 1:vc4hdmi0 2:vc4hdmi1 3:empty
20240714 174322 worker: 4:empty 5:empty 6:empty 7:empty
20240714 174322 worker: Mixers: 0:(PCM) 1:none 2:none 3:none
20240714 174322 worker: 4:none 5:none 6:none 7:none
20240714 174322 worker: --
20240714 174322 worker: -- Audio configuration
20240714 174322 worker: --
20240714 174322 worker: Audio device: 0:Audiolab 8200 Series
20240714 174322 worker: ALSA card: has not been reassigned
20240714 174322 worker: MPD config: update not needed
20240714 174323 worker: ALSA output: USB
20240714 174323 worker: ALSA mode: Default (plughw)
20240714 174323 worker: ALSA mixer PCM
20240714 174323 worker: ALSA volume: 100% (0.00dB)
20240714 174323 worker: ALSA maxvol: 100%
20240714 174323 worker: ALSA loopback: off
20240714 174323 worker: MPD mixer Fixed (0dB)
20240714 174323 worker: Audio formats: S24_3LE
20240714 174323 worker: CamillaDSP: off
20240714 174323 worker: CDSP volume: 0dB
20240714 174323 worker: CDSP volrange: 60dB
20240714 174323 worker: --
20240714 174323 worker: -- MPD startup
20240714 174323 worker: --
20240714 174323 worker: MPD service: started
20240714 174323 worker: MPD port 6600: accepting connections
20240714 174323 worker: MPD ALSA Default: on
20240714 174323 worker: MPD ALSA Bluetooth: off
20240714 174323 worker: MPD HTTP Server: off
20240714 174323 worker: MPD volume: 0
20240714 174323 worker: Saved MPD vol: -1
20240714 174323 worker: Saved SRC vol: 0
20240714 174323 worker: MPD crossfade: off
20240714 174323 worker: MPD ignore CUE: no
20240714 174323 worker: MPD CDSP volsync: off
20240714 174323 worker: --
20240714 174323 worker: -- Music sources
20240714 174323 worker: --
20240714 174323 worker: USB drives: no drives found
20240714 174323 worker: NAS sources: no music sources defined
20240714 174323 worker: --
20240714 174323 worker: -- Feature availability
20240714 174323 worker: --
20240714 174323 worker: Input select: available, Source: MPD, Output: Audiolab 8200 Series
20240714 174323 worker: Bluetooth: available, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20240714 174323 worker: AirPlay: available
20240714 174323 worker: Spotify Connect: available
20240714 174323 worker: Squeezelite: available
20240714 174323 worker: UPnP client: available
20240714 174323 worker: Plexamp: not installed
20240714 174323 worker: RoonBridge: not installed
20240714 174323 worker: Multiroom: available
20240714 174323 worker: GPIO buttons: available
20240714 174323 worker: HTTPS mode: available
20240714 174323 worker: Stream recorder: n/a
20240714 174323 worker: --
20240714 174323 worker: -- Peripherals
20240714 174323 worker: --
20240714 174323 worker: Local display: off
20240714 174323 worker: On-screen kbd: off
20240714 174323 worker: HDMI 4K 60Hz: off
20240714 174323 worker: Rotary encoder: off
20240714 174323 worker: USB volume knob: off
20240714 174323 worker: LCD updater: off
20240714 174323 worker: --
20240714 174323 worker: -- Miscellaneous
20240714 174323 worker: --
20240714 174323 worker: Software update: Automatic check off
20240714 174323 worker: Auto-CoverView: off
20240714 174323 worker: CoverView timeout: Never
20240714 174323 worker: Auto-shuffle: off
20240714 174323 worker: Auto-play: off
20240714 174323 worker: Web SSH server: on
20240714 174323 worker: Maintenance task: 360 mins
20240714 174323 sendFECmd(): File open failed, UI has never been opened in Browser
20240714 174323 worker: Current view: reset to Playback
20240714 174323 worker: Active flags: all false
20240714 174323 worker: Reset flags: skipped
20240714 174323 worker: Session check: ok
20240714 174323 worker: --
20240714 174323 worker: -- Startup complete
20240714 174323 worker: --
20240714 174323 worker: Mount monitor: started
20240714 174323 worker: Radio monitor: off
20240714 174323 worker: Watchdog monitor: started
20240714 174323 worker: Responsiveness: Default
20240714 174323 worker: Sleep intervals: worker=3, waitworker=1, watchdog=6, mountmon=30, mpdmon=6, gpiobuttons=1
20240714 174323 worker: Ready
20240714 174452 waitWorker(): Start sys-config, w_active=0
20240714 174452 waitWorker(): End sys-config, w_active=0
RE: Audio glitching on Pi 5 - Tim Curtis - 07-14-2024
Ok thx.
The moode log shows the mixer name as "PCM" but MPD log shows "no such mixer control: PCM" among other errors. This could be some sort of bug in mixer name assignment.
Post the output of the command below. It should show the actual mixer name for the audio device.
RE: Audio glitching on Pi 5 - robkyf - 07-14-2024
Thanks @Tim Curtis. Here's the output:
Code: [b]rob@moode[/b]:[b]~ $[/b] aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Series [Audiolab 8200 Series], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
RE: Audio glitching on Pi 5 - Tim Curtis - 07-14-2024
(07-14-2024, 07:53 PM)robkyf Wrote: Thanks @Tim Curtis. Here's the output:
Code: [b]rob@moode[/b]:[b]~ $[/b] aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Series [Audiolab 8200 Series], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Not listed in that output. Lets try the command below.
RE: Audio glitching on Pi 5 - robkyf - 07-14-2024
Ok, that returns:
Code: [b]rob@moode[/b]:[b]~ $[/b] amixer -c0
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 83
Mono: Playback 80 [96%] [0.00dB] [on]
RE: Audio glitching on Pi 5 - simonb - 07-14-2024
(07-14-2024, 09:50 AM)robkyf Wrote: 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
I strongly suspect it might be the fact your playing the music from the SD card. Not knowing what model it is they don't really like simultaneous write and reads. So the operating system might be writing as you are reading the music file causing a pause.
To be able to read any log files via a terminal it's probably a good idea to sudo to the root user for permissions.
you can then type exit to logout from root back to rob.
I have my rpi 4B cpu set to on demand including taking the input/output ( IO ) activity into account. But the bottom line I believe is the SD CARD. Move your music to a USB stick and test. A much faster SD card might help if yours is a slow one.
I do the following. Your sd card name might be different.
Code: pi@MoodeLCD:~ $ hdparm -tT /dev/mmcblk0
Results are:
Code: /dev/mmcblk0:
Timing cached reads: 2080 MB in 2.00 seconds = 1040.06 MB/sec
Timing buffered disk reads: 132 MB in 3.05 seconds = 43.35 MB/sec
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 2208 MB in 2.00 seconds = 1104.31 MB/sec
Timing buffered disk reads: 132 MB in 3.04 seconds = 43.35 MB/sec
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 2024 MB in 2.00 seconds = 1011.88 MB/sec
Timing buffered disk reads: 132 MB in 3.04 seconds = 43.35 MB/sec
As a point of interest my USB attached SSD disk is:
Code: pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 2226 MB in 2.00 seconds = 1113.56 MB/sec
Timing buffered disk reads: 1028 MB in 3.02 seconds = 340.22 MB/sec
pi@MoodeLCD:~ $
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1998 MB in 2.00 seconds = 999.53 MB/sec
Timing buffered disk reads: 958 MB in 3.00 seconds = 319.23 MB/sec
pi@MoodeLCD:~ $
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 2004 MB in 2.00 seconds = 1002.06 MB/sec
Timing buffered disk reads: 1000 MB in 3.00 seconds = 333.18 MB/sec
pi@MoodeLCD:~ $
And finally a USB memory stick:
Code: pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1918 MB in 2.00 seconds = 959.58 MB/sec
Timing buffered disk reads: 68 MB in 3.07 seconds = 22.12 MB/sec
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1918 MB in 2.00 seconds = 959.24 MB/sec
Timing buffered disk reads: 68 MB in 3.05 seconds = 22.30 MB/sec
pi@MoodeLCD:~ $ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 2104 MB in 2.00 seconds = 1052.79 MB/sec
Timing buffered disk reads: 68 MB in 3.06 seconds = 22.23 MB/sec
pi@MoodeLCD:~ $
The USB memory stick is slower than the SD card in my case. But nothing is being written to it at the same time it is being read.
Cheers.
RE: Audio glitching on Pi 5 - robkyf - 07-14-2024
Many thanks @simonb.
That explanation makes sense - as mentioned in my original post, I've had no problems running the same setup with a Pi Zero 2 W but the volume of music files on that SD card is much less than on the one I'm using with the Pi 5, and the card I'm using with the Pi 5 is a relatively cheap Amazon Basics one.
It's getting late here in the UK but I'll try moving the music files off the SD card and onto a USB stick tomorrow and report back on whether there's any change.
Many thanks!
RE: Audio glitching on Pi 5 - simonb - 07-15-2024
(07-14-2024, 09:04 PM)robkyf Wrote: Many thanks @simonb.
That explanation makes sense - as mentioned in my original post, I've had no problems running the same setup with a Pi Zero 2 W but the volume of music files on that SD card is much less than on the one I'm using with the Pi 5, and the card I'm using with the Pi 5 is a relatively cheap Amazon Basics one.
It's getting late here in the UK but I'll try moving the music files off the SD card and onto a USB stick tomorrow and report back on whether there's any change.
Many thanks!
I'm also in the sunny UK.
|