External USB audio, hiss and clicking sound

Hi. I use Alpha 4 and Raspberry Pi 2.

I connected my USB external sound card to the pi and it was recognized in the System -> Audio Input menu. That is the good part.
Once I select one, the nice “click” sound when selecting menu items in kodi turns into an uncomfortable and short hiss-click sound. Sound in media files turns into the same intermittent clicks and hiss from the kodi menus and movies play at just a few frames per second. top shows that kodi is struggling with 100% CPU utilization (on one core).

Is there any log i can get you that can help solve this problem?
The sound card didn’t work in raspbmc either by the way.

Regards

I suspect you need to configure an /etc/asound.conf so that it is set properly.

You should probably disable passthrough if that is enabled and make sure you can get some 2 channel analog audio first

Sam

Hi

I didn’t see any passthrough option. It is set to 2.0 speakers.
I can’t find any asound.conf in the /etc/ directory. Am i supposed to create one from scratch? How?

Thank you for helping me :-).

Here is a screenshot of what I see in the menu:

This is the result of running “cat /proc/asound/cards”
1 [Audio ]: USB-Audio - NAD USB Audio
NAD Electronics NAD USB Audio at usb-bcm2708_usb-1.4, full speed

This is a link to the data sheet of the DAC:
http://nadelectronics.com/download.php?131209102650-NAD_MDC_DAC_2-0_DataSheet.pdf|MDC%20DAC%202.0%20USB%20Digital-to-Analogue%20Converter

Regards

Hi

Yes, you would be expected to create that file as OSMC on Pi does not use an ALSA sink by default.

If you google for some examples you will find out how to configure it.

I think bitstreaming over USB will be problematic

Sam

I think I’ll just give up then.

I really don’t understand where to look for guides. I cannot find any that mention asound.conf and the ones that I do find only mention how to set the default sound card.

That is not my issue. The issue is that the default sound card when set doesn’t output sound as it should.

I don’t know what “alsa sink” or “bitstreaming” means.

Thanks for the help though.

I got it! It is finally working.

Issuing the following command in the terminal

sudo apt-get install pulseaudio alsa-utils

fixed the issue.
I tested the DAC by further issuing (which is why I also installed alsa-utils to get aplay)

cat /dev/urandom | aplay -D hw:1,0 -f S24_3LE -c 2

After installing the package a new sound card called “Pulseaudio” became visible in Settings->System->Audio which corresponds to the USB DAC.
Music (even airplay) and video playback works.

I used Configuring Sound on Linux/Pulse Audio/Troubleshooting - Wikibooks, open books for an open world for reference.

No asound,conf necessary :-).

1 Like

hey elskildsf, what USB soundcard are you using? I’m looking to buy one to improve the sound in osmc on my RPi 2 & haven’t seen a list of compatible devices anywhere.

Hi

I use a DAC that is built into my NAD C375BEE amplifier so you can’t really buy it without also buying a rather expensive amplifier which you may not want.

Recently I got the DAC to work with Kodi by activating Expert level settings and then playing around with the new settings that appeared. I don’t know exactly what happened but now it works without Pulseaudio - Hooray!

yeah, that’s too much for my needs. I’m just after an inexpensive USB sound adaptor that’ll improve the pi 2’s analogue audio.

but thanks for replying. I reckon I also need to research more about alsa & pulseaudio before making a purchase.

Many thanks eskildsf. I have an RP2 with OSMC RC2 which I use for audio only. I followed your tips and got my NAD 3020D integrated DAC/Amp working over USB. The sound is a significant improvement over the HDMI to Spdif setup I was using (some processing going on in the TV I suspect).
I’d be interested in the Expert level settings you mentioned - what did you do and does it make any difference to the sound?

1 Like

Thats great :-). I’ll get you a screenshot for you of my settings.

Regards

I too was looking for an external USB sound card w/ s/pdif (= 5.1 digital output). My receiver does not have an HDMI input. And my old TV didn’t have a digital audio out. So I bought this USB card from DealExtreme. It’s output was very “stuttery” 5.1 digital sound. In the old RaspBMC forums there’s a topic from me about this.

Currently I have my Pi hooked up to my TV w/ HDMI and luckily my TV has a digital output (optical, toslink). That in turn is connected to my Dolby Digital/DTS capable receiver. Works flawlessly.

Some say devices like the one I bought from DX work for them. I’ve got bad experiences with this.

P.S. Beware: there are two “standards” for digital audio out: stereo and 5.1. Most “sound cards” w/ dig. out only support the setereo kind and no way you can tell on beforehand if it’s a 5.1 or a stereo type.

Hi guys,

I know the subject is old but I just got my new Rpi2 yesterday and I’m facing the same problem and same symptoms as the first message of this thread( I’m using OSMC, up-to-date version)

However, I’m on a mac and on top that a Noob (I had never written any command until yesterday…). When I’m following eskildsf’s procedure about Pulseaudio, terminal says the following:

"Package alsa-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Impossible de trouver le paquet pulseaudio
E: Package ‘alsa-utils’ has no installation candidate"

I’m kind of lost here and unfortunately eskildsf didn’t put any of the screenshot of his settings to get over this problem… Some help would be very appreciated :blush:

Thank you very much!!

Ps:

  • Sorry for my english, I’m french.
  • My Dac is also a NAD D3020

Run sudo apt-get update first before you try and install alsa-utils.

Sam

Thank you for your fast answer!

And thanks again, everything works fine now, what a relief!

Adam

The “white-noise” hiss seems to be a bug when using GPU acceleration for resampling. It depends on your USB video card. To fix mine, I created an asound.conf file that creates an audio device (so that OSMC doesn’t die if the USB DAC is turned off) and that explicitly disables resampling (I’m only using mine to run music).
My asound.conf is as follows:

pcm.Audio
{
	type hw
	card "Audio"
}

ctl.!default {
        type hw
        card "Audio"
}

pcm.!default {
	type plug
	slave {
		#pcm "hw:1,0"
		pcm "Audio"
		rate "unchanged"
	}
}

I got the info for this from Asoundrc - AlsaProject and Stop resampling! under Linux | Audiokarma Home Audio Stereo Discussion Forums (and a few more hints from http://openelec.tv/forum/124-raspberry-pi/74575-usb-dac-stopped-working-in-version-5-0 ) so that i could pass through bit-perfect music. I got the name of my device by running “cat /proc/asound/card1/id” because my USB DAC is the first card. “aplay -l” should give you any other info you need.

Once you’ve created the asound.conf file and rebooted, OSMC shows a new audio output device “ALSA Default…” and I selected that. Now my RPi with OSMC can be used to feed bit-perfect audio data to my hifi USB DAC.
Hopefully this is helpful to anyone with the same / a similar problem (hence adding my reference links).
Maz

2 Likes

Hi Dicky,
I have the same USB DAC. See my previous post if you want to stop the RPi resampling your files.
Maz

There’s no format/sample-rate conversion if ALSA hardware devices are accessed directly. The conversion in OSMC itself seems to cause high CPU-load. The ALSA-plugin “plug” does format/rate conversion. MAZ puts it on top of the ALSA hardware device in his asound.conf.

You can also use the name from “cat /proc/asound/cardX/id” instead of the ALSA device ID. It’s especially useful if you have multipe ALSA devices.

hi there

any idea how the asound.conf needs to look like on apple tV in order to use bit perfect audio over its optical output?

tnx
simon

You are aware you are in the RaspPi subforum right?