summaryrefslogtreecommitdiff
path: root/audio/ctl_bluetooth.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-05-26 21:12:20 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-05-26 21:12:20 +0000
commite343f2b21a2209d5713e20ad38bbcc862897380b (patch)
tree9a3fc2f20d11d1886de65b352bffa2f9f73ab72d /audio/ctl_bluetooth.c
parentd2d76421ad539e2c6da87e4b4fd2a42493053f49 (diff)
Move more common stuff to ipc.h
Diffstat (limited to 'audio/ctl_bluetooth.c')
-rw-r--r--audio/ctl_bluetooth.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/audio/ctl_bluetooth.c b/audio/ctl_bluetooth.c
index bcc376595..4d73c7884 100644
--- a/audio/ctl_bluetooth.c
+++ b/audio/ctl_bluetooth.c
@@ -31,14 +31,10 @@
#include <alsa/asoundlib.h>
#include <alsa/control_external.h>
-#ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX 108
-#endif
+#include "ipc.h"
#define DBG(fmt, arg...) printf("DEBUG: %s: " fmt "\n" , __FUNCTION__ , ## arg)
-#define SOCKET_NAME "/org/bluez/audio"
-
#define BLUETOOTH_MINVOL 0
#define BLUETOOTH_MAXVOL 15
@@ -220,7 +216,8 @@ SND_CTL_PLUGIN_DEFINE_FUNC(bluetooth)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- snprintf(addr.sun_path + 1, UNIX_PATH_MAX - 2, "%s/%d", SOCKET_NAME, id);
+ snprintf(addr.sun_path + 1, UNIX_PATH_MAX - 2, "%s/%d",
+ IPC_SOCKET_NAME, id);
if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
SNDERR("Can't bind socket");
@@ -230,7 +227,7 @@ SND_CTL_PLUGIN_DEFINE_FUNC(bluetooth)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- snprintf(addr.sun_path + 1, UNIX_PATH_MAX - 2, "%s", SOCKET_NAME);
+ snprintf(addr.sun_path + 1, UNIX_PATH_MAX - 2, "%s", IPC_SOCKET_NAME);
if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
SNDERR("Can't connect socket");