summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-bluez.h
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-08-31 13:53:47 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-08-31 13:53:47 +0200
commit80deafbe1bfb87c3a5e9f547c9491afd210e736a (patch)
tree67f83684cf67268dcb65d8062280f848057a74c2 /plugins/alsa/alsa-bluez.h
parentded8e37b50982677480869763f3573ff43858505 (diff)
Added bluez sound playback support
This adds sound playback for incoming sound from connected bluetooth devices. In this version, the softmixer relies on a modified bluez-alsa version (https://github.com/iotbzh/bluez-alsa), that provides an ioplug PCM bluezalsa connection proxy. The softmixer api has a new verb to dynamically set the device to listen to: afb-client-demo ws://localhost:1234/api?token=\uuid=123 smixer bluezalsa_dev '{"interface":"hci0", "device":"F6:32:15:2A:80:70", "profile":"a2dp"}' In this way it is possible to switch from a bluezalsa audio source to another without any further configuration. For now, only interface hci0 is supported. This commit also migrates the softmixer binding to API v3 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-bluez.h')
-rw-r--r--plugins/alsa/alsa-bluez.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/alsa/alsa-bluez.h b/plugins/alsa/alsa-bluez.h
new file mode 100644
index 0000000..85d153a
--- /dev/null
+++ b/plugins/alsa/alsa-bluez.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright(C) 2018 "IoT.bzh"
+ * Author Thierry Bultel <thierry.bultel@iot.bzh>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http : //www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License
+
+ * for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __INC_ALSA_BLUEZ_H
+#define __INC_ALSA_BLUEZ_H
+
+#include <alsa/asoundlib.h>
+
+extern void alsa_bluez_init();
+extern int alsa_bluez_set_device(const char * interface, const char * device, const char * profile);
+
+#endif /* __INC_ALSA_BLUEZ_H */