summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <joao.vita@gmail.com>2008-08-25 22:48:27 -0300
committerLennart Poettering <lennart@poettering.net>2008-09-11 01:12:09 +0300
commit199bdf2f45088b59fa897ff6098da40577f3022e (patch)
tree78f6edf42b398482d71803a851bb4d5b3decadac /src
parente2f3a86ac28d8c9b8621ce6f83a35508f852148c (diff)
Add some more device properties to the sink properties list
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-bt-device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/module-bt-device.c b/src/modules/module-bt-device.c
index 985ad7ee..e6763f9b 100644
--- a/src/modules/module-bt-device.c
+++ b/src/modules/module-bt-device.c
@@ -105,6 +105,7 @@ struct userdata {
int stream_fd;
int transport;
+ char *strtransport;
int link_mtu;
size_t block_size;
pa_usec_t latency;
@@ -447,6 +448,7 @@ static int bt_setconf(struct userdata *u) {
}
u->transport = msg.setconf_rsp.transport;
+ u->strtransport = (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP ? pa_xstrdup("A2DP") : pa_xstrdup("SCO"));
u->link_mtu = msg.setconf_rsp.link_mtu;
/* setup SBC encoder now we agree on parameters */
@@ -924,7 +926,14 @@ int pa__init(pa_module* m) {
pa_sink_new_data_set_name(&data, u->name);
pa_sink_new_data_set_sample_spec(&data, &u->ss);
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->name);
- pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Bluetooth sink '%s' (%s)", u->name, u->addr);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Bluetooth %s '%s' (%s)", u->strtransport, u->name, u->addr);
+ pa_proplist_setf(data.proplist, "bluetooth.protocol", u->profile);
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_API, "bluez");
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_CLASS, "sound");
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_CONNECTOR, "bluetooth");
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_FORM_FACTOR, "headset"); /*FIXME*/
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_VENDOR_PRODUCT_ID, "product_id"); /*FIXME*/
+ pa_proplist_setf(data.proplist, PA_PROP_DEVICE_SERIAL, "serial"); /*FIXME*/
u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
pa_sink_new_data_done(&data);
if (!u->sink) {