newbie questions on hiss/noise and DAC shield for pi B+

Raspberry Pi related support

newbie questions on hiss/noise and DAC shield for pi B+

Postby waves » 31 Dec 2014, 11:00

Hi, I'm new to RuneAudio - great software! Let me ask a few questions before buying a DAC shield for the pi B+.

Background: I run RuneAudio 0.3 on a raspi B+ connected through the 3.5mm audio output to a small amp and speakers. There is a noticeable hiss/noise to the sound. From reading threads here and in the raspi forums I've understood that
1 raspi B+ has more such background hiss/noise than the B model, which also had problems.
2 the problem is worsened if volume is controlled in software (RuneAudio) rather than with the hardware knob on the amp.
That makes me want to buy a DAC shield for the pi B+. I take it that should help with problem 1. The HiFiBerry DAC+ and PI-DAC+ shields are on par in price. I don't know enough to compare the features but both look plenty good for my use case.

Now the questions.

Both DACs claim to have "hardware volume control". What is that? Does that remove problem 2? I ask because I'd prefer to leave my hardware amp on a fixed volume and then control volume from RuneAudio clients.

If that does not remove problem 2 is there any other software or hardware shield ways around problem 2? Since the pi has GPIO a last resort solution could be to attach a small servo to the amp hardware volume knob and control the servo position in python on the pi. Has anyone done that already and documented it? The step I'm unfamiliar with is to modify the RuneAudio volume control code to trigger a python script and send along a variable (a number between 0 and 100).
waves
 
Posts: 125
Joined: 31 Dec 2014, 10:33

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby ACX » 31 Dec 2014, 11:26

Hi waves,
a I2S DAC like HiFiBerry DAC+ or IQaudIO PI-DAC+ will solve the problem, as you won't hear any hiss using both software and hardware volume control.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1693
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby gswg » 31 Dec 2014, 14:51

Hi waves,

Hardware volume control is built into the Texas Instruments PCM5122 DAC - this is the device I've used on the IQaudIO Pi-DAC(+)s. In terms of volume control the DAC itself controls the output rather than the digital input being modified (to reduce the volume in software) before reaching the DAC.

You can take advantage of the hardware volume control through ALSA - even adding a rotary encoder to deliver a physical volume dial etc.

Season's greetings,

Gordon@iqaudio.com
gswg
 
Posts: 55
Joined: 21 Jan 2014, 21:04
Location: Glasgow

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby waves » 03 Jan 2015, 12:11

Thanks ACX and Gordon for the replies. I will get one of the DAC shields then. I like it when product devs are active in forums so I'm leaning towards the IQaudIO. One more question though. I plan to add a few hardware buttons and maybe a knob to the pi and link them to python code that sends MPC commands to control playback. For example a hardware button to immediately play a specific web radio stream.

Would adding a DAC shield pose any problems to that plan? Are there any relevant differences between the HiFiBerry DAC+ or IQaudIO PI-DAC+ in this regard?

I've found out this much from the product webpages:

http://www.hifiberry.com/dac-faq/
"Q: Can I still use the GPIOs? It seems, they are blocked. A: On the HiFiBerry DAC+ you can solder a 40-pin header onto the DAC that allows you to connect to the GPIO header. Note that some of the pins are already in use by the DAC, therefore you can’t use them. But there are still plenty of GPIOs available."

https://www.tindie.com/products/IQaudIO ... erry-pi-b/
"The Pi-DAC+ provides the support for additional pin-headers ... Exposed signals include ... the majority of the Raspberry Pi B+'s 40way connector. Please note that The Pi-DAC+ uses GPIO22 as amp-mute."

It looks like the above quotes answers my questions with "likely no problem" but I'd rather hear that confirmed by someone in the know, since I'm new to RuneAudio and these pi shields. Perhaps someone also has more details on exactly what pins are used up by the two shields?
waves
 
Posts: 125
Joined: 31 Dec 2014, 10:33

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby gswg » 03 Jan 2015, 13:20

for the Pi-DAC+ we do not pass through all the I/O (serial and SPI CS are two for example).

I have rotary encoder / buttons and an i2c OLED display all connected up here and running :-)

Gordon@iqaudio.com
gswg
 
Posts: 55
Joined: 21 Jan 2014, 21:04
Location: Glasgow

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby waves » 29 Jan 2015, 22:20

I have now received and set up the PI-DAC+. The hiss is gone. A marked improvement in sound quality!

The instruction pdf on Iquadio website did not explicitly describe setup in RuneAudio, it only detailed manual setup in raspbian OS for the raspberry pi. But thankfully for a raspberry B+ with RuneAudio v0.3beta already installed the setup was very easy:

1. Follow pdf manual for the hardware setup of PI-DAC+
2. Power on the pi and load the RuneAudio web interface on some other device
3. menu > settings > i2s kernel module: iqaudio pi-dac+ , click to apply setting
4. menu > mpd > audio output interface: iqaudio pi-dac+

I'm quite pleased with the result. However I still have the setting
menu > mpd > volume control: "enabled - software"
I tried switching it to "enabled - hardware" but got no sound. When I switched back to software RuneAudio froze up. But works again after power off + on.
Still, I'm curious to try and compare the hardware vs software volume control modes. The RuneAudio mpd menu page describes it like so: "Volume knob enabled, controlled by hardware mixer. This option enables the volume control and let you achieve very good overall sound quality. Note: hardware mixer must be supported directly from your sound card hardware."

So, how do I enable hardware volume for the PI-DAC+?
waves
 
Posts: 125
Joined: 31 Dec 2014, 10:33

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby ACX » 01 Feb 2015, 02:06

User avatar
ACX
RuneAudio co-founder
 
Posts: 1693
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: newbie questions on hiss/noise and DAC shield for pi B+

Postby waves » 02 Jun 2015, 16:14

As I reinstalled my runeaudio system I saw that I never replied to ACX question. So, in case anyone else reads this looking for an answer, the answer is yes, after git update of runeUI the option is there.

However I found the hardware volume setting to make the volume wheel in Rune much less useful. Everything below 60 or so is silent and then the volume ramps up very quickly.

Edit: here are the corresponding values in the rune volume wheel and in the alsa mixer for the iquadio device:

wheel 2 -- alsa 2
16 -- 3
29 -- 5
44 -- 10
55 -- 18
70 -- 29
78 -- 41
84 -- 52
92 -- 72

Edit2: I found a thread that probably already covers this last issue:
volume-control-linear-or-logarithmic-t254.html
waves
 
Posts: 125
Joined: 31 Dec 2014, 10:33

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 27 guests