Hallo zusammen,
ich habe bei meiner Phoniebox festgestellt, dass die Lautstärke nach dem Booten manchmal auf 0 % steht und auch nicht erhöht werden kann (ein Reboot hilft dann ggf.). Die Start- und Stopp-Töne werden allerdings abgespielt.
Als Stromversorgung dient eine EasyAcc 20000mAh Powerbank. Könnte es sich um ein Spannungsproblem handeln?
Meine asound.conf sieht so aus:
Code: /etc/asound.conf
pcm.hifiberry {
type softvol
slave.pcm "plughw:0"
control.name "Master"
control.card 0
}
pcm.!default {
type plug
slave.pcm "hifiberry"
}
Damit es keine Konflikt mit den Buttons gibt, habe ich folgendes Skript für die Buttons installiert:
Python: gpio-buttons.py
#!/usr/bin/python3
from gpiozero import Button
from signal import pause
from subprocess import check_call
# This script will block any I2S DAC e.g. from Hifiberry, Justboom, ES9023, PCM5102A
# due to the assignment of GPIO 19 and 21 to a buttons
# 2018-10-31
# Added the function on holding volume + - buttons to change the volume in 0.3s interval
#
# 2018-10-15
# this script has the `pull_up=True` for all pins. See the following link for additional info:
# https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/259#issuecomment-430007446
#
# 2017-12-12
# This script was copied from the following RPi forum post:
# https://forum-raspberrypi.de/forum/thread/13144-projekt-jukebox4kids-jukebox-fuer-kinder/?postID=312257#post312257
# I have not yet had the time to test is, so I placed it in the misc folder.
# If anybody has ideas or tests or experience regarding this solution, please create pull requests or contact me.
def def_shutdown():
check_call("./scripts/playout_controls.sh -c=shutdown", shell=True)
def def_volU():
check_call("./scripts/playout_controls.sh -c=volumeup", shell=True)
def def_volD():
check_call("./scripts/playout_controls.sh -c=volumedown", shell=True)
def def_vol0():
check_call("./scripts/playout_controls.sh -c=mute", shell=True)
def def_next():
check_call("./scripts/playout_controls.sh -c=playernext", shell=True)
def def_prev():
check_call("./scripts/playout_controls.sh -c=playerprev", shell=True)
def def_halt():
check_call("./scripts/playout_controls.sh -c=playerpause", shell=True)
shut = Button(3, hold_time=2)
vol0 = Button(17,pull_up=True)
volU = Button(5,pull_up=True,hold_time=0.3,hold_repeat=True)
volD = Button(6,pull_up=True,hold_time=0.3,hold_repeat=True)
next = Button(23,pull_up=True)
prev = Button(22,pull_up=True)
halt = Button(27,pull_up=True)
shut.when_held = def_shutdown
vol0.when_pressed = def_vol0
volU.when_pressed = def_volU
#When the Volume Up button was held for more than 0.3 seconds every 0.3 seconds he will call a ra$
volU.when_held = def_volU
volD.when_pressed = def_volD
#When the Volume Down button was held for more than 0.3 seconds every 0.3 seconds he will lower t$
volD.when_held = def_volD
next.when_pressed = def_next
prev.when_pressed = def_prev
halt.when_pressed = def_halt
pause()
Alles anzeigen
Falls jemand einen Tipp hat, wie ich das Problem eingrenzen kann, wäre ich dankbar.