summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-06-27 18:31:08 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-06-27 18:31:08 +0000
commit389d6a32fa14abefec394b9ebfa3b2deb51489c7 (patch)
treeb786ca6e32d380cec5f52d0961dce8246e0e7a57
parent2a2c204cd0e4bcf0a603ba72be9a50203a817b54 (diff)
Revert changes on storage, rfcomm might change over time.
-rw-r--r--audio/device.c2
-rw-r--r--audio/headset.c4
-rw-r--r--audio/headset.h2
-rw-r--r--audio/manager.c17
4 files changed, 9 insertions, 16 deletions
diff --git a/audio/device.c b/audio/device.c
index 884a2661..785d0115 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -186,7 +186,7 @@ int device_store(struct device *device, gboolean is_default)
if (is_default)
textfile_put(filename, "default", dst_addr);
if (device->headset)
- snprintf(value, 64, "headset#%d", headset_get_channel(device));
+ snprintf(value, 64, "headset");
else if (device->gateway)
snprintf(value, 64, "gateway");
else if (device->sink)
diff --git a/audio/headset.c b/audio/headset.c
index 1e8b640a..2e285aa9 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1396,12 +1396,12 @@ void headset_update(void *device, sdp_record_t *record, uint16_t svc)
}
struct headset *headset_init(void *device, sdp_record_t *record,
- uint16_t svc, int channel)
+ uint16_t svc)
{
struct headset *headset;
headset = g_new0(struct headset, 1);
- headset->rfcomm_ch = channel;
+ headset->rfcomm_ch = -1;
headset->sp_gain = -1;
headset->mic_gain = -1;
diff --git a/audio/headset.h b/audio/headset.h
index 8ef08249..c858d206 100644
--- a/audio/headset.h
+++ b/audio/headset.h
@@ -55,7 +55,7 @@ typedef enum {
struct headset;
struct headset *headset_init(void *device, sdp_record_t *record,
- uint16_t svc, int channel);
+ uint16_t svc);
void headset_free(void *device);
diff --git a/audio/manager.c b/audio/manager.c
index 8ca57100..00f5d931 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -186,7 +186,7 @@ static void handle_record(sdp_record_t *record, struct device *device)
headset_update(device, record, uuid16);
else
device->headset = headset_init(device,
- record, uuid16, -1);
+ record, uuid16);
break;
case HEADSET_AGW_SVCLASS_ID:
debug("Found Headset AG record");
@@ -197,7 +197,7 @@ static void handle_record(sdp_record_t *record, struct device *device)
headset_update(device, record, uuid16);
else
device->headset = headset_init(device,
- record, uuid16, -1);
+ record, uuid16);
break;
case HANDSFREE_AGW_SVCLASS_ID:
debug("Found Handsfree AG record");
@@ -637,7 +637,7 @@ struct device *manager_device_connected(bdaddr_t *bda)
}
if (!device->headset)
- device->headset = headset_init(device, NULL, 0, -1);
+ device->headset = headset_init(device, NULL, 0);
if (!device->headset)
return NULL;
@@ -1101,15 +1101,8 @@ static void parse_stored_devices(char *key, char *value, void *data)
if (!device)
return;
- if (strncmp(value, "headset", strlen("headset")) == 0) {
- int channel = -1;
- char *ptr;
-
- if ((ptr = strchr(value, '#')))
- channel = strtol(ptr+1, NULL, 10);
-
- device->headset = headset_init(device, NULL, 0, channel);
- }
+ if (strncmp(value, "headset", strlen("headset")) == 0)
+ device->headset = headset_init(device, NULL, 0);
add_device(device);
}