summaryrefslogtreecommitdiffstats
path: root/src/hci.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2002-12-15 13:18:53 +0000
committerMarcel Holtmann <marcel@holtmann.org>2002-12-15 13:18:53 +0000
commitd6cbeb4c61f5dc0c0d04dd022139b44f81964b18 (patch)
tree23eacda469f1a02fc6bbe1426431432a4504c2f5 /src/hci.c
parenta0a3d96eed5f186278ea931953d4bcb6cd99cc7a (diff)
Support for voice setting
Diffstat (limited to 'src/hci.c')
-rw-r--r--src/hci.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/hci.c b/src/hci.c
index 42de36e5..b8bbc0c2 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -970,6 +970,43 @@ int hci_write_class_of_dev(int dd, uint32_t cls, int to)
return hci_send_req(dd, &rq, 1000);
}
+int hci_read_voice_setting(int dd, uint16_t *vs, int to)
+{
+ read_voice_setting_rp rp;
+ struct hci_request rq;
+
+ memset(&rq, 0, sizeof(rq));
+ rq.ogf = OGF_HOST_CTL;
+ rq.ocf = OCF_READ_VOICE_SETTING;
+ rq.rparam = &rp;
+ rq.rlen = READ_VOICE_SETTING_RP_SIZE;
+
+ if (hci_send_req(dd, &rq, to) < 0)
+ return -1;
+
+ if (rp.status) {
+ errno = EIO;
+ return -1;
+ }
+
+ *vs = rp.voice_setting;
+ return 0;
+}
+
+int hci_write_voice_setting(int dd, uint16_t vs, int to)
+{
+ write_voice_setting_cp cp;
+ struct hci_request rq;
+
+ memset(&rq, 0, sizeof(rq));
+ cp.voice_setting = vs;
+ rq.ogf = OGF_HOST_CTL;
+ rq.ocf = OCF_WRITE_VOICE_SETTING;
+ rq.cparam = &cp;
+ rq.clen = WRITE_VOICE_SETTING_CP_SIZE;
+ return hci_send_req(dd, &rq, 1000);
+}
+
int hci_read_current_iac_lap(int dd, uint8_t *num_iac, uint8_t *lap, int to)
{
read_current_iac_lap_rp rp;