Raspberry Pi Bluetooth Speaker: Difference between revisions
Line 12: | Line 12: | ||
The audio hardware can range from using the Raspberry Pi's on board audio with an external (active) travel speaker to wiring up an amplifier to some high-end passive speakers. | The audio hardware can range from using the Raspberry Pi's on board audio with an external (active) travel speaker to wiring up an amplifier to some high-end passive speakers. | ||
I'm testing this using Raspberry Pi's excellent IQaudio DigiAMP+ board with a pair bookshelf speakers and an old (active) travel speaker using the on board audio. It is possible | I'm testing this using Raspberry Pi's excellent IQaudio DigiAMP+ board with a pair bookshelf speakers and an old (active) travel speaker using the on board audio. It is possible to test by using headphones instead of active speakers. | ||
Once the speaker(s), and possibly amplifier, are wired into the Pi, it's time to install a fresh version of Alpine Linux. The armv7 version from the [https://alpinelinux.org/downloads/ Downloads] page works on almost all Pis. | Once the speaker(s), and possibly amplifier, are wired into the Pi, it's time to install a fresh version of Alpine Linux. The armv7 version from the [https://alpinelinux.org/downloads/ Downloads] page works on almost all Pis. This Wiki has several articles about installing Alpine on a Raspberry Pi. | ||
Enable writing to the boot media: | |||
mount /media/mmcblk0p1 -o rw,remount | |||
Then either enable the on board sound: | |||
echo "dtparam=audio=on" >> /media/mmcblk0p1/usercfg.txt | |||
or your fancier sound card (e.g. IQaudIO): | |||
echo "dtoverlay=iqaudio-dacplus,unmute_amp" >> /media/mmcblk0p1/usercfg.txt | |||
and then reboot your Pi. | |||
Follow [https://wiki.alpinelinux.org/wiki/ALSA these instructions] to enable ALSA. In summary | |||
apk add alsa-utils alsa-utils-doc alsa-lib alsaconf # the required software for sound | |||
aplay -l # should display a List of PLAYBACK Hardware Devices | |||
In my case my list is: | |||
**** List of PLAYBACK Hardware Devices **** | |||
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] | |||
Subdevices: 8/8 | |||
Subdevice #0: subdevice #0 | |||
Subdevice #1: subdevice #1 | |||
Subdevice #2: subdevice #2 | |||
Subdevice #3: subdevice #3 | |||
Subdevice #4: subdevice #4 | |||
Subdevice #5: subdevice #5 | |||
Subdevice #6: subdevice #6 | |||
If you issue this command: | |||
speaker-test -t wav -c 2 | |||
Then you should hear "Front Left, Front Right" repeating from your chosen speakers. Now it's time to setup Bluetooth. Don't forget to save your changes (lbu commit) before moving on. | |||
=Doing Something Title= | =Doing Something Title= |
Revision as of 09:45, 4 August 2021
How To Build a Raspberry Pi Bluetooth Speaker
This articles describes how to build a Bluetooth speaker. This article is being actively written.
Before You Start
You’ll need:
- A Raspberry Pi
- A Bluetooth USB dongle (if your Pi doesn’t have Bluetooth on board)
- An active speaker or sound card and passive speaker(s)
Getting the Speaker(s) Working
The audio hardware can range from using the Raspberry Pi's on board audio with an external (active) travel speaker to wiring up an amplifier to some high-end passive speakers.
I'm testing this using Raspberry Pi's excellent IQaudio DigiAMP+ board with a pair bookshelf speakers and an old (active) travel speaker using the on board audio. It is possible to test by using headphones instead of active speakers.
Once the speaker(s), and possibly amplifier, are wired into the Pi, it's time to install a fresh version of Alpine Linux. The armv7 version from the Downloads page works on almost all Pis. This Wiki has several articles about installing Alpine on a Raspberry Pi.
Enable writing to the boot media:
mount /media/mmcblk0p1 -o rw,remount
Then either enable the on board sound:
echo "dtparam=audio=on" >> /media/mmcblk0p1/usercfg.txt
or your fancier sound card (e.g. IQaudIO):
echo "dtoverlay=iqaudio-dacplus,unmute_amp" >> /media/mmcblk0p1/usercfg.txt
and then reboot your Pi.
Follow these instructions to enable ALSA. In summary
apk add alsa-utils alsa-utils-doc alsa-lib alsaconf # the required software for sound aplay -l # should display a List of PLAYBACK Hardware Devices
In my case my list is:
**** List of PLAYBACK Hardware Devices **** card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6
If you issue this command:
speaker-test -t wav -c 2
Then you should hear "Front Left, Front Right" repeating from your chosen speakers. Now it's time to setup Bluetooth. Don't forget to save your changes (lbu commit) before moving on.
Doing Something Title
Write the steps of how to do something in this section. If possible, show an example first, then tell your readers the steps. Break this procedure into separate procedures to avoid more than about 7-9 steps per procedure.
INSERT GREAT EXAMPLE HERE
- Answer the following three questions, at least in your head.
- What do I explain how to do?
- How do I do that?
- What do HOWTO readers already know about doing that?
- Write up a good example. This ensures you can do it.
- Write up the steps to do it.
- Write the background info/prerequisites readers need.
- Write the summary.
- Clean up your work.
- Revise, revise, revise.
See Also
Raspberry Pi's blog on How to play sound and make noise with your Raspberry P
There are lots of speaker and amplifier options:
- Raspberry Pi's IQaudIO boards
- Pimoroni's Audio Amp SHIM (3W Mono Amp) and Mini Speaker 4Ω (3W)
- The Pi Hut offers this Adafruit I2S 3W Stereo Speaker Bonnet for Raspberry Pi (Mini Kit) and the Stereo Enclosed Speaker Set - 3W 4 Ohm