mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2024-12-29 10:11:40 +01:00
MycroftOS: Add Bluetooth Speaker functionality.
This commit is contained in:
parent
c53f0b297e
commit
f798a00cb7
@ -7,6 +7,7 @@ menu "Mycroft A.I. Personal Assistant"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/wifi-ap/Config.in"
|
||||
menu "Additional drivers, libraries and/or applications"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/alsa-plugins/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/btspeaker/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"
|
||||
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/spotifyd/Config.in"
|
||||
|
@ -54,7 +54,6 @@ BR2_PACKAGE_ALSA_UTILS_ASEQNET=y
|
||||
BR2_PACKAGE_ALSA_UTILS_BAT=y
|
||||
BR2_PACKAGE_ALSA_UTILS_IECSET=y
|
||||
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
|
||||
BR2_PACKAGE_BLUEZ_ALSA=y
|
||||
BR2_PACKAGE_FAAD2=y
|
||||
BR2_PACKAGE_FFMPEG_GPL=y
|
||||
BR2_PACKAGE_FFMPEG_NONFREE=y
|
||||
@ -205,6 +204,7 @@ BR2_PACKAGE_LIBSIDPLAY2=y
|
||||
BR2_PACKAGE_OPUSFILE=y
|
||||
BR2_PACKAGE_PORTAUDIO=y
|
||||
BR2_PACKAGE_PORTAUDIO_OSS=y
|
||||
BR2_PACKAGE_SBC=y
|
||||
BR2_PACKAGE_SPEEXDSP=y
|
||||
BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING=y
|
||||
BR2_PACKAGE_LIBARCHIVE=y
|
||||
@ -253,6 +253,11 @@ BR2_PACKAGE_PCRE2_32=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_BLUEZ_TOOLS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_OBEX=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_DNSMASQ=y
|
||||
# BR2_PACKAGE_DNSMASQ_TFTP is not set
|
||||
@ -314,6 +319,7 @@ BR2_PACKAGE_MYCROFT_SERVICE=y
|
||||
BR2_PACKAGE_MYCROFT_SPLASH=y
|
||||
BR2_PACKAGE_WIFI_AP=y
|
||||
BR2_PACKAGE_ALSA_PLUGINS=y
|
||||
BR2_PACKAGE_BTSPEAKER=y
|
||||
BR2_PACKAGE_FANN=y
|
||||
BR2_PACKAGE_RESPEAKER=y
|
||||
BR2_PACKAGE_SPOTIFYD=y
|
||||
|
6
buildroot-external/package/btspeaker/Config.in
Normal file
6
buildroot-external/package/btspeaker/Config.in
Normal file
@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_BTSPEAKER
|
||||
bool "btspeaker"
|
||||
help
|
||||
Service to start a BT Speaker daemon.
|
||||
|
||||
https://www.j1nx.nl
|
24
buildroot-external/package/btspeaker/btspeaker.mk
Normal file
24
buildroot-external/package/btspeaker/btspeaker.mk
Normal file
@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# btspeaker
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BTSPEAKER_VERSION = 0.1.0
|
||||
BTSPEAKER_SITE = $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/btspeaker
|
||||
BTSPEAKER_SITE_METHOD = local
|
||||
BTSPEAKER_LICENSE = Apache License 2.0
|
||||
BTSPEAKER_LICENSE_FILES = LICENSE
|
||||
|
||||
define BTSPEAKER_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 644 $(@D)/btspeaker.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/btspeaker.service
|
||||
|
||||
mkdir -p $(TARGET_DIR)/etc/bluetooth
|
||||
$(INSTALL) -D -m 644 $(@D)/main.conf \
|
||||
$(TARGET_DIR)/etc/bluetooth/main.conf
|
||||
$(INSTALL) -D -m 600 $(@D)/pin.conf \
|
||||
$(TARGET_DIR)/etc/bluetooth/pin.conf
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
13
buildroot-external/package/btspeaker/btspeaker.service
Normal file
13
buildroot-external/package/btspeaker/btspeaker.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Bluetooth Auth Agent
|
||||
After=bluetooth.service
|
||||
PartOf=bluetooth.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/usr/bin/bt-adapter -s Powered on
|
||||
ExecStartPre=/usr/bin/bt-adapter -s Discoverable on
|
||||
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput -p /etc/bluetooth/pin.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=bluetooth.target
|
4
buildroot-external/package/btspeaker/main.conf
Normal file
4
buildroot-external/package/btspeaker/main.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[General]
|
||||
Name = MycroftOS
|
||||
Class = 0x41C
|
||||
DiscoverableTimeout = 0
|
1
buildroot-external/package/btspeaker/pin.conf
Normal file
1
buildroot-external/package/btspeaker/pin.conf
Normal file
@ -0,0 +1 @@
|
||||
* 0000
|
@ -1,2 +1,2 @@
|
||||
|
||||
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access Mycroft user
|
||||
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access,lp Mycroft user
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 7809fc94c259e997cd9010eef83854e78ad4f31a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Steenbergen <info@j1nx.nl>
|
||||
Date: Sat, 11 Jan 2020 16:36:36 +0100
|
||||
Subject: [PATCH 1/1] Add pulse to the lp group for bluetooth to work.
|
||||
|
||||
---
|
||||
package/pulseaudio/pulseaudio.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
|
||||
index c91af22935..0f7a9e3c21 100644
|
||||
--- a/package/pulseaudio/pulseaudio.mk
|
||||
+++ b/package/pulseaudio/pulseaudio.mk
|
||||
@@ -162,7 +162,7 @@ PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA \
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y)
|
||||
define PULSEAUDIO_USERS
|
||||
- pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access
|
||||
+ pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access,lp
|
||||
endef
|
||||
|
||||
define PULSEAUDIO_INSTALL_INIT_SYSV
|
||||
--
|
||||
2.24.0.rc1
|
||||
|
Loading…
Reference in New Issue
Block a user