audio: Remove unix socket support
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH v2 1/5 audio: Remove unix socket support
From: Luiz Augusto von Dentz <[email protected]>
Unix socket support is deprecated by Media API.
---
v2: Rebase on top of 4.101
Makefile.am | 1 - audio/a2dp.c | 4 - audio/device.c | 3 - audio/manager.c | 7 - audio/unix.c | 1909 ------------------------------------------------------- audio/unix.h | 30 - 6 files changed, 1954 deletions(-) delete mode 100644 audio/unix.c delete mode 100644 audio/unix.h
Makefile.am +0 -1
@@ -152,7 +152,6 @@ builtin_sources += audio/main.c \ audio/a2dp.h audio/a2dp.c \ audio/avdtp.h audio/avdtp.c \ audio/ipc.h audio/ipc.c \ - audio/unix.h audio/unix.c \ audio/media.h audio/media.c \ audio/transport.h audio/transport.c \ audio/telephony.h audio/a2dp-codecs.h
audio/a2dp.c +0 -4
@@ -43,7 +43,6 @@#include "avdtp.h" #include "sink.h" #include "source.h" -#include "unix.h" #include "a2dp.h" #include "sdpd.h"
@@ -1240,15 +1239,12 @@ static gboolean delayreport_ind(struct avdtp *session, uint8_t *err, void *user_data) { struct a2dp_sep *a2dp_sep = user_data; -struct audio_device *dev =a2dp_get_dev (session);if (a2dp_sep->type ==AVDTP_SEP_TYPE_SINK )DBG ("Sink %p: DelayReport_Ind" , sep);else DBG ("Source %p: DelayReport_Ind" , sep); -unix_delay_report (dev, rseid, delay); -return TRUE; }
audio/device.c +0 -3
@@ -49,7 +49,6 @@#include "ipc.h" #include "dbus-common.h" #include "device.h" -#include "unix.h" #include "avdtp.h" #include "control.h" #include "avctp.h"
@@ -711,8 +710,6 @@ gboolean audio_device_is_active(struct audio_device *dev,void audio_device_unregister (struct audio_device *device) { -unix_device_removed (device); -if (device->hs_preauth_id) {g_source_remove (device->hs_preauth_id); device->hs_preauth_id =0 ;
audio/manager.c +0 -7
@@ -69,7 +69,6 @@#include "manager.h" #include "sdpd.h" #include "telephony.h" -#include "unix.h" typedef enum { HEADSET = 1 << 0,
@@ -1235,9 +1234,6 @@ int audio_manager_init(DBusConnection *conn, GKeyFile *conf, max_connected_headsets = i; proceed: -if (enabled.socket) -unix_init (); -if (enabled.media)btd_register_adapter_driver (&media_server_driver);
@@ -1274,9 +1270,6 @@ void audio_manager_exit(void) config =NULL ; } -if (enabled.socket) -unix_exit (); -if (enabled.media)btd_unregister_adapter_driver (&media_server_driver);
audio/unix.c deleted +0 -1909
1,909 lines not on this page · raw message
audio/unix.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* -* BlueZ - Bluetooth protocol stack for Linux -* -* Copyright (C) 2006-2010 Nokia Corporation -* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]> -* -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program 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 General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* -*/ - -void unix_device_removed (struct audio_device *dev); - -void unix_delay_report (struct audio_device *dev,uint8_t seid,uint16_t delay); - -int unix_init (void ); -void unix_exit (void );
Signature · 1 line
1.7.10.2
Luiz Augusto von Dentz
maintainerPATCH v2 2/5 audio: Remove ALSA support
From: Luiz Augusto von Dentz <[email protected]>
ALSA support depend on unix support that is now removed.
--- Makefile.am | 29 - acinclude.m4 | 16 +- audio/bluetooth.conf | 36 - audio/ctl_bluetooth.c | 383 ----------- audio/pcm_bluetooth.c | 1785 ------------------------------------------------- configure.ac | 1 - 6 files changed, 1 insertion(+), 2249 deletions(-) delete mode 100644 audio/bluetooth.conf delete mode 100644 audio/ctl_bluetooth.c delete mode 100644 audio/pcm_bluetooth.c
Makefile.am +0 -29
@@ -335,35 +335,6 @@ EXTRA_DIST += src/genbuiltin src/bluetooth.conf src/org.bluez.service \ audio/telephony-maemo6.c sap/sap-dummy.c sap/sap-u8500.c \ proximity/proximity.conf -if ALSA -alsadir = $(libdir)/alsa-lib - -alsa_LTLIBRARIES = audio/libasound_module_pcm_bluetooth.la \ - audio/libasound_module_ctl_bluetooth.la - -audio_libasound_module_pcm_bluetooth_la_SOURCES = audio/pcm_bluetooth.c \ - audio/rtp.h audio/ipc.h audio/ipc.c -audio_libasound_module_pcm_bluetooth_la_LDFLAGS = $(AM_LDFLAGS) -module \ - -avoid-version -audio_libasound_module_pcm_bluetooth_la_LIBADD = sbc/libsbc.la \ - lib/libbluetooth-private.la @ALSA_LIBS@ -audio_libasound_module_pcm_bluetooth_la_CFLAGS = $(AM_CFLAGS) @ALSA_CFLAGS@ - -audio_libasound_module_ctl_bluetooth_la_SOURCES = audio/ctl_bluetooth.c \ - audio/rtp.h audio/ipc.h audio/ipc.c -audio_libasound_module_ctl_bluetooth_la_LDFLAGS = $(AM_LDFLAGS) -module \ - -avoid-version -audio_libasound_module_ctl_bluetooth_la_LIBADD = \ - lib/libbluetooth-private.la @ALSA_LIBS@ -audio_libasound_module_ctl_bluetooth_la_CFLAGS = $(AM_CFLAGS) @ALSA_CFLAGS@ - -if DATAFILES -alsaconfdir = $(datadir)/alsa - -alsaconf_DATA = audio/bluetooth.conf -endif -endif - if AUDIOPLUGIN if GSTREAMER gstreamerdir = $(libdir)/gstreamer-0.10
acinclude.m4 +1 -15
@@ -114,13 +114,6 @@ AC_DEFUN([AC_PATH_GSTREAMER], [ AC_SUBST(GSTREAMER_PLUGINSDIR) ]) -AC_DEFUN([AC_PATH_ALSA], [ - PKG_CHECK_MODULES(ALSA, alsa, alsa_found=yes, alsa_found=no) - AC_CHECK_LIB(rt, clock_gettime, ALSA_LIBS="$ALSA_LIBS -lrt", alsa_found=no) - AC_SUBST(ALSA_CFLAGS) - AC_SUBST(ALSA_LIBS) -]) - AC_DEFUN([AC_PATH_USB], [ PKG_CHECK_MODULES(USB, libusb, usb_found=yes, usb_found=no) AC_SUBST(USB_CFLAGS)
@@ -176,7 +169,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [ sndfile_enable=${sndfile_found} hal_enable=no usb_enable=${usb_found} - alsa_enable=${alsa_found} gstreamer_enable=${gstreamer_found} audio_enable=yes input_enable=yes
@@ -257,10 +249,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [ gstreamer_enable=${enableval} ]) - AC_ARG_ENABLE(alsa, AC_HELP_STRING([--enable-alsa], [enable ALSA support]), [ - alsa_enable=${enableval} - ]) - AC_ARG_ENABLE(usb, AC_HELP_STRING([--enable-usb], [enable USB support]), [ usb_enable=${enableval} ])
@@ -368,9 +356,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes") AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes") - AM_CONDITIONAL(SBC, test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes" || - test "${test_enable}" = "yes") - AM_CONDITIONAL(ALSA, test "${alsa_enable}" = "yes" && test "${alsa_found}" = "yes") + AM_CONDITIONAL(SBC, test "${gstreamer_enable}" = "yes" || test "${test_enable}" = "yes") AM_CONDITIONAL(GSTREAMER, test "${gstreamer_enable}" = "yes" && test "${gstreamer_found}" = "yes") AM_CONDITIONAL(AUDIOPLUGIN, test "${audio_enable}" = "yes") AM_CONDITIONAL(INPUTPLUGIN, test "${input_enable}" = "yes")
audio/bluetooth.conf deleted +0 -36
@@ -1,36 +0,0 @@ -# Please note that this ALSA configuration file fragment needs be enabled in -# /etc/asound.conf or a similar configuration file with directives similar to -# the following: -# -#@hooks [ -# { -# func load -# files [ -# "/etc/alsa/bluetooth.conf" -# ] -# errors false -# } -#] - -pcm.rawbluetooth { - @args [ ADDRESS ] - @args.ADDRESS { - type string - } - type bluetooth - device $ADDRESS -} - -pcm.bluetooth { - @args [ ADDRESS ] - @args.ADDRESS { - type string - } - type plug - slave { - pcm { - type bluetooth - device $ADDRESS - } - } -}
audio/ctl_bluetooth.c deleted +0 -383
383 lines not on this page · raw message
audio/pcm_bluetooth.c deleted +0 -1785
1,785 lines not on this page · raw message
configure.ac +0 -1
@@ -41,7 +41,6 @@ AC_CHECK_HEADER([sys/inotify.h], [AC_MSG_ERROR(inotify headers are required and missing)]) AC_PATH_DBUS AC_PATH_GLIB -AC_PATH_ALSA AC_PATH_GSTREAMER AC_PATH_USB AC_PATH_UDEV
Signature · 1 line
1.7.10.2
Luiz Augusto von Dentz
maintainerPATCH v2 3/5 audio: Remove internal audio IPC
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
With unix socket and ALSA removed there is no longer any use for the internal IPC.
--- Makefile.am | 4 +- Makefile.tools | 5 +- audio/device.c | 1 - audio/gstavdtpsink.c | 1107 ++++------------------------------- audio/gstavdtpsink.h | 1 - audio/ipc.c | 134 ----- audio/ipc.h | 361 ------------ audio/manager.c | 1 - test/ipctest-a2dp-easy.test | 8 - test/ipctest-a2dp-resume-fast.test | 82 --- test/ipctest-hsp-a2dp-switch.test | 50 -- test/ipctest-hsp-easy.test | 7 - test/ipctest-init-shutdown.test | 59 -- test/ipctest.c | 1133 ------------------------------------ 14 files changed, 112 insertions(+), 2841 deletions(-) delete mode 100644 audio/ipc.c delete mode 100644 audio/ipc.h delete mode 100644 test/ipctest-a2dp-easy.test delete mode 100644 test/ipctest-a2dp-resume-fast.test delete mode 100644 test/ipctest-hsp-a2dp-switch.test delete mode 100644 test/ipctest-hsp-easy.test delete mode 100644 test/ipctest-init-shutdown.test delete mode 100644 test/ipctest.c
Makefile.am +1 -3
@@ -151,7 +151,6 @@ builtin_sources += audio/main.c \ audio/sink.h audio/sink.c \ audio/a2dp.h audio/a2dp.c \ audio/avdtp.h audio/avdtp.c \ - audio/ipc.h audio/ipc.c \ audio/media.h audio/media.c \ audio/transport.h audio/transport.c \ audio/telephony.h audio/a2dp-codecs.h
@@ -348,8 +347,7 @@ audio_libgstbluetooth_la_SOURCES = audio/gstbluetooth.c audio/gstpragma.h \ audio/gstavdtpsink.h audio/gstavdtpsink.c \ audio/gsta2dpsink.h audio/gsta2dpsink.c \ audio/gstsbcutil.h audio/gstsbcutil.c \ - audio/gstrtpsbcpay.h audio/gstrtpsbcpay.c \ - audio/rtp.h audio/ipc.h audio/ipc.c + audio/gstrtpsbcpay.h audio/gstrtpsbcpay.c audio_libgstbluetooth_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version audio_libgstbluetooth_la_LIBADD = sbc/libsbc.la lib/libbluetooth-private.la \ @DBUS_LIBS@ @GSTREAMER_LIBS@ \
Makefile.tools +1 -4
@@ -163,7 +163,7 @@ sbin_PROGRAMS += test/hciemu bin_PROGRAMS += test/l2test test/rctest noinst_PROGRAMS += test/gaptest test/sdptest test/scotest \ - test/attest test/hstest test/avtest test/ipctest \ + test/attest test/hstest test/avtest \ test/lmptest test/bdaddr test/agent \ test/btiotest test/test-textfile \ test/uuidtest test/mpris-player
@@ -188,9 +188,6 @@ test_avtest_LDADD = lib/libbluetooth-private.la test_lmptest_LDADD = lib/libbluetooth-private.la -test_ipctest_SOURCES = test/ipctest.c audio/ipc.h audio/ipc.c -test_ipctest_LDADD= @GLIB_LIBS@ sbc/libsbc.la - test_bdaddr_SOURCES = test/bdaddr.c src/oui.h src/oui.c test_bdaddr_LDADD = lib/libbluetooth-private.la
audio/device.c +0 -1
@@ -46,7 +46,6 @@#include "../src/device.h" #include "error.h" -#include "ipc.h" #include "dbus-common.h" #include "device.h" #include "avdtp.h"
audio/gstavdtpsink.c +110 -997
1,329 lines not on this page · raw message
audio/gstavdtpsink.h +0 -1
@@ -56,7 +56,6 @@ struct _GstAvdtpSink {struct bluetooth_data *data;gboolean autoconnect; -GIOChannel *server;/* mp3 stream data (outside caps data)*/ gint mp3_using_crc;
audio/ipc.c deleted +0 -134
134 lines not on this page · raw message
audio/ipc.h deleted +0 -361
361 lines not on this page · raw message
audio/manager.c +0 -1
@@ -54,7 +54,6 @@#include "../src/device.h" #include "log.h" -#include "ipc.h" #include "device.h" #include "error.h" #include "avdtp.h"
test/ipctest-a2dp-easy.test deleted +0 -8
@@ -1,8 +0,0 @@ -profile a2dp -init_bt -init_profile -start_stream -sleep 2 -stop_stream -quit -
test/ipctest-a2dp-resume-fast.test deleted +0 -82
82 lines not on this page · raw message
test/ipctest-hsp-a2dp-switch.test deleted +0 -50
50 lines not on this page · raw message
test/ipctest-hsp-easy.test deleted +0 -7
@@ -1,7 +0,0 @@ -profile hsp -init_bt -init_profile -start_stream -sleep 2 -stop_stream -quit
test/ipctest-init-shutdown.test deleted +0 -59
59 lines not on this page · raw message
test/ipctest.c deleted +0 -1133
916 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.2
Part of the diff is not shown here. View the raw message.
Luiz Augusto von Dentz
maintainerPATCH v2 4/5 audio: Remove local A2DP endpoints options
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
The local endpoints are no use without the internal IPC.
--- audio/a2dp.c | 72 +----------------------------------------------------- audio/audio.conf | 5 ---- 2 files changed, 1 insertion(+), 76 deletions(-)
audio/a2dp.c +1 -71
@@ -1438,13 +1438,10 @@ static struct a2dp_server *find_server(GSList *list, const bdaddr_t *src)int a2dp_register (DBusConnection *conn,const bdaddr_t *src,GKeyFile *config) { -int sbc_srcs =0 , sbc_sinks =0 ; -int mpeg12_srcs =0 , mpeg12_sinks =0 ; -gboolean source = TRUE, sink = FALSE, socket = FALSE; +gboolean source = TRUE, sink = FALSE;gboolean delay_reporting = FALSE;char *str;GError *err =NULL ; -int i;struct a2dp_server *server;if (!config)
@@ -1460,8 +1457,6 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) source = TRUE;if (strstr (str,"Source" )) sink = TRUE; -if (strstr (str,"Socket" )) - socket = TRUE;g_free (str); }
@@ -1475,50 +1470,6 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) source = FALSE;if (strstr (str,"Source" )) sink = FALSE; -if (strstr (str,"Socket" )) - socket = FALSE; -g_free (str); - } - -/* Don't register any local sep if Socket is disabled */ -if (socket == FALSE) - goto proceed; - - str =g_key_file_get_string (config,"A2DP" ,"SBCSources" , &err); -if (err) { -DBG ("audio.conf: %s" , err->message); -g_clear_error (&err); - sbc_srcs =1 ; - }else { - sbc_srcs =atoi (str); -g_free (str); - } - - str =g_key_file_get_string (config,"A2DP" ,"MPEG12Sources" , &err); -if (err) { -DBG ("audio.conf: %s" , err->message); -g_clear_error (&err); - }else { - mpeg12_srcs =atoi (str); -g_free (str); - } - - str =g_key_file_get_string (config,"A2DP" ,"SBCSinks" , &err); -if (err) { -DBG ("audio.conf: %s" , err->message); -g_clear_error (&err); - sbc_sinks =1 ; - }else { - sbc_sinks =atoi (str); -g_free (str); - } - - str =g_key_file_get_string (config,"A2DP" ,"MPEG12Sinks" , &err); -if (err) { -DBG ("audio.conf: %s" , err->message); -g_clear_error (&err); - }else { - mpeg12_sinks =atoi (str);g_free (str); }
@@ -1554,29 +1505,8 @@ proceed: server->version =0x0102 ; server->source_enabled = source; -if (source) { -for (i =0 ; i < sbc_srcs; i++) -a2dp_add_sep (src,AVDTP_SEP_TYPE_SOURCE , -A2DP_CODEC_SBC , delay_reporting, -NULL ,NULL ,NULL ,NULL ); -for (i =0 ; i < mpeg12_srcs; i++) -a2dp_add_sep (src,AVDTP_SEP_TYPE_SOURCE , -A2DP_CODEC_MPEG12 , delay_reporting, -NULL ,NULL ,NULL ,NULL ); - } server->sink_enabled = sink; -if (sink) { -for (i =0 ; i < sbc_sinks; i++) -a2dp_add_sep (src,AVDTP_SEP_TYPE_SINK , -A2DP_CODEC_SBC , delay_reporting, -NULL ,NULL ,NULL ,NULL ); - -for (i =0 ; i < mpeg12_sinks; i++) -a2dp_add_sep (src,AVDTP_SEP_TYPE_SINK , -A2DP_CODEC_MPEG12 , delay_reporting, -NULL ,NULL ,NULL ,NULL ); - }return 0 ; }
audio/audio.conf +0 -5
@@ -38,8 +38,3 @@ MaxConnected=1 # scan type changed to interlaced. Such allows faster connection initiated # by a headset. FastConnectable=false - -# Just an example of potential config options for the other interfaces -#[A2DP] -#SBCSources=1 -#MPEG12Sources=0
Signature · 1 line
1.7.10.2
Luiz Augusto von Dentz
maintainerPATCH v2 5/5 audio: Remove remaining references to Socket
In reply to Luiz Augusto von DentzFrom: Luiz Augusto von Dentz <[email protected]>
--- audio/audio.conf | 2 +- audio/manager.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-)
audio/audio.conf +1 -1
@@ -9,7 +9,7 @@ # If we want to disable support for specific services # Defaults to supporting all implemented services -#Disable=Gateway,Source,Socket +#Disable=Gateway,Source # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA) # Defaults to HCI
audio/manager.c +0 -5
@@ -112,7 +112,6 @@ static struct enabled_interfaces enabled = { .sink = TRUE, .source = FALSE, .control = TRUE, - .socket = FALSE, .media = TRUE, };
@@ -1181,8 +1180,6 @@ int audio_manager_init(DBusConnection *conn, GKeyFile *conf, enabled.source = TRUE; else if (g_str_equal(list[i], "Control")) enabled.control = TRUE; - else if (g_str_equal(list[i], "Socket")) - enabled.socket = TRUE; else if (g_str_equal(list[i], "Media")) enabled.media = TRUE;
@@ -1202,8 +1199,6 @@ int audio_manager_init(DBusConnection *conn, GKeyFile *conf, enabled.source = FALSE; else if (g_str_equal(list[i], "Control")) enabled.control = FALSE; - else if (g_str_equal(list[i], "Socket")) - enabled.socket = FALSE; else if (g_str_equal(list[i], "Media")) enabled.media = FALSE; }
Signature · 1 line
1.7.10.2
Hi Luiz,
Quoted 6 lines · Luiz Augusto von Dentz
From: Luiz Augusto von Dentz <[email protected]>
Unix socket support is deprecated by Media API.
---
v2: Rebase on top of 4.101
Quoted 9 lines
Makefile.am | 1 - audio/a2dp.c | 4 - audio/device.c | 3 - audio/manager.c | 7 - audio/unix.c | 1909 ------------------------------------------------------- audio/unix.h | 30 - 6 files changed, 1954 deletions(-) delete mode 100644 audio/unix.c delete mode 100644 audio/unix.h
All five patches have been applied. Thanks.
This marks also the beginning of applying patches which are only destined for BlueZ 5.
Johan