Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Raspberry Pi Zero W: pops or clicks
#1
Sad 
Hi at all.
premise: I have a raspberry pi4 and moodeaudio works very well!
however, I thought of using a raspberry pi zero w for electricity (I'm green, what can you do? Smile), so I can always keep it on.
so I did the installation and it works, but I feel clicks and pops. everything has remained unchanged (NAS source, and DAC) between the two configurations, only the raspberry changes.
I use a USB DAC with DSD1796 chip, in the bottom also place some logs.
even if I leave the file frequency or if I set 44.1 / 16 some clicks is noticeable, rarely anyway. if set to 192/24 the songs are unheard: at least a couple of clicks are heard every 5 seconds.
I tried some changes: bits and frequency, MPD version (use 6.5.2 2020-05-03, so I also tried with 0.22 of tests), left in performance, enabled the threads (and various combinations of these).
I tried the parameters
dwc_otg.speed = 1
dwc_otg.fiq_fix_enable = 1
dwc_otg.nak_holdoff_enable = 1
dwc_otg.fiq_fsm_enable = 0
I also tried to force the usb 1.1 mode
I thought it was a CPU problem but the usage is as described by others: 10% without oversampling at 16/44, and 50% at 24/192.
I think more than enough: all pocket MP3 players have smaller processors.
/ var / log / mpd does not report anything.

do you have ideas?


-----------------------------



S Y S T E M   P A R A M E T E R S

moOde release           = 6.5.2 2020-05-03</li>
Raspbian OS             = 10.3
Linux kernel            = 4.19.115+ #1305
Platform                = Pi-Zero W 512MB v1.1
Architecture            = armv6l (32-bit)
System uptime           = up 41 minutes
Timezone                = Europe/Rome
Current time            = 2020-06-06 17:42:50

Host name               = moode
Ethernet address        = unassigned
Ethernet MAC            = no adapter
WLAN address            = 192.168.79.164
WLAN MAC                = b8:27:eb:44:bc:7e
WLAN country            = IT

SoC identifier          = bcm2835
Core count              = 1
Kernel timer freq       = 100 Hz
SDCard freq             = 50 MHz
USB boot                = not available
Warranty                = OK

Root size               = 15G
Root used               = 19%
Root available          = 11G
Root expand             = expanded
Memory free             = 68 MB
Memory used             = 90 MB
SoC temperature         = 37.9°C

CPU governor            = performance
Onboard WiFi            = On
Onboard BT              = On
HDMI output             = Off
LED state               = 0,1
Eth addr wait           = Off
Max USB current         = Off
USB (UAC2) fix          = On
Pi-3B+ eth fix          = Off
SSH term server         = On

PHP-FPM version         = 7.3.11
NGINX version           = 1.14.2
SQLite3 version         = 3.27.2
Hostapd version         = 2.8-devel
WiringPi version        = 2.50
RPi.GPIO version        = 0.7.0

A U D I O   P A R A M E T E R S

Audio device            = USB audio device
Interface               = USB
Mixer name              = HIFI-Ref Output
Hardware volume         = Controller detected
Max ALSA volume         = 100
Max MPD volume          = 100
Volume step limit       = 10
Audio source            = Local
Output device           = Local
Resume MPD              = No
Volume knob             = 0
Volume mute             = Unmuted
Saved MPD vol           = 0
Preamp volume           = 0
ALSA version            = 1.1.8-1+rpt1
SoX version             = 0.1.2-3

Bluetooth controller    = On
Pairing agent           = On
Airplay receiver        = Off
Spotify receiver        = Off
Squeezelite             = Off
UPnP client             = Off
DLNA server             = Off
GPIO button handler     = Off
UPnP browser            = Off

Auto-shuffle            = Off
Autoplay                = Off
Rotary encoder          = Off
Encoder params          = 100 2 3 23 24
USB volume knob         = Off
Polarity inversion      = Off
Crossfeed               = Off
Crossfade               = Off
Parametric EQ           = Off
Graphic EQ              = Off
MPD httpd               = Off

A P P E A R A N C E   S E T T I N G S

Themes and backgrounds
----------------------
Theme                   = Default
Accent color            = Emerald
Alpha blend             = 1.0
Adaptive background     = No
Background image        = No
Cover backdrop          = No
Cover blur              = 20px
Cover scale             = 1.25

Library options
----------------------
Instant play action     = Add/Play
Show tagview genres     = Yes
Show tagview covers     = Yes
Ellipsis limited text   = No
Albumview sort order    = by Artist
Tagview sort order      = by Artist
Compilation identifier  = Various Artists
Recently added          = 1 Month
Ignore articles         = a,an,the
UTF8 character filter   = No
Hi-res thumbs           = Auto
Cover search pri        = Embedded cover
Pixel ratio             = 2.375

Coverview screen saver
----------------------
CoverView auto-display  = Never
CoverView style         = Gradient (Linear)

Other options
----------------------
Font size               = Normal
Auto-shuffle filter     = None
Extra metadata          = track,disc,date,composer,encoded
Playback history        = No

M P D   S E T T I N G S

Version                 = 0.22~git
Volume control          = hardware
ALSA device             = hw:1
SoX resampling          = 96000:24:2
SoX quality             = very high
SoX multithreading      = on
DSD over PCM (DoP)      = no
Replaygain              = off
Replaygain preamp       = 0
Volume normalization    = No
Audio buffer            = 4096 (kb)
Output buffer size      = 131072 (kb)

B L U E T O O T H   S E T T I N G S

Bluetooth ver           = 5.50
Bluealsa ver            = 2.0.0
Speaker sharing         = No
Resume MPD              = No
PCM buffer time         = 500000 (μs)

M O O D E   S T A R T U P   L O G

20200606 170210 worker: -- Start
20200606 170210 worker: Successfully daemonized
20200606 170211 worker: Integrity check (passed)
20200606 170211 worker: Session loaded
20200606 170211 worker: Debug logging (off)
20200606 170211 worker: Device raw: (0:ALSA|1:HIFIRef|i2s:none)
20200606 170211 worker: Device cfg: (USB audio device|1|1|HIFI-Ref Output|0)
20200606 170214 worker: ALSA volume set to (0%)
20200606 170214 moode.php: MPD connect failed: cmd=(playlist)
20200606 170215 worker: -- System
20200606 170219 worker: Host     (moode)
20200606 170219 worker: moOde    (6.5.2 2020-05-03)
20200606 170219 worker: Raspbian (10.3)
20200606 170219 worker: Kernel   (4.19.115+ #1305)
20200606 170219 worker: Platform (Pi-Zero W 512MB v1.1)
20200606 170219 worker: ARM arch (armv6l, 32-bit kernel)
20200606 170219 worker: MPD ver  (0.22~git)
20200606 170219 worker: CPU gov  (performance)
20200606 170219 worker: USB boot not available
20200606 170219 worker: File system expanded
20200606 170220 worker: HDMI port off
20200606 170222 worker: File check (OK)
20200606 170222 worker: -- Network
20200606 170222 worker: eth0 does not exist
20200606 170222 worker: eth0 address not assigned
20200606 170222 worker: wlan0 exists
20200606 170222 worker: wifi country (IT)
20200606 170222 worker: wlan0 trying SSID (mAo)
20200606 170223 worker: IP addr (192.168.79.164)
20200606 170223 worker: Netmask (255.255.255.0)
20200606 170223 worker: Gateway (192.168.79.254)
20200606 170224 worker: Pri DNS (8.8.8.8)
20200606 170224 worker: Domain  (1.1.1.1)
20200606 170224 worker: -- Audio
20200606 170238 worker: ALSA outputs unmuted
20200606 170238 worker: ALSA card number (1)
20200606 170238 worker: Audio output (USB audio device)
20200606 170238 worker: Audio formats (S32_LE, SPECIAL, DSD_U32_BE)
20200606 170239 worker: ALSA mixer name (HIFI-Ref Output)
20200606 170239 worker: MPD volume control (hardware)
20200606 170239 worker: Hdwr volume controller exists
20200606 170239 worker: Max ALSA volume (100%)
20200606 170239 worker: Reset renderer active flags
20200606 170239 worker: -- MPD
20200606 170241 worker: MPD conf updated
20200606 170242 worker: MPD started
20200606 170244 worker: MPD accepting connections
20200606 170244 worker: Configure MPD outputs
20200606 170244 worker: MPD output 1 ALSA default (on)
20200606 170244 worker: MPD output 2 ALSA crossfeed (off)
20200606 170244 worker: MPD output 3 ALSA parametric eq (off)
20200606 170244 worker: MPD output 4 ALSA graphic eq (off)
20200606 170244 worker: MPD output 5 ALSA polarity inversion (off)
20200606 170244 worker: MPD output 6 ALSA bluetooth (off)
20200606 170244 worker: MPD output 7 HTTP stream (off)
20200606 170244 worker: MPD crossfade (off)
20200606 170244 worker: -- Feature availability
20200606 170244 worker: Source select (available)
20200606 170244 worker: Source select (source: MPD)
20200606 170244 worker: Source select (output: USB audio device)
20200606 170244 worker: Bluetooth (available)
20200606 170244 worker: Bluetooth (started)
20200606 170252 worker: Bluetooth pairing agent (started)
20200606 170253 worker: Airplay renderer (available)
20200606 170253 worker: Spotify renderer (available)
20200606 170253 worker: Squeezelite renderer (available)
20200606 170253 worker: UPnP renderer (available)
20200606 170253 worker: DLNA server (available)
20200606 170253 worker: UPnP browser (available)
20200606 170253 worker: Audio scrobbler (available)
20200606 170253 worker: GPIO button handler (available)
20200606 170253 worker: -- Music sources
20200606 170253 worker: USB sources (none attached)
20200606 170256 worker: NAS and UPnP sources (mountall initiated)
20200606 170256 worker: -- Miscellaneous
20200606 170256 worker: USB volume knob (Off)
20200606 170256 worker: Shellinabox SSH started
20200606 170256 worker: USB auto-mounter (udisks-glue)
20200606 170257 worker: LED0 (Off)
20200606 170257 worker: LED1 (sysclass does not exist)
20200606 170257 worker: Saved MPD vol level (0)
20200606 170257 worker: Preamp volume level (0)
20200606 170257 worker: MPD volume level (0) restored
20200606 170258 worker: ALSA volume level (0%)
20200606 170258 worker: Auto-play (Off)
20200606 170258 worker: Maintenance interval (3 hrs)
20200606 170258 worker: Screen saver activation (Never)
20200606 170258 worker: Session permissions (OK)
20200606 170258 worker: Watchdog started
20200606 170258 worker: Ready





pi@moode:~ $ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.19
S:  Manufacturer=Linux 4.19.115+ dwc_otg_hcd
S:  Product=DWC OTG Controller
S:  SerialNumber=20980000.usb
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  2
P:  Vendor=20b1 ProdID=000a Rev=06.60
S:  Manufacturer=XMOS
S:  Product=HIFI-Ref
C:  #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
I:  If#=0x2 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)


*** Scanning for playback devices ***
Card 0, ID `ALSA', name `bcm2835 ALSA'
  Device 0, ID `bcm2835 ALSA', name `bcm2835 ALSA', 7 subdevices (7 available)
    1..2 channels, sampling rate 8000..192000 Hz
    Sample formats: U8, S16_LE
    Buffer size range from 256 to 131072
    Period size range from 256 to 131072

      Subdevice 0, name `subdevice #0'
      Subdevice 1, name `subdevice #1'
      Subdevice 2, name `subdevice #2'
      Subdevice 3, name `subdevice #3'
      Subdevice 4, name `subdevice #4'
      Subdevice 5, name `subdevice #5'
      Subdevice 6, name `subdevice #6'
  Device 1, ID `bcm2835 IEC958/HDMI', name `bcm2835 IEC958/HDMI', 1 subdevices (1 available)
    2..8 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE
    Buffer size range from 441 to 32768
    Period size range from 441 to 32768

      Subdevice 0, name `subdevice #0'
  Device 2, ID `bcm2835 IEC958/HDMI1', name `bcm2835 IEC958/HDMI1', 1 subdevices (1 available)
    2..8 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE
    Buffer size range from 441 to 32768
    Period size range from 441 to 32768

      Subdevice 0, name `subdevice #0'
Card 1, ID `HIFIRef', name `HIFI-Ref'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rate 44100..384000 Hz
    Sample formats: S32_LE, SPECIAL, DSD_U32_BE
    Buffer size range from 16 to 131072
    Period size range from 8 to 65536

      Subdevice 0, name `subdevice #0'
pi@moode:/home $ cat /proc/asound/card1/pcm0p/sub0/sw_params
tstamp_mode: NONE
period_step: 1
avail_min: 12000
start_threshold: 36000
stop_threshold: 48000
silence_threshold: 0
silence_size: 0
boundary: 1572864000
pi@moode:/home $ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 12000
buffer_size: 48000
pi@moode:/home $ cat /proc/asound/card1/pcm0p/sub0/status
state: RUNNING
owner_pid   : 1472
trigger_time: 2321.403261605
tstamp      : 0.000000000
delay       : 38259
avail       : 9838
avail_max   : 39954
-----
hw_ptr      : 2781838
appl_ptr    : 2820000
Reply
#2
Prolly SoX + SoX multi-threading is hogging resources on the slow, single-core arm6.

Consider getting a 3A+ which is also low power but it's based on a fast arm7 multi-core and supports 5Ghz WiFi band.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
hmmm... ok.
But is a CPU problem? Or CPU+USB (like IRQ...)?
rephrase: if instead of a USB dac I use an i2s DAC connected via GPIO, the problem remains?
Reply
#4
(06-07-2020, 11:32 AM)_mAo_ Wrote: hmmm... ok.
But is a CPU problem? Or CPU+USB (like IRQ...)?
rephrase: if instead of a USB dac I use an i2s DAC connected via GPIO, the problem remains?

For information.
I tried with a hifiberry digi+, then i2s not USB, and the problem is wanished.
In this way all is ok. CPU still at 45% but no problem found.
Reply
#5
Is the USB DAC self-powered or drawing power over the USB connection...?

If it is not self-powered try to use a self-powered USB hub between the RPi Zero and the USB DAC...
Reply
#6
(06-26-2020, 04:43 AM)CallMeMike Wrote: Is the USB DAC self-powered or drawing power over the USB connection...?

If it is not self-powered try to use a self-powered USB hub between the RPi Zero and the USB DAC...

No, isn't self powered.
I'll trying in the next days, obviously only for verification since I solved it with the i2s.
Thx for your suggest.
Reply
#7
With an external Power source (USB dac) the problem still persist.
Reply
#8
Is it a thin crappy USB cable by any chance?
These can be prone to EMF from nearby/touching power cables and interference causing data errors and the ticking/snapping sound which should get worse as the resolution increases.
Reply
#9
I would start with a fresh, unmodified 6.5.2 image and then just make one setting to configure MPD for Hardware volume.

Play a track and then if there are audio glitches then there is probably some sort of hardware issue for example a bad power supply, Pi board, or as @vinnn suggested a cable thats allowing EMI to leak in. The other possibility is that the USB chipset on the ZeroW is not compatible with your DAC's USB chipset.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
no, the cable is well made. it is also the same that does not cause problems with the Raspberry 4..
I have already redone the card from the new image, nothing has changed. the power supply is not lousy, but neither is it excellent. i tried with several without differences but with the i2s dac i have no problems. I have the clicks even without oversampling, even if less, so I would say that the cable is not. I do not know what to think.
Reply


Forum Jump: