Lines Matching refs:device
55 #include "device.h"
64 #include "../src/device.h"
173 int (*callback) (struct audio_device *device, const char *buf);
199 static int rfcomm_connect(struct audio_device *device, headset_stream_cb_t cb,
201 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
338 static int supported_features(struct audio_device *device, const char *buf)
340 struct headset *hs = device->headset;
399 static int report_indicators(struct audio_device *device, const char *buf)
401 struct headset *hs = device->headset;
517 struct audio_device *device = l->data;
518 struct headset *hs = device->headset;
684 static int telephony_generic_rsp(struct audio_device *device, cme_error_t err)
686 struct headset *hs = device->headset;
700 struct audio_device *device = telephony_device;
701 struct headset *hs = device->headset;
718 hfp_slc_complete(device);
791 static int key_press(struct audio_device *device, const char *buf)
796 g_dbus_emit_signal(device->conn, device->path,
805 telephony_key_press_req(device, &buf[8]);
815 static int answer_call(struct audio_device *device, const char *buf)
827 telephony_answer_call_req(device);
835 struct audio_device *device = telephony_device;
836 struct headset *hs = device->headset;
841 g_dbus_emit_signal(device->conn, device->path,
848 static int terminate_call(struct audio_device *device, const char *buf)
860 telephony_terminate_call_req(device);
865 static int cli_notification(struct audio_device *device, const char *buf)
867 struct headset *hs = device->headset;
882 static int response_and_hold(struct audio_device *device, const char *buf)
884 struct headset *hs = device->headset;
890 telephony_response_and_hold_req(device, atoi(&buf[8]) < 0);
905 static int last_dialed_number(struct audio_device *device, const char *buf)
907 telephony_last_dialed_number_req(device);
917 static int dial_number(struct audio_device *device, const char *buf)
932 telephony_dial_number_req(device, number);
937 static int signal_gain_setting(struct audio_device *device, const char *buf)
939 struct headset *hs = device->headset;
976 g_dbus_emit_signal(device->conn, device->path,
981 emit_property_changed(device->conn, device->path,
994 static int dtmf_tone(struct audio_device *device, const char *buf)
1001 telephony_transmit_dtmf_req(device, buf[7]);
1011 static int subscriber_number(struct audio_device *device, const char *buf)
1013 telephony_subscriber_number_req(device);
1023 static int list_current_calls(struct audio_device *device, const char *buf)
1025 telephony_list_current_calls_req(device);
1030 static int extended_errors(struct audio_device *device, const char *buf)
1032 struct headset *hs = device->headset;
1048 static int call_waiting_notify(struct audio_device *device, const char *buf)
1050 struct headset *hs = device->headset;
1078 struct audio_device *device = telephony_device;
1079 struct headset *hs = device->headset;
1098 static int operator_selection(struct audio_device *device, const char *buf)
1100 struct headset *hs = device->headset;
1107 telephony_operator_selection_req(device);
1118 static int nr_and_ec(struct audio_device *device, const char *buf)
1120 struct headset *hs = device->headset;
1130 telephony_nr_and_ec_req(device, hs->nrec_req);
1158 static int handle_event(struct audio_device *device, const char *buf)
1166 return ev->callback(device, buf);
1172 static void close_sco(struct audio_device *device)
1174 struct headset *hs = device->headset;
1191 struct audio_device *device)
1201 hs = device->headset;
1241 err = handle_event(device, &hs->buf[hs->data_start]);
1265 headset_set_state(device, HEADSET_STATE_DISCONNECTED);
1271 struct audio_device *device)
1278 headset_set_state(device, HEADSET_STATE_CONNECTED);
1466 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
1469 struct headset *hs = device->headset;
1482 err = bt_search_service(&device->src, &device->dst, &uuid,
1483 get_record_cb, device, NULL);
1492 headset_set_state(device, HEADSET_STATE_CONNECT_IN_PROGRESS);
1561 struct audio_device *device = data;
1562 struct headset *hs = device->headset;
1568 "Device not Connected");
1574 headset_set_state(device, HEADSET_STATE_CONNECTED);
1582 struct audio_device *device = data;
1583 struct headset *hs = device->headset;
1602 struct audio_device *device = data;
1603 struct headset *hs = device->headset;
1609 "Device not Connected");
1611 headset_shutdown(device);
1612 ba2str(&device->dst, hs_address);
1613 info("Disconnected from %s, %s", hs_address, device->path);
1623 struct audio_device *device = data;
1631 connected = (device->headset->state >= HEADSET_STATE_CONNECTED);
1642 struct audio_device *device = data;
1643 struct headset *hs = device->headset;
1658 device->auto_connect = FALSE;
1660 err = rfcomm_connect(device, NULL, NULL, NULL);
1679 struct audio_device *device = data;
1680 struct headset *hs = device->headset;
1687 "Device not Connected");
1717 struct audio_device *device = data;
1718 struct headset *hs = device->headset;
1724 "Device not Connected");
1742 struct audio_device *device = data;
1743 struct headset *hs = device->headset;
1758 "Device not Connected");
1770 "Device Already Connected");
1776 err = sco_connect(device, NULL, NULL, NULL);
1790 struct audio_device *device = data;
1791 struct headset *hs = device->headset;
1815 struct audio_device *device = data;
1816 struct headset *hs = device->headset;
1841 struct audio_device *device = data;
1842 struct headset *hs = device->headset;
1849 "Device not Connected");
1873 g_dbus_emit_signal(conn, device->path,
1880 g_dbus_emit_signal(conn, device->path,
1919 struct audio_device *device = data;
1939 value = (device->headset->state == HEADSET_STATE_PLAYING);
1943 state = state2str(device->headset->state);
1948 value = (device->headset->state >= HEADSET_STATE_CONNECTED);
1956 DBUS_TYPE_UINT16, &device->headset->sp_gain);
1960 DBUS_TYPE_UINT16, &device->headset->mic_gain);
2059 error("More than one HFP record found on device");
2069 error("More than one HSP record found on device");
2133 debug("Headset unregistered while device was connected!");
2421 struct audio_device *device = user_data;
2423 info("Headset: disconnect %s", device->path);
2425 headset_shutdown(device);
2696 /* Get the latest connected device */