i’m having trouble with 5.1 audio playback on the following setup:
Rasberry 1 Model B
LogiLink USB Sound Box 7.1 8-Channel UA0099
connected through LogiLink UA0125 USB-Hub
Logitech X-530 sound system
USB sound card was recognized out of the box as ALSA device in OSMC settings.
ALSA: USB Sound Device (@:CARD=Device,DEV=0), Analog
choosing this I get 5.1 surround, but the playback suffers from cracking noises - sometimes more, sometimes less. Furthermore there is some weird pitchbend in the beginning of a video playback.
ALSA: USB Sound Device (surround:21:CARD=Device,DEV=0), Analog
choosing this I get only Stereo output, but no crackling noises and no pitchbend.
ALSA: USB Sound Device, S/PDIF
I tried the following fixes:
Installing pulseaudio as pointed out here resulted in Stereo output only and 100% cpu load.
Creating an asound.conf file as pointed out here but with the name “Device” for my card. Resulted in new “Default” ALSA device, but choosing this makes no difference and 5.1 surround remains distorted.
I don’t know much about kodi except some basics but can I ask what you are trying to watch/listen. Is this on every file or certain ones. Is this happening from streams/downloads, or your personal collection?
I tried to play video files with AC3 audio and a sampling rate of 48kHz. The crackling disruptions only occur when audio output channels are set to 4.0 or higher. Music files with 44.1kHz are played without disruptions.
The problem is now solved.
I forgot to mention, that the USB sound card is plugged into an USB hub in my setup. This hub seems to be the cause of the disruptions.
When I plug the sound card directly to the Pi’s USB port, everything plays fine.
Another solution to stick with my setup and use the sound card through the hub is to limit the sampling rate:
Settings > System > Audio output > Output configuration > Fixed, Limit sampling rate (kHz): 44.1
So no messing with asound.conf or anything is needed. I will edit my first post and complete the setup.