Lines Matching full:device
55 #include "device.h"
64 #include "../src/device.h"
178 int (*callback) (struct audio_device *device, const char *buf);
204 static int rfcomm_connect(struct audio_device *device, headset_stream_cb_t cb,
206 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
343 static int supported_features(struct audio_device *device, const char *buf)
345 struct headset *hs = device->headset;
405 static int report_indicators(struct audio_device *device, const char *buf)
407 struct headset *hs = device->headset;
523 struct audio_device *device = l->data;
524 struct headset *hs = device->headset;
697 static int telephony_generic_rsp(struct audio_device *device, cme_error_t err)
699 struct headset *hs = device->headset;
714 struct audio_device *device = telephony_device;
715 struct headset *hs = device->headset;
733 hfp_slc_complete(device);
806 static int key_press(struct audio_device *device, const char *buf)
811 g_dbus_emit_signal(device->conn, device->path,
820 telephony_key_press_req(device, &buf[8]);
830 static int answer_call(struct audio_device *device, const char *buf)
842 telephony_answer_call_req(device);
850 struct audio_device *device = telephony_device;
851 struct headset *hs = device->headset;
856 g_dbus_emit_signal(device->conn, device->path,
863 static int terminate_call(struct audio_device *device, const char *buf)
875 telephony_terminate_call_req(device);
880 static int cli_notification(struct audio_device *device, const char *buf)
882 struct headset *hs = device->headset;
898 static int response_and_hold(struct audio_device *device, const char *buf)
900 struct headset *hs = device->headset;
906 telephony_response_and_hold_req(device, atoi(&buf[8]) < 0);
921 static int last_dialed_number(struct audio_device *device, const char *buf)
923 telephony_last_dialed_number_req(device);
933 static int dial_number(struct audio_device *device, const char *buf)
948 telephony_dial_number_req(device, number);
953 static int headset_set_gain(struct audio_device *device, uint16_t gain, char type)
955 struct headset *hs = device->headset;
988 g_dbus_emit_signal(device->conn, device->path,
993 emit_property_changed(device->conn, device->path,
1000 static int signal_gain_setting(struct audio_device *device, const char *buf)
1002 struct headset *hs = device->headset;
1013 err = headset_set_gain(device, gain, buf[5]);
1025 static int dtmf_tone(struct audio_device *device, const char *buf)
1032 telephony_transmit_dtmf_req(device, buf[7]);
1042 static int subscriber_number(struct audio_device *device, const char *buf)
1044 telephony_subscriber_number_req(device);
1054 static int list_current_calls(struct audio_device *device, const char *buf)
1056 telephony_list_current_calls_req(device);
1061 static int extended_errors(struct audio_device *device, const char *buf)
1063 struct headset *hs = device->headset;
1080 static int call_waiting_notify(struct audio_device *device, const char *buf)
1082 struct headset *hs = device->headset;
1111 struct audio_device *device = telephony_device;
1112 struct headset *hs = device->headset;
1137 static int operator_selection(struct audio_device *device, const char *buf)
1139 struct headset *hs = device->headset;
1146 telephony_operator_selection_req(device);
1157 static int nr_and_ec(struct audio_device *device, const char *buf)
1159 struct headset *hs = device->headset;
1170 telephony_nr_and_ec_req(device, slc->nrec_req);
1175 static int voice_dial(struct audio_device *device, const char *buf)
1187 telephony_voice_dial_req(device, enable);
1216 static int handle_event(struct audio_device *device, const char *buf)
1224 return ev->callback(device, buf);
1230 static void close_sco(struct audio_device *device)
1232 struct headset *hs = device->headset;
1249 struct audio_device *device)
1260 hs = device->headset;
1302 err = handle_event(device, &slc->buf[slc->data_start]);
1326 headset_set_state(device, HEADSET_STATE_DISCONNECTED);
1332 struct audio_device *device)
1339 headset_set_state(device, HEADSET_STATE_CONNECTED);
1529 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
1532 struct headset *hs = device->headset;
1545 err = bt_search_service(&device->src, &device->dst, &uuid,
1546 get_record_cb, device, NULL);
1555 headset_set_state(device, HEADSET_STATE_CONNECTING);
1624 struct audio_device *device = data;
1625 struct headset *hs = device->headset;
1631 "Device not Connected");
1637 headset_set_state(device, HEADSET_STATE_CONNECTED);
1645 struct audio_device *device = data;
1646 struct headset *hs = device->headset;
1665 struct audio_device *device = data;
1666 struct headset *hs = device->headset;
1672 "Device not Connected");
1674 headset_shutdown(device);
1675 ba2str(&device->dst, hs_address);
1676 info("Disconnected from %s, %s", hs_address, device->path);
1686 struct audio_device *device = data;
1694 connected = (device->headset->state >= HEADSET_STATE_CONNECTED);
1705 struct audio_device *device = data;
1706 struct headset *hs = device->headset;
1721 device->auto_connect = FALSE;
1723 err = rfcomm_connect(device, NULL, NULL, NULL);
1742 struct audio_device *device = data;
1743 struct headset *hs = device->headset;
1750 "Device not Connected");
1780 struct audio_device *device = data;
1781 struct headset *hs = device->headset;
1787 "Device not Connected");
1805 struct audio_device *device = data;
1806 struct headset *hs = device->headset;
1821 "Device not Connected");
1833 "Device Already Connected");
1839 err = sco_connect(device, NULL, NULL, NULL);
1853 struct audio_device *device = data;
1854 struct headset *hs = device->headset;
1879 struct audio_device *device = data;
1880 struct headset *hs = device->headset;
1906 struct audio_device *device = data;
1907 struct headset *hs = device->headset;
1914 "Device not Connected");
1916 err = headset_set_gain(device, gain, type);
1967 struct audio_device *device = data;
1987 value = (device->headset->state == HEADSET_STATE_PLAYING);
1991 state = state2str(device->headset->state);
1996 value = (device->headset->state >= HEADSET_STATE_CONNECTED);
2005 &device->headset->slc->sp_gain);
2010 &device->headset->slc->mic_gain);
2109 error("More than one HFP record found on device");
2119 error("More than one HSP record found on device");
2181 DBG("Headset unregistered while device was connected!");
2469 struct audio_device *device = user_data;
2471 info("Headset: disconnect %s", device->path);
2473 headset_shutdown(device);
2749 /* Get the latest connected device */