balena-io-experimental / browser

A drop-in web browser block
96 stars 70 forks source link

Audio issues on RPi4 #139

Open ebradbury opened 1 year ago

ebradbury commented 1 year ago

In order for me to get headphone audio working on RPi4 I had to do the following:

I wasn't able to get any audio (HDMI or headphones) with any other configuration. Hope this helps someone

MiroYld commented 1 year ago

Hi @ebradbury

Here is an example deployment file that should help you

audio:
    restart: always
    image: 'balenablocks/audio:raspberrypi4-64'
    privileged: true
    labels:
      io.balena.features.dbus: '1'
    volumes:
      - 'src:/src'
    networks:
      - audio

  your_app:
    image: 'your_image'
    privileged: true
    environment:
      PULSE_SERVER: 'audio:4317'
    networks:
      - audio

networks:
  your_app:
    driver: bridge
  audio:
    driver: bridge

Please let me know if this solves your problem. If you use waveshare speakers, you can also try my solution : https://github.com/MiroYld/smartaudio-docker