Hi,
I am a newbie to RaspBerry and SamplerBox, but very enthousiastic.
I was amazed that the base worked right away with audio through HDMI.
But for quality reasons I bought a HiFiBerry module.
How can I detetc which audio device it will be, and what do I have to do to make it function with SamplerBox?
Command line : alsamixer? lsusb?
It appeared that there were no drivers installed for the HiFiBerry-Dac+.
The advice from HiFiBerry was to run rpi-update to get a newer firmware, but I didn't succeed.
So I tried another way: installing a complete new system with a Raspina-Jessie-Lite, updating to get the HiFiBerry drivers (including dtoverlay=hifiberry-dacplus in the file /boot/config.txt and creating the file /etc/asound.conf. After that HiFiBerry board was operating. After that I started the manual installation of SamplerBox according your 'manual instructions'; I adjusted samplerbox.py to use the audio device #2.
When I start SamplerBox I get quite a few error messages (see below), and an endless row of "ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred" messages.
The positive thing: I can play music through the HiFiBerry, the negative: the continuing error messages which probably effect the sound (annoying kind of ticking).
Can you give me any hint where to look to solve this problem?
Error messages at start-up:
pi@raspberrypi:~/SamplerBox $ python samplerbox.py
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
.....
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Opened audio: snd_rpi_hifiberry_dacplus: - (hw:2,0)
Preset loading: 0 (0 Saw)
Opened MIDI: Xkey 20:0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Preset loaded: 0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
This might help, as these are near identical DAC boards.. http://forums.pimoroni.com/t/phat-dac-install/1306
Nicholas,
Thanks for your reply. However I still have the underrun error.
I tried to follow the instructions from your link.
.. there is no blacklist
.. no difference between yes/no #snd_bcm2835 in the modules
.. I created the file asound.conf with card 2 (being the HiFiBerry
.. in the file sudo nano /boot/config.txt I added (to the bottom) the dtoverlay
I was optimistic for the device is started after reboot.
However, starting SamplerBox still gives lots of errors, followed by the underrun error repeating and no clear sound when I play.
Do you have any other hints?
Hello,there is a fully functional description of my procedure. RPI3 and Hifiberry DAC + Light:
1.Rewrite BOOT/config.txt
Remove the line: dtparam=audio=on
Create line (Hifiberry DAC+Light): dtoverlay=hifiberry-dac
Here is my config.txt :
device_tree_param=i2c_arm=on
init_uart_clock=2441406
init_uart_baud=38400
gpu_mem=64
boot_delay=0
disable_splash=1
disable_audio_dither=1
dtoverlay=hifiberry-dac
- Create /etc/asound.conf with the following content:
pcm.!default {
type hw card 2
}
ctl.!default {
type hw card 2
}
-
Setup Root/Samplerbox/samplerbox.py:
AUDIO_DEVICE_ID = 0
change this number to use another soundcard 0-3
hey
Do you hear the difference using a HiFiberrt in this project?
I know HiFiBerry supports up to 192kHz/24bit and the PCM2704 only up to 48.1kHz.
Hi everyone,
First of all, thanks to @Joseph and the rest of contributors for this project, it's pretty cool!
I'm continuing on this thread because I'm having issues setting up the HifiBerry DAC+ on the Raspberry PI3, using the SamplerBox build image v 2016-11-14.
I changed the samplerbox.py local settings (https://github.com/josephernest/SamplerBox/blob/master/samplerbox.py#L19-L21) all false, in case there is a conflict with the GPIO/I2C pins, as stated by @Lars here (http://www.samplerbox.org/forum/171).
I tried editing the /boot/config.txt to both Hifiberry suggestions and those settings listed by @Jarekhaky, trying different dtoverlay attributes:
dtoverlay=hifiberry-dac
dtoverlay=hifiberry-dacplus
dtoverlay=hifiberry-dac-overlay
dtoverlay=hifiberry-dacplus-overlay
but none of them worked.
Also tried both to explicitly disable dtparam=audio=off
and removing, but neither.
In any case, I cannot get the Hifiberry to be listed in the available Soundcards when running aplay -l
, and I'm going to try if the board actually works using a Hifiberry images installer.
Has anyone got that DAC+ (no light) running with SamplerBox?
Thanks!
when I run aplay -l I can see my HifiBerry DAC+ but there is still no sound coming out ;(
I've set AUDIO_DEVICE=0
and on /etc/asound.conf I've put the following content:
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}
but no luck ;(
after removing the GPIO stuff from samplerbox.py the HifiBerry DAC+ works!
Hi there,
I am currently trying to setup a samplerbox with the current image (20220810) on a Raspberry 4B but all the above does not seem to work. I tried what Jarekhaky posted but there is no line AUDIO_DEVICE_ID = 0 in /root/Samplerbox/samplerbox.py any more. I also tried what teller postesd (removing the GPIO stuff form samplerbox.py) but still so sound. Running aplay -l showed the DAC but no sound. Does anyone of you know, if there are some changes to the new image that I have to consider?
Best
Hi there,
I am currently trying to setup a samplerbox with the current image (20220810) on a Raspberry 4B but all the above does not seem to work. I tried what Jarekhaky posted but there is no line AUDIO_DEVICE_ID = 0 in /root/Samplerbox/samplerbox.py any more. I also tried what teller postesd (removing the GPIO stuff form samplerbox.py) but still so sound. Running aplay -l showed the DAC but no sound. Does anyone of you know, if there are some changes to the new image that I have to consider?
Thanks a lot in advance