Hi,
thanks for this great project and all the work you've put into it.
I have a weird issue (RPi3B plus Hifiberry Minimamp, configured with your script, added hifiberry): Starting up the Phoniebox i hear the startup sound. However, when playing any audio, i do not hear anything, although the player starts and i get no error. Any idea? Is the startup sound directed to a different player? Or anything else that i could check?
I would appreciate any hint or tip very much
Have a good evening
Marcus
Die Startup sound is played directly via mpg123 vs the other audio is handled by mpd service
Hi @mtreitl
please read this section in Troubleshooting first: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/MANUAL.md#audio-is-not-working
it even has a dedicated section on Hifiberry. If this fixes it and you got it figured out, please tell us here how you did it, so I can include it in the troubleshooting section.
Great, thanks for the comments! I think it really has to do with an incorrect config of MPD Player. I used the docu here on Github but maybe Hifiberry changed the way the Card is recognized or the Name or whatever. I´ll try to fix this tonight and will post the way i did when i was successful!
Have a great day
Marcus
Great, thanks for the comments! I think it really has to do with an incorrect config of MPD Player. I used the docu here on Github but maybe Hifiberry changed the way the Card is recognized or the Name or whatever. I´ll try to fix this tonight and will post the way i did when i was successful!
Have a great dayMarcus
Hi Marcus,
do you found out a solution for your problem?
I am at exact same point... :)
Kind regards, Marco
Hi Marcus,
I'm having the same issue. With a clean stretch install it worked. But after installing RPI-Jukebox there is no sound via Hifiberry Miniamp - only the startup sound.
Are there any configuration issues in mopidy.conf or on other confiruation files?
Thank you and regards,
Christian
Hi Christian,
the Hifiberry MiniAmp uses some similar Pins as defined in the Script for the GPIO Buttons from RPi-Jukebox, which results in some conflict and no audio.
I have just changed some of the GPIOs in the Button Script and all works well for me now.
KR, Marco
Hi @marcOSS040
Could you post your gpio python file and soldering solution up here please. I will include it in the documentation
I don't use the GPIO-Buttons so I disabled them. The following configuration worked for me now. Maybe it could help someone else finding the right configuration for Hifiberry Miniamp.
Adaptions for hifiberry MiniAmp
1. settings Audio_iFace_Name
in /RPi-Jukebox-RFID/settings/Audio_iFace_Name set “Master” instead of “PCM”
2. disable or modify GPIO-Buttons
disable GPIO-buttons (if not needed) by commenting out all entries in /home/pi/RPi-Jukebox-RFID/scripts/gpio-buttons.py
(maybe this is not the best way to do it, but as I am a noob i tried it this way and it worked ;-))
or if you want to use the buttons, change the pins in order to avoid conflicts with hifiberry DAC.
3. modify boot/config.txt
commenting this line out:
#dtparam=audio=on
add this line at the end of the file:
dtoverlay=hifiberry-dac
4. Modify /etc/asound.conf
important: check if there is one of the following files and remove them:
$ rm ~/.asound.conf
$ rm ~/.asoundrc
make the following changes to /etc/asound.conf:
#pcm.!default {
# type hw card 0
#}
#ctl.!default {
# type hw card 0
#}
pcm.hifiberryMiniAmp {
type softvol
slave.pcm "plughw:0"
control.name "Master"
control.card 0
}
pcm.!default {
type plug
slave.pcm "hifiberryMiniAmp"
}
reboot, to check if everything works:
$ reboot
test hifiberry speaker output:
$ speaker-test -D hifiberryMiniAmp -c 2
5. modify /etc/mpd.conf
if this works, modify the mpd-configuration file: /etc/mpd.conf
the following block should exist already. Just uncomment the line “mixer_control” and set it to “Master”
#
# An example of an ALSA output:
#
audio_output {
type "alsa"
name "My ALSA Device"
# device "hw:0,0" # optional
# mixer_type "hardware" # optional
# mixer_device "default" # optional
mixer_control "Master" # optional
# mixer_index "0" # optional
}
add the following block:
audio_output {
enabled "yes"
type "alsa"
name "HiFiBerry DAC"
device "hifiberryMiniAmp"
auto_resample "no"
auto_channels "no"
auto_format "no"
dop "no"
}
Hello farbschein,
I want to follow your HowTo to use it for my HiFiBerry Amp2.
Do you use the Phoniebox Pure or the Phoniebox+Spotify-Installation?
You wrote: "commenting out all entries in /home/pi/RPi-Jukebox-RFID/scripts/gpio-buttons.py"
Did you really commented out ALL the lines of the file or only the following entries with the GPIO-Buttons?
shut = Button(3, hold_time=2)
vol0 = Button(13)
volU = Button(16,pull_up=True)
volD = Button(19,pull_up=True)
next = Button(26)
prev = Button(20)
halt = Button(21)
Thank you!
floppybox
Did you really commented out ALL the lines of the file or only the following entries with the GPIO-Buttons?
You can also define some other free GPIOs in the script. Even if you do not use them it should wor for you. Try these:
shut = Button(3, hold_time=2) #PIN5
volU = Button(22,pull_up=True) #PIN15
volD = Button(23,pull_up=True) #PIN16
next = Button(17) #PIN11
prev = Button(27) #PIN13
halt = Button(26) #PIN37
With these controls it works with a Hifiberry MiniAmp for me - instead of the shut down/reboot.
I tried serveral different free GPIOs for the shutdown which always works, but I do not get the Pi to start again. It seems that it needs to use GPIO3 (Pin5), which is blocked for the Hifiberry.
Does anybody know how to use another GPIO to shut down and restart the RasPi?
@MiczFlor I will upload my final script with soldering, images and so on as soon as I get everything running fine.
Hi,
I used the “ onoff shim” for shutdown and restart. It worked well together with hifiberry miniamp
@farbschein Do you use Hifiberry AND the OnOff SHIM? If yes, this could be a solution.
But probably there is another solution without extra Hardware?! :)
Hi,
Yes, I’m using both. They use different pins so there is no conflict. It seems that all other solutions are not able to make power on after a clean shutdown.
And yes, I installed the Spotify version.
The hifiberry MiniAmp configuration from above also works for other I2S DACs like the ES9023.
Thank you guys again for another great help-how-to-guide!!!
I also use the HiFiBerry MiniAmp but it only kinda works...
So when I restart my Rasperry-Zero I hear a startup-sound and then I hear a sample-mp3 playing that I put into PhonieBox. But after like 2-3 seconds the music stops.
Then when I go to the terminal I get the following...
pi@raspberrypi:~ $ speaker-test -D hifiberryMiniAmp -c 2
speaker-test 1.1.3
Playback device is hifiberryMiniAmp
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
does anybody have an idea on how to fix that?
Hi @georgbachmann , do you have the GPIO activated for buttons? Then there are collisions with the hifiberry miniamp: Please see the pin out overview for details.
You have to reassign the GPIO for the buttons in that case. Just follow the suggestions in the wiki from the link above and modify the gpio-buttons.py in the scripts folder.
You hear first a sound because on the Pi zero loading of the gpio zero lib that takes over the hifiberry pins takes ages.
Greetings,
Martin
Vielen Dank Martin!!!
That did the trick. Even though I have disabled GPIO Buttons in the config :) cool! Thank you very much!
Btw... I also use an RC-522 and I think I'm going to have some more collisions once I'll solder it all together. I currently have the hifi board running (thx) and the RC-522... But basically I will simply use any PIN that is unused by both the RC-522 and the hifiberry and I should be good to go?
Great it works now! I am unsure, if I understood your question: The RC-522 and the hifiberry have no collisions, if you want to use buttons as well, please follow my guide here Hardware Pinout and adjust the gpio-buttons.py accordingly.
Bonjour tout le monde!
Je n'arrive pas Ă utiliser les boutons GPIO en mĂŞme temps que le miniamp hifiberry.
Est ce quelqu'un aurait une solution?
"Merci pour ce superbe projet" :-)
Sorry, my French is too poor to reply using it.
So to operate Minimal from hifiberry and gpio in parallel please use the flexible pin out as explained in the wiki. It avoids the collisions you might have expired. Note that you need to rewire the gpio buttons in hard and software.
Am 6. April 2019 00:40:30 MESZ schrieb Tete2brick notifications@github.com:
Bonjour tout le monde!>
Je n'arrive pas Ă utiliser les boutons GPIO en mĂŞme temps que le
miniamp hifiberry. >
Est ce quelqu'un aurait une solution?>
>
"Merci pour ce superbe projet" :-)>
>
>
-- >
You are receiving this because you commented.>
Reply to this email directly or view it on GitHub:>
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/261#issuecomment-480444139
MERCI POUR TOUT !!!
Je viens enfin de comprendre mes erreurs.
Most helpful comment
I don't use the GPIO-Buttons so I disabled them. The following configuration worked for me now. Maybe it could help someone else finding the right configuration for Hifiberry Miniamp.
Adaptions for hifiberry MiniAmp
1. settings Audio_iFace_Name
in /RPi-Jukebox-RFID/settings/Audio_iFace_Name set “Master” instead of “PCM”
2. disable or modify GPIO-Buttons
disable GPIO-buttons (if not needed) by commenting out all entries in /home/pi/RPi-Jukebox-RFID/scripts/gpio-buttons.py
(maybe this is not the best way to do it, but as I am a noob i tried it this way and it worked ;-))
or if you want to use the buttons, change the pins in order to avoid conflicts with hifiberry DAC.
3. modify boot/config.txt
commenting this line out:
#dtparam=audio=onadd this line at the end of the file:
dtoverlay=hifiberry-dac4. Modify /etc/asound.conf
important: check if there is one of the following files and remove them:
make the following changes to /etc/asound.conf:
reboot, to check if everything works:
$ reboottest hifiberry speaker output:
$ speaker-test -D hifiberryMiniAmp -c 25. modify /etc/mpd.conf
if this works, modify the mpd-configuration file: /etc/mpd.conf
the following block should exist already. Just uncomment the line “mixer_control” and set it to “Master”
add the following block: