Skip to content

Is a balena application running a pulseaudio server and demonstrating how it can be used for playing and recording audio on a raspberry pi. It also supports bluetooth audio devices.

License

Notifications You must be signed in to change notification settings

janvda/balena-pulseaudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

balena-pulseaudio

Introduction

This balena application runs a pulseaudio server and demonstrates how it can be used for playing and recording audio on a raspberry pi. It also supports playing and recording audio from bluetooth audio devices (bluetooth speakers, bluetooth headsets, ...)

Required Hardware

  1. Raspberry pi (although it is most likely very easy to port this to other devices)
  2. For playing audio the following can be used:
    1. headphone, earphone, ... plugged into the headphone jack of the raspberry pi.
    2. TV, monitor with speaker, ... connected to hdmi port of the raspberry pi.
    3. bluetooth speaker, bluetooth headset,...
    4. (DAC) HAT with audio device or speaker connected to it.
  3. For recording audio the following can be used:
    1. USB microphone, USB camera with microphone, ...
    2. bluetooth headset, bluetooth speaker with microphone
    3. HAT with one or more microphones

Rationale

The idea is to create a pulseaudio service (= pulseaudio-server) that can be reused in other balena applications requiring an audio interface. This pulseaudio service is the only service having an interface with the audio hardware (including connected bluetooth devices): all other services requiring audio should do this via this pulseaudio service.

Features

  1. service pulseaudio-client-tcp demonstrates how a service can communicate with the pulseaudio-server via TCP.
  2. service pulseaudio-client-unix demonstrates how a service can communicate with the pulseaudio-server via a unix socket.
  3. demonstrate how commands paplayand parecord can be used to play and record audio.
  4. Support changing/showing any pulseaudio setting through command pactl.
  5. Support scanning/connecting/monitoring of bluetooth devices through command bluetoothctl
  6. Supports pavucontrol and audacity. This requires an X-server (e.g. XQuartz on macbook) that is connected to the same local network.

Services

This balena application consists of following services:

  • pulseaudio-server : the core service running the pulseaudio server.
  • pulseaudio-client-tcp and pulseaudio-client-unix are 2 test services based on the same docker container pulseaudio-client-test.

About

Is a balena application running a pulseaudio server and demonstrating how it can be used for playing and recording audio on a raspberry pi. It also supports bluetooth audio devices.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages