Skip to contentSkip to conversation

audio: Remove unused constant

PATCH In review [email protected] 2 participants 4 messages Apr 12, 2013 – Apr 15, 2013 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 audio: Remove unused constant

From: João Paulo Rechi Vita <[email protected]>

Removes the never used constant AUDIO_INTERFACE which is defined to "org.bluez.Audio".

---
 profiles/audio/device.c | 2 --
 1 file changed, 2 deletions(-)
profiles/audio/device.c +0 -2
index 907221d..b9d1dde 100644
@@ -56,8 +56,6 @@
 #include "sink.h"
 #include "source.h"
 
-#define AUDIO_INTERFACE "org.bluez.Audio"
-
 #define CONTROL_CONNECT_TIMEOUT 2
 #define AVDTP_CONNECT_TIMEOUT 1
 #define AVDTP_CONNECT_TIMEOUT_BOOST 1
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 2/3 audio: Remove unused function

From: João Paulo Rechi Vita <[email protected]>

Removes the never used function audio_device_is_active.

---
 profiles/audio/device.c | 19 -------------------
 profiles/audio/device.h |  3 ---
 2 files changed, 22 deletions(-)
profiles/audio/device.c +0 -19
index b9d1dde..7a76284 100644
@@ -316,25 +316,6 @@ struct audio_device *audio_device_register(struct btd_device *device)
 	return dev;
 }
 
-gboolean audio_device_is_active(struct audio_device *dev,
-						const char *interface)
-{
-	if (!interface) {
-		if ((dev->sink || dev->source) && avdtp_is_connected(dev))
-			return TRUE;
-	} else if (!strcmp(interface, AUDIO_SINK_INTERFACE) && dev->sink &&
-				avdtp_is_connected(dev))
-		return TRUE;
-	else if (!strcmp(interface, AUDIO_SOURCE_INTERFACE) && dev->source &&
-				avdtp_is_connected(dev))
-		return TRUE;
-	else if (!strcmp(interface, AUDIO_CONTROL_INTERFACE) && dev->control &&
-				control_is_active(dev))
-		return TRUE;
-
-	return FALSE;
-}
-
 void audio_device_unregister(struct audio_device *device)
 {
 	DBG("%s", device_get_path(device->btd_dev));
profiles/audio/device.h +0 -3
index ad4dae5..b772594 100644
@@ -43,6 +43,3 @@ struct audio_device {
 struct audio_device *audio_device_register(struct btd_device *device);
 
 void audio_device_unregister(struct audio_device *device);
-
-gboolean audio_device_is_active(struct audio_device *dev,
-						const char *interface);
Signature · 1 line
1.7.11.7
#2 lore raw

PATCH 3/3 audio: Remove unused constants

In reply to [email protected]

From: João Paulo Rechi Vita <[email protected]>

Removes the never used constants AUDIO_SINK_INTERFACE and AUDIO_SOURCE_INTERFACE which are defined to "org.bluez.AudioSink" and "org.bluez.AudioSource", respectively.

---
 profiles/audio/sink.h   | 2 --
 profiles/audio/source.h | 2 --
 2 files changed, 4 deletions(-)
profiles/audio/sink.h +0 -2
index ba0dde8..7ec7610 100644
@@ -22,8 +22,6 @@
  *
  */
 
-#define AUDIO_SINK_INTERFACE "org.bluez.AudioSink"
-
 typedef enum {
 	SINK_STATE_DISCONNECTED,
 	SINK_STATE_CONNECTING,
profiles/audio/source.h +0 -2
index 61afd94..317db9a 100644
@@ -23,8 +23,6 @@
  *
  */
 
-#define AUDIO_SOURCE_INTERFACE "org.bluez.AudioSource"
-
 typedef enum {
 	SOURCE_STATE_DISCONNECTED,
 	SOURCE_STATE_CONNECTING,
Signature · 1 line
1.7.11.7
#3 lore raw
In reply to [email protected]

Hi Joao,

Quoted 22 lines · On Sat, Apr 13, 2013 at 1:34 AM, <[email protected]> wrote:

From: João Paulo Rechi Vita <[email protected]>

Removes the never used constant AUDIO_INTERFACE which is defined to "org.bluez.Audio".

---
 profiles/audio/device.c | 2 --
 1 file changed, 2 deletions(-)
profiles/audio/device.c +0 -3
index 907221d..b9d1dde 100644
@@ -56,8 +56,6 @@
 #include "sink.h"
 #include "source.h"
 
-#define AUDIO_INTERFACE "org.bluez.Audio"
-
 #define CONTROL_CONNECT_TIMEOUT 2
 #define AVDTP_CONNECT_TIMEOUT 1
 #define AVDTP_CONNECT_TIMEOUT_BOOST 1
--
Quoted 1 line

1.7.11.7

All 3 patches pushed upstream, thanks.

--
Luiz Augusto von Dentz