FM: add JNI Support for SoftMute Command
Change-Id: I786ae5966864035da0e7682e58f6cb05663bc368
diff --git a/helium/radio-helium.h b/helium/radio-helium.h
index 067a40b..7c7221b 100644
--- a/helium/radio-helium.h
+++ b/helium/radio-helium.h
@@ -178,6 +178,7 @@
typedef void (*fm_get_stn_prm_cb) (int val, int status);
typedef void (*fm_get_stn_dbg_prm_cb) (int val, int status);
typedef void (*fm_enable_slimbus_cb) (int status);
+typedef void (*fm_enable_softmute_cb) (int status);
typedef struct {
size_t size;
@@ -214,6 +215,7 @@
fm_get_stn_prm_cb fm_get_station_param_cb;
fm_get_stn_dbg_prm_cb fm_get_station_debug_param_cb;
fm_enable_slimbus_cb enable_slimbus_cb;
+ fm_enable_softmute_cb enable_softmute_cb;
} fm_hal_callbacks_t;
/* Opcode OCF */
@@ -1244,6 +1246,7 @@
int hci_fm_get_station_dbg_param_req();
int hci_fm_get_station_cmd_param_req();
int hci_fm_enable_slimbus(uint8_t enable);
+int hci_fm_enable_softmute(uint8_t enable);
struct fm_hal_t {
struct radio_helium_device *radio;
diff --git a/helium/radio_helium_hal.c b/helium/radio_helium_hal.c
index 48ba0cb..b7951f3 100644
--- a/helium/radio_helium_hal.c
+++ b/helium/radio_helium_hal.c
@@ -448,6 +448,12 @@
hal->jni_cb->enable_slimbus_cb(ev_buff[0]);
}
+static void hci_cc_enable_softmute_rsp(char *ev_buff)
+{
+ ALOGD("%s status %d", __func__, ev_buff[0]);
+ hal->jni_cb->enable_softmute_cb(ev_buff[0]);
+}
+
static inline void hci_cmd_complete_event(char *buff)
{
uint16_t opcode;
@@ -476,6 +482,8 @@
case hci_recv_ctrl_cmd_op_pack(HCI_OCF_FM_SET_RECV_CONF_REQ):
case hci_recv_ctrl_cmd_op_pack(HCI_OCF_FM_SET_MUTE_MODE_REQ):
+ hci_cc_enable_softmute_rsp(pbuf);
+ break;
case hci_recv_ctrl_cmd_op_pack(HCI_OCF_FM_SET_STEREO_MODE_REQ):
case hci_recv_ctrl_cmd_op_pack(HCI_OCF_FM_SET_ANTENNA):
case hci_recv_ctrl_cmd_op_pack(HCI_OCF_FM_SET_SIGNAL_THRESHOLD):