diff options
author | PaulK <contact@paulk.fr> | 2011-12-04 12:45:31 +0100 |
---|---|---|
committer | PaulK <contact@paulk.fr> | 2011-12-04 12:45:31 +0100 |
commit | 76e7653e6de5fd290a54a40f1e2592b216fd78da (patch) | |
tree | f836994734f8278150e3144df797a7d464ad3843 /include | |
parent | f0e385a21e8e02235cbeadbf596b03bfb5a74cec (diff) | |
download | hardware_ril_samsung-ril-76e7653e6de5fd290a54a40f1e2592b216fd78da.zip hardware_ril_samsung-ril-76e7653e6de5fd290a54a40f1e2592b216fd78da.tar.gz hardware_ril_samsung-ril-76e7653e6de5fd290a54a40f1e2592b216fd78da.tar.bz2 |
Added Samsung Ril Socket (SRS) support: this permits working audio calls on nexus s
Diffstat (limited to 'include')
-rw-r--r-- | include/samsung-ril-socket.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/samsung-ril-socket.h b/include/samsung-ril-socket.h new file mode 100644 index 0000000..6686932 --- /dev/null +++ b/include/samsung-ril-socket.h @@ -0,0 +1,37 @@ +/* Samsung RIL Socket protocol defines */ + +#define SRS_COMMAND(f) ((f->group << 8) | f->index) +#define SRS_GROUP(m) (m >> 8) +#define SRS_INDEX(m) (m & 0xff) + +#define SRS_CONTROL 0x01 +#define SRS_CONTROL_GET_HELO 0x0102 +#define SRS_CONTROL_LINK_CLOSE 0x0103 + +#define SRS_SND 0x02 +#define SRS_SND_SET_CALL_VOLUME 0x0201 +#define SRS_SND_SET_CALL_AUDIO_PATH 0x0202 +#define SRS_SND_SET_CALL_CLOCK_SYNC 0x0203 + +#define SRS_CONTROL_HELO 0xCAFFE + +#define SRS_CONTROL_LINK_STATUS_OPEN 0x01 +#define SRS_CONTROL_LINK_STATUS_CLOSE 0x02 + +#define SRS_SOCKET_NAME "samsung-ril-socket" +#define SRS_DATA_MAX_SIZE 0x1000 + +struct srs_header { + unsigned int length; + unsigned char group; + unsigned char index; + unsigned char msg_id; +} __attribute__((__packed__)); + +struct srs_message { + unsigned short command; + unsigned char msg_id; + int data_len; + void *data; +} __attribute__((__packed__)); + |