Try to get hifiberry_digi working


#1

I am struggling with the hifiberry_digi sound card getting configured on the Raspberry Pi, and got musicbox_startup.log and mopidy.log files for the different situations. Possibly as a side effect, I get no proper internet connection, and I cannot see how the wrong configuration of the sound card influences this. Is there a local way to hear sound if the configuration is correct?

So, I now have the musicbox_startup.log files for three situation:

  1. the hifiberry_digi board NOT on the RPI (physically). I get sound via HDMI, although the functioning of my network is on and off. The radio streams give sound though sometimes, so then there is internet connection. Here is the musicbox_startup.log:

Initializing MusicBox…


Setting sound configuration…
Probing sound devices:

  • Found internal device: card0
    HDMI output detected
  • Found internal device: card0
    HDMI output detected
    Selected card= (i2s= output=auto usb= intc=0)
    No output was specified/found, falling back to auto detection
    Selected card=0 (i2s= output=hdmi usb= intc=0)
    Using audio card0 (hdmi)
    MusicBox name is MusicBox
    Stopping Samba daemons: nmbd smbd.
    Starting Samba daemons: nmbd smbd.
    Starting Dropbear SSH server: dropbear.
    Starting daemon monitor: monit.
    Scanning music-files, please wait…
    INFO Starting Mopidy 1.1.2
    INFO Loading config from builtin defaults
    INFO Loading config from /etc/mopidy/mopidy.conf
    INFO Loading config from command line options

My IP address

  1. the hifiberry_digi board mounted on the RPI, but not entered in the settings.ini file. I get:
  • Found internal device: card0
  • Found internal device: card0
  • Found unknown device ‘sndrpihifiberrydigi’ on card1
    Selected card= (i2s= output=auto usb=1 intc=0)
    No output was specified/found, falling back to auto detection
    Selected card=1 (i2s= output=usb usb=1 intc=0)
    Using audio card1 (usb)

(No sound is produced, I believe all network connections are refused.)

  1. Set output = hifiberry_digi in the settings.ini file.

Setting sound configuration…
Probing sound devices:

  • Found internal device: card0
  • Found internal device: card0
  • Found unknown device ‘sndrpihifiberrydigi’ on card1
    Probing sound devices:
  • Found internal device: card0
  • Found internal device: card0
  • Found i2s device: card1
    Selected card=1 (i2s=1 output=hifiberry-digi usb=1 intc=0)
    Using audio card1 (hifiberry-digi)

(no sound, I believe also no network, is it configured on the wrong card number?

Getting the network connections is more mopidy I believe and probably another issue,)

Thanks for your help,
Quintijn


#2

Situation 3, the one we care about, looks good. It found the HifiBerry on card 1 and selected it. The contents of /etc/asound.conf should reflect that.

How are you testing the sound?

What I don’t understand is what you mean when you say there are network connection problems. If that’s the case, how are you connecting to retrieve the log file?

Edit: as always, make sure you have a good power supply if you have network issues. And if you are using a WiFi dongle, make sure its not a piece of junk.


#3

Well, I have access to internal network, and can ping to a website outside.

This is what I get from the mopidy log:

2018-03-17 07:00:27,940 - ERROR Fetching https://auth.mopidy.com/spotify/token failed: HTTPSConnectionPool(host=‘auth.mopidy.com’, port=443): Max retries exceeded with url: /spotify/token (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘SSL3_GET_SERVER_CERTIFICATE’, ‘certificate verify failed’)],)”,),))
(…)

The date/time is not good either. So probably this is the issue and not the sound card? I did have spotify a few times, but not now anymore. Can the enable of ssh (for the filezilla contact for the log files) have to do with it?

Thanks again, Quintijn


#4

I think I have good power supply, but will try another one. I am on the wire, with a short cable, all close to the router…


#5

The certificate failures are almost certainly due to the incorrect date/time. Login via ssh (use Putty) or locally (attach a keyboard and screen) and type ntpdate-debian to correct the date/time. Enabling ssh didn’t break this (or anything else).


#6

That did a very big trick. Must I do this command at every new startup? Because after some reboots the date/times seemed to be at another random date.

Moreover I have the musicbox now playing via headset jack of my TV, so via HDMI input.

I was thinking the output jack of the hifiberry_digi is also a headset output, but it did not respond. Hope you can help me again a step further.


#7

another thing: the sound hampers now and then, as if the data is not fast enough coming in via the internet. Any ideas? I lowered the sample rate to 160, but this did not help.

And another thing; where is your donate button?


#8

As part of the boot procedure it is supposed to set the time correctly once it has acquired a network connection (since it needs one to do this). I’m not sure why that is not working. If you could post the entire boot log maybe there are some clues in there.

So what is the state of your Hifiberry Digi(+?) now? Is it working at all yet? If not, does your /boot/config.txt file contain the line dtoverlay=hifiberry-digi? Please post the output of running aplay -l.

The coaxial RCA output is a digital signal. You need an analogue signal (from their DAC+ type products) to drive headphones. The Toslink output should have the red LED illuminated. Is your toslink cable definitely working?

Are you talking about Spotify? I don’t see this on my Pi 3. Which model do you have? The original model and the Zero models can struggle, especially if using all the services and controlling via MPD.

I don’t have a donate button. But feel free to donate to the Raspberry Pi Foundation.


#9

So I should have bought a hifiberry dac I think. Stupid. Will do so. I will sort out the other things later.

Thanks for your help and I will donate.


#10

You might be able to return the digi and swap it. Personally I don’t think their website is clear enough considering the audience.

However, do you actually need one of their boards? The sound quality from the Pi’s onboard line-out is actually pretty good these days in my opinion. It was initially horrible but no longer deserves its bad reputation. HifiBerry et al. don’t like to mention that, for obvious reasons! However, do note that the onboard 3.5mm audio port is not really a headphone port, it’s a line-out and ideally should be plugged into an amp (a cheap one will do).


How to force hdmi output?
#11

Hi Nick, I want to ask you for another advice: I see very different prices on the hifiberry dac+ sound card. At hifiberry itself there is a light version for € 19,90. Would that one do the trick as well?

https://www.hifiberry.com/shop/boards/hifiberry-dac-light/

I think I can return the wrong board (hifiberry_digi).

I am also going to try the line-out possibility you mention!

Thanks, Quintijn


#12

Yes, probably. Their product pages are just so devoid of any actual info, I really am not a fan. But the one thing it does say is that the soundcard itself has no volume control. That isn’t an issue for most people, it just means that volume must be done in software by each application individually. So if you set it low in Mopidy but then switched to use Airplay or Spotify Connect, since these are different applications, the volume will be whatever you set it to last time you used them. But if you are connecting it to an amp anyway (like you should, these boards also only provide a line-level output) then you can control the volume with that. I personally prefer the justboom board, they are a little more expensive but I think better value (line-out AND headphone output, integrated IR receiver).


#13

I bought a cable from 3.5mm audio to 2x tulp. Sound is quite good. I am also going to test with a justboom sound card, which just arrived. Just to see if I can hear the difference.

Spotify now runs without the time setting command (ntpdate-debian). Nice.

One other thing: I use the web interface. Is the MPDroid app better for communicating, or is this web interface as good?

I will report about the sound quality of this line output compared with a justboom sound card…


#14

Not really, it’s slower to talk via MPD, I find it frustrating. Also note that MPDroid is no longer maintained.


#15

I can confirm the sound with justboom dac is much much better than with the analog output of the rpi.

Again thanks for your help, Nick.