Home | History | Annotate | Download | only in audio

Lines Matching full:device

51 #include "device.h"
60 #include "../src/device.h"
181 int (*callback) (struct audio_device *device, const char *buf);
194 static int rfcomm_connect(struct audio_device *device, headset_stream_cb_t cb,
196 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
334 static int supported_features(struct audio_device *device, const char *buf)
336 struct headset *hs = device->headset;
396 static int report_indicators(struct audio_device *device, const char *buf)
398 struct headset *hs = device->headset;
515 struct audio_device *device = l->data;
516 struct headset *hs = device->headset;
687 static int telephony_generic_rsp(struct audio_device *device, cme_error_t err)
689 struct headset *hs = device->headset;
707 struct audio_device *device = telephony_device;
708 struct headset *hs = device->headset;
726 hfp_slc_complete(device);
799 static int key_press(struct audio_device *device, const char *buf)
804 g_dbus_emit_signal(device->conn, device->path,
813 telephony_key_press_req(device, &buf[8]);
823 static int answer_call(struct audio_device *device, const char *buf)
835 telephony_answer_call_req(device);
843 struct audio_device *device = telephony_device;
844 struct headset *hs = device->headset;
849 g_dbus_emit_signal(device->conn, device->path,
856 static int terminate_call(struct audio_device *device, const char *buf)
868 telephony_terminate_call_req(device);
873 static int cli_notification(struct audio_device *device, const char *buf)
875 struct headset *hs = device->headset;
891 static int response_and_hold(struct audio_device *device, const char *buf)
893 struct headset *hs = device->headset;
899 return telephony_generic_rsp(device, CME_ERROR_NOT_SUPPORTED);
902 telephony_response_and_hold_req(device, atoi(&buf[8]) < 0);
917 static int last_dialed_number(struct audio_device *device, const char *buf)
919 telephony_last_dialed_number_req(device);
929 static int dial_number(struct audio_device *device, const char *buf)
944 telephony_dial_number_req(device, number);
949 static int headset_set_gain(struct audio_device *device, uint16_t gain, char type)
951 struct headset *hs = device->headset;
984 g_dbus_emit_signal(device->conn, device->path,
989 emit_property_changed(device->conn, device->path,
996 static int signal_gain_setting(struct audio_device *device, const char *buf)
998 struct headset *hs = device->headset;
1009 err = headset_set_gain(device, gain, buf[5]);
1021 static int dtmf_tone(struct audio_device *device, const char *buf)
1032 telephony_transmit_dtmf_req(device, tone);
1044 static int subscriber_number(struct audio_device *device, const char *buf)
1046 telephony_subscriber_number_req(device);
1056 static int list_current_calls(struct audio_device *device, const char *buf)
1058 telephony_list_current_calls_req(device);
1063 static int extended_errors(struct audio_device *device, const char *buf)
1065 struct headset *hs = device->headset;
1082 static int call_waiting_notify(struct audio_device *device, const char *buf)
1084 struct headset *hs = device->headset;
1113 struct audio_device *device = telephony_device;
1114 struct headset *hs = device->headset;
1123 nrec_cb->cb(device, slc->nrec_req, nrec_cb->user_data);
1148 static int operator_selection(struct audio_device *device, const char *buf)
1150 struct headset *hs = device->headset;
1157 telephony_operator_selection_req(device);
1168 static int nr_and_ec(struct audio_device *device, const char *buf)
1170 struct headset *hs = device->headset;
1181 telephony_nr_and_ec_req(device, slc->nrec_req);
1186 static int voice_dial(struct audio_device *device, const char *buf)
1198 telephony_voice_dial_req(device, enable);
1203 static int apple_command(struct audio_device *device, const char *buf)
1207 return telephony_generic_rsp(device, CME_ERROR_NONE);
1236 static int handle_event(struct audio_device *device, const char *buf)
1244 return ev->callback(device, buf);
1250 static void close_sco(struct audio_device *device)
1252 struct headset *hs = device->headset;
1269 struct audio_device *device)
1281 hs = device->headset;
1325 err = handle_event(device, &slc->buf[slc->data_start]);
1351 headset_set_state(device, HEADSET_STATE_DISCONNECTED);
1357 struct audio_device *device)
1364 pending_connect_finalize(device);
1365 headset_set_state(device, HEADSET_STATE_CONNECTED);
1560 static int get_records(struct audio_device *device, headset_stream_cb_t cb,
1563 struct headset *hs = device->headset;
1576 err = bt_search_service(&device->src, &device->dst, &uuid,
1577 get_record_cb, device, NULL);
1586 headset_set_state(device, HEADSET_STATE_CONNECTING);
1655 struct audio_device *device = data;
1656 struct headset *hs = device->headset;
1666 headset_set_state(device, HEADSET_STATE_CONNECTED);
1674 struct audio_device *device = data;
1675 struct headset *hs = device->headset;
1694 struct audio_device *device = data;
1695 struct headset *hs = device->headset;
1701 headset_shutdown(device);
1702 ba2str(&device->dst, hs_address);
1703 info("Disconnected from %s, %s", hs_address, device->path);
1713 struct audio_device *device = data;
1721 connected = (device->headset->state >= HEADSET_STATE_CONNECTED);
1732 struct audio_device *device = data;
1733 struct headset *hs = device->headset;
1744 device->auto_connect = FALSE;
1746 err = rfcomm_connect(device, NULL, NULL, NULL);
1760 struct audio_device *device = data;
1761 struct headset *hs = device->headset;
1795 struct audio_device *device = data;
1796 struct headset *hs = device->headset;
1818 struct audio_device *device = data;
1819 struct headset *hs = device->headset;
1845 err = sco_connect(device, NULL, NULL, NULL);
1858 struct audio_device *device = data;
1859 struct headset *hs = device->headset;
1883 struct audio_device *device = data;
1884 struct headset *hs = device->headset;
1909 struct audio_device *device = data;
1910 struct headset *hs = device->headset;
1917 err = headset_set_gain(device, gain, type);
1965 struct audio_device *device = data;
1985 value = (device->headset->state == HEADSET_STATE_PLAYING);
1989 state = state2str(device->headset->state);
1994 value = (device->headset->state >= HEADSET_STATE_CONNECTED);
2003 &device->headset->slc->sp_gain);
2008 &device->headset->slc->mic_gain);
2107 error("More than one HFP record found on device");
2117 error("More than one HSP record found on device");
2179 DBG("Headset unregistered while device was connected!");
2804 /* Get the latest connected device */