PulseAudio on OpenWRT with MPD and other Stuff: Difference between revisions

mNo edit summary
mNo edit summary
Line 15: Line 15:
===Ready?  Let's Install PulseAudio (and dependencies, plus other tools, and see what happens)===
===Ready?  Let's Install PulseAudio (and dependencies, plus other tools, and see what happens)===


==== Installation of Software ====
====Installation of Software====
opkg update
opkg update


Line 28: Line 28:
...and maybe opkg install madplay mpg123 (they don't install any services, so they're just there if you need them)
...and maybe opkg install madplay mpg123 (they don't install any services, so they're just there if you need them)


==== The Errors ====
====The Errors====
Are these the errors referred to earlier as the "show stopper" for PulseAudio.  Nope.  Just an annoyance that can be fixed.<syntaxhighlight lang="text">
Are these the errors referred to earlier as the "show stopper" for PulseAudio.  Nope.  Just an annoyance that can be fixed.<syntaxhighlight lang="text">
chown: /dev/mixer: No such file or directory
chown: /dev/mixer: No such file or directory
Line 36: Line 36:
</syntaxhighlight>Will this fix it (spoiler alert, NO, so like Frankie said "don't do it")?: opkg install gst1-mod-dv<ins>dsp</ins>u gst1-mod-audiomixer (a bunch of dependencies would be installed too).  We'll get to the fix later, let's focus on the "Show Stopper"
</syntaxhighlight>Will this fix it (spoiler alert, NO, so like Frankie said "don't do it")?: opkg install gst1-mod-dv<ins>dsp</ins>u gst1-mod-audiomixer (a bunch of dependencies would be installed too).  We'll get to the fix later, let's focus on the "Show Stopper"


===== The "Show Stopper" for PulseAudio =====
=====The "Show Stopper" for PulseAudio=====
Issue this command (it is for 'talking' to the PulseAudio Service): pactl list short sinks
Issue this command (it is for 'talking' to the PulseAudio Service): pactl list short sinks


Line 49: Line 49:
After: audio:x:29:root,mpd
After: audio:x:29:root,mpd
</syntaxhighlight>
</syntaxhighlight>
Result: It forking works now: pactl list short sinks
There's a bunch of stuff about Cookies (one of PulseAudio's security methods), anonymous authentication, etc., but this is the simplest and works without changing PulseAudio's default configuration.
=== Bluetooth (AKA Bluez) ===
==== Installation ====
opkg install bluez-daemon bluez-libs bluez-tools bluez-utils bluez-utils-btmon bluez-utils-extra kmod-input-uinput (other dependencies will install too)
...and that's just the basic Bluetooth stuff.  It doesn't include the firmware and driver for any specific hardware
==== Hardware ====
Bluetooth hardware is fairly inexpensive these days.  To 'future-proof' things as much as possible, order hardware with the latest and greatest version of Bluetooth.  As of this writing, summer 2024, Bluetooth 5.3 is the contemporary version.
A nice feature to have is a removable antenna.  There are more compact devices that don't have removable antennas.  And if you want super cheap device, step down to Bluetooth 4.x (still works great with speakers).
[[File:Bluetooth Controller.jpg|alt=Bluetooth Controller - A nice feature to have is a removable Antenna.|thumb|Bluetooth Controller - A nice feature to have is a removable Antenna.]]
Oh, one obnoxious note with Bluez and PulseAudio on OpenWRT is that as of this writing, even though Bluetooth 5.x supports two sets of speakers, just can't make a single controller connect to more than one speaker.  Woof!
Example of installing firmware and drivers for Bluetooth Hardware: opkg install <ins>rtl</ins>8761bu-firmware (bu is the version of the rtl8761 that was designed to work with USB 2.0, so if you're hooking up to a USB 3.0 port, this will work, but according to documentation, won't be optimized.  PS: Bluetooth to Speaker will not exceed USB 2.0 speeds).
<br />