diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-04-04 09:39:23 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-04-04 09:39:23 +0000 |
commit | e7bd84e89e0af0cd2c2390bf7a173f90a473fc62 (patch) | |
tree | 5935ff4fbd5961ddc9ba06aa7804c8fe0076bd8e | |
parent | a36be2a103e95b04d5b348c83b41dc8c06439990 (diff) |
Add skeleton for generic ALSA plugins
-rw-r--r-- | acinclude.m4 | 7 | ||||
-rw-r--r-- | audio/Makefile.am | 16 | ||||
-rw-r--r-- | audio/ctl_bluetooth.c | 26 | ||||
-rw-r--r-- | audio/pcm_bluetooth.c | 26 | ||||
-rw-r--r-- | configure.in | 1 |
5 files changed, 75 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index c792ddf7..754cb531 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -157,6 +157,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ usb_enable=${usb_found} glib_enable=no obex_enable=${openobex_found} + alsa_enable=${alsa_found} headset_enable=no network_enable=no input_enable=no @@ -191,6 +192,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AC_ARG_ENABLE(all, AC_HELP_STRING([--enable-all], [enable all extra options below]), [ dbus_enable=${enableval} obex_enable=${enableval} + alsa_enable=${enableval} hcid_enable=${enableval} sdpd_enable=${enableval} hidd_enable=${enableval} @@ -230,6 +232,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ obex_enable=${enableval} ]) + AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable ALSA support]), [ + alsa_enable=${enableval} + ]) + AC_ARG_ENABLE(headset, AC_HELP_STRING([--enable-headset], [enable headset service]), [ headset_enable=${enableval} ]) @@ -341,6 +347,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(HAL, test "${hal_enable}" = "yes" && test "${hal_found}" = "yes") AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes") AM_CONDITIONAL(OBEX, test "${obex_enable}" = "yes" && test "${openobex_found}" = "yes") + AM_CONDITIONAL(ALSA, test "${alsa_enable}" = "yes" && test "${alsa_found}" = "yes") AM_CONDITIONAL(HEADSETSERVICE, test "${headset_enable}" = "yes") AM_CONDITIONAL(NETWORKSERVICE, test "${network_enable}" = "yes") AM_CONDITIONAL(INPUTSERVICE, test "${input_enable}" = "yes") diff --git a/audio/Makefile.am b/audio/Makefile.am index 4de6d59f..1f8d70d7 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -16,6 +16,20 @@ bluetoothd_service_headset_LDADD = $(top_builddir)/common/libhelper.a \ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ endif +if ALSA +alsadir = $(libdir)/alsa-lib + +alsa_LTLIBRARIES = libasound_module_pcm_bluetooth.la libasound_module_ctl_bluetooth.la + +libasound_module_pcm_bluetooth_la_SOURCES = pcm_bluetooth.c +libasound_module_pcm_bluetooth_la_LDFLAGS = -module -avoid-version -export-dynamic +libasound_module_pcm_bluetooth_la_LIBADD = @ALSA_LIBS@ + +libasound_module_ctl_bluetooth_la_SOURCES = ctl_bluetooth.c +libasound_module_ctl_bluetooth_la_LDFLAGS = -module -avoid-version -export-dynamic +libasound_module_ctl_bluetooth_la_LIBADD = @ALSA_LIBS@ +endif + noinst_PROGRAMS = bluetoothd-service-audio bluetoothd_service_audio_SOURCES = main.c manager.h manager.c @@ -23,7 +37,7 @@ bluetoothd_service_audio_SOURCES = main.c manager.h manager.c bluetoothd_service_audio_LDADD = $(top_builddir)/common/libhelper.a \ @SBC_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @SBC_CFLAGS@ +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @ALSA_CFLAGS@ @SBC_CFLAGS@ INCLUDES = -I$(top_srcdir)/common diff --git a/audio/ctl_bluetooth.c b/audio/ctl_bluetooth.c new file mode 100644 index 00000000..7e9755b8 --- /dev/null +++ b/audio/ctl_bluetooth.c @@ -0,0 +1,26 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2007 Marcel Holtmann <marcel@holtmann.org> + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c new file mode 100644 index 00000000..7e9755b8 --- /dev/null +++ b/audio/pcm_bluetooth.c @@ -0,0 +1,26 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2007 Marcel Holtmann <marcel@holtmann.org> + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif diff --git a/configure.in b/configure.in index 1c65771d..9fd72959 100644 --- a/configure.in +++ b/configure.in @@ -27,6 +27,7 @@ AC_FUNC_PPOLL AC_PATH_BLUEZ AC_PATH_GLIB AC_PATH_DBUS +AC_PATH_ALSA AC_PATH_OPENOBEX AC_PATH_OPENSYNC AC_PATH_HAL |