Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 1 | /* |
| 2 | Copyright (c) 2015, The Linux Foundation. All rights reserved. |
| 3 | |
| 4 | Redistribution and use in source and binary forms, with or without |
| 5 | modification, are permitted provided that the following conditions are |
| 6 | met: |
| 7 | * Redistributions of source code must retain the above copyright |
| 8 | notice, this list of conditions and the following disclaimer. |
| 9 | * Redistributions in binary form must reproduce the above |
| 10 | copyright notice, this list of conditions and the following |
| 11 | disclaimer in the documentation and/or other materials provided |
| 12 | with the distribution. |
| 13 | * Neither the name of The Linux Foundation nor the names of its |
| 14 | contributors may be used to endorse or promote products derived |
| 15 | from this software without specific prior written permission. |
| 16 | |
| 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | |
| 30 | #ifndef __UAPI_RADIO_HCI_CORE_H |
| 31 | #define __UAPI_RADIO_HCI_CORE_H |
| 32 | |
| 33 | #pragma pack(1) |
| 34 | |
| 35 | #include <stdbool.h> |
| 36 | |
| 37 | pthread_mutex_t fm_hal; |
| 38 | #define MIN_TX_TONE_VAL 0x00 |
| 39 | #define MAX_TX_TONE_VAL 0x07 |
| 40 | #define MIN_HARD_MUTE_VAL 0x00 |
| 41 | #define MAX_HARD_MUTE_VAL 0x03 |
| 42 | #define MIN_SRCH_MODE 0x00 |
| 43 | #define MAX_SRCH_MODE 0x09 |
| 44 | #define MIN_SCAN_DWELL 0x00 |
| 45 | #define MAX_SCAN_DWELL 0x0F |
| 46 | #define MIN_SIG_TH 0x00 |
| 47 | #define MAX_SIG_TH 0x03 |
| 48 | #define MIN_PTY 0X00 |
| 49 | #define MAX_PTY 0x1F |
| 50 | #define MIN_PI 0x0000 |
| 51 | #define MAX_PI 0xFFFF |
| 52 | #define MIN_SRCH_STATIONS_CNT 0x00 |
| 53 | #define MAX_SRCH_STATIONS_CNT 0x14 |
| 54 | #define MIN_CHAN_SPACING 0x00 |
| 55 | #define MAX_CHAN_SPACING 0x02 |
| 56 | #define MIN_EMPHASIS 0x00 |
| 57 | #define MAX_EMPHASIS 0x01 |
| 58 | #define MIN_RDS_STD 0x00 |
| 59 | #define MAX_RDS_STD 0x02 |
| 60 | #define MIN_ANTENNA_VAL 0x00 |
| 61 | #define MAX_ANTENNA_VAL 0x01 |
| 62 | #define MIN_TX_PS_REPEAT_CNT 0x01 |
| 63 | #define MAX_TX_PS_REPEAT_CNT 0x0F |
| 64 | #define MIN_SOFT_MUTE 0x00 |
| 65 | #define MAX_SOFT_MUTE 0x01 |
| 66 | #define MIN_PEEK_ACCESS_LEN 0x01 |
| 67 | #define MAX_PEEK_ACCESS_LEN 0xF9 |
| 68 | #define MIN_RESET_CNTR 0x00 |
| 69 | #define MAX_RESET_CNTR 0x01 |
| 70 | #define MIN_HLSI 0x00 |
| 71 | #define MAX_HLSI 0x02 |
| 72 | #define MIN_NOTCH_FILTER 0x00 |
| 73 | #define MAX_NOTCH_FILTER 0x02 |
| 74 | #define MIN_INTF_DET_OUT_LW_TH 0x00 |
| 75 | #define MAX_INTF_DET_OUT_LW_TH 0xFF |
| 76 | #define MIN_INTF_DET_OUT_HG_TH 0x00 |
| 77 | #define MAX_INTF_DET_OUT_HG_TH 0xFF |
| 78 | #define MIN_SINR_TH -128 |
| 79 | #define MAX_SINR_TH 127 |
| 80 | #define MIN_SINR_SAMPLES 0x01 |
| 81 | #define MAX_SINR_SAMPLES 0xFF |
| 82 | #define MIN_BLEND_HI -128 |
| 83 | #define MAX_BLEND_HI 127 |
| 84 | |
| 85 | |
| 86 | /* ---- HCI Packet structures ---- */ |
| 87 | #define RADIO_HCI_COMMAND_HDR_SIZE sizeof(struct radio_hci_command_hdr) |
| 88 | #define RADIO_HCI_EVENT_HDR_SIZE sizeof(struct radio_hci_event_hdr) |
| 89 | |
| 90 | /* HCI data types */ |
| 91 | #define RADIO_HCI_COMMAND_PKT 0x11 |
| 92 | #define RADIO_HCI_EVENT_PKT 0x14 |
| 93 | /*HCI reponce packets*/ |
| 94 | #define MAX_RIVA_PEEK_RSP_SIZE 251 |
| 95 | /* default data access */ |
| 96 | #define DEFAULT_DATA_OFFSET 2 |
| 97 | #define DEFAULT_DATA_SIZE 249 |
| 98 | /* Power levels are 0-7, but SOC will expect values from 0-255 |
| 99 | * So the each level step size will be 255/7 = 36 */ |
| 100 | #define FM_TX_PWR_LVL_STEP_SIZE 36 |
| 101 | #define FM_TX_PWR_LVL_0 0 /* Lowest power lvl that can be set for Tx */ |
| 102 | #define FM_TX_PWR_LVL_MAX 7 /* Max power lvl for Tx */ |
| 103 | #define FM_TX_PHY_CFG_MODE 0x3c |
| 104 | #define FM_TX_PHY_CFG_LEN 0x10 |
| 105 | #define FM_TX_PWR_GAIN_OFFSET 14 |
| 106 | /**RDS CONFIG MODE**/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 107 | #define FM_RDS_CNFG_MODE 0x0f |
| 108 | #define FM_RDS_CNFG_LEN 0x10 |
| 109 | #define AF_RMSSI_TH_OFFSET 1 |
| 110 | #define AF_RMSSI_SAMPLES_OFFSET 2 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 111 | /**RX CONFIG MODE**/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 112 | #define FM_RX_CONFG_MODE 0x15 |
| 113 | #define FM_RX_CNFG_LEN 0x15 |
| 114 | #define GD_CH_RMSSI_TH_OFFSET 0x03 |
| 115 | #define MAX_GD_CH_RMSSI_TH 0x7F |
| 116 | #define SRCH_ALGO_TYPE_OFFSET 0x00 |
| 117 | #define SINRFIRSTSTAGE_OFFSET 0x01 |
| 118 | #define RMSSIFIRSTSTAGE_OFFSET 0x02 |
| 119 | #define CF0TH12_BYTE1_OFFSET 0x03 |
| 120 | #define CF0TH12_BYTE2_OFFSET 0x04 |
| 121 | #define MAX_SINR_FIRSTSTAGE 0x7F |
| 122 | #define MAX_RMSSI_FIRSTSTAGE 0x7F |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 123 | #define RDS_PS0_XFR_MODE 0x01 |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 124 | #define RDS_PS0_LEN 0x06 |
| 125 | #define RX_REPEATE_BYTE_OFFSET 0x05 |
| 126 | #define FM_SPUR_TBL_SIZE 0xF0 |
| 127 | #define SPUR_DATA_LEN 0x10 |
| 128 | #define ENTRIES_EACH_CMD 0x0F |
| 129 | #define SPUR_DATA_INDEX 0x02 |
| 130 | #define FM_AF_LIST_MAX_SIZE 0xC8 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 131 | #define AF_LIST_MAX (FM_AF_LIST_MAX_SIZE / 4) /* Each AF frequency consist |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 132 | of sizeof(int) bytes */ |
| 133 | #define MAX_BLEND_INDEX 0x31 |
| 134 | |
| 135 | #define FM_SRCH_CONFG_MODE 0x41 |
| 136 | #define FM_AFJUMP_CONFG_MODE 0x42 |
| 137 | #define FM_SRCH_CNFG_LEN 0x08 |
| 138 | #define FM_AFJUMP_CNFG_LEN 0x06 |
| 139 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 140 | /* HCI timeouts */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 141 | #define RADIO_HCI_TIMEOUT (10000) /* 10 seconds */ |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 142 | |
Satish kumar sugasi | bf9558e | 2016-05-10 14:30:17 -0700 | [diff] [blame^] | 143 | #define ECC_EVENT_BUFSIZE 12 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 144 | typedef enum { |
| 145 | ASSOCIATE_JVM, |
| 146 | DISASSOCIATE_JVM |
| 147 | } bt_cb_thread_evt; |
| 148 | |
| 149 | #define TUNE_PARAM 16 |
| 150 | #define SIZE_ARRAY(x) (sizeof(x) / sizeof((x)[0])) |
| 151 | typedef void (*enb_result_cb)(); |
| 152 | typedef void (*tune_rsp_cb)(int Freq); |
| 153 | typedef void (*seek_rsp_cb)(int Freq); |
| 154 | typedef void (*scan_rsp_cb)(); |
| 155 | typedef void (*srch_list_rsp_cb)(uint16_t *scan_tbl); |
| 156 | typedef void (*stereo_mode_cb)(bool status); |
| 157 | typedef void (*rds_avl_sts_cb)(bool status); |
| 158 | typedef void (*af_list_cb)(uint16_t *af_list); |
| 159 | typedef void (*rt_cb)(char *rt); |
| 160 | typedef void (*ps_cb)(char *ps); |
| 161 | typedef void (*oda_cb)(); |
| 162 | typedef void (*rt_plus_cb)(char *rt_plus); |
| 163 | typedef void (*ert_cb)(char *ert); |
| 164 | typedef void (*disable_cb)(); |
| 165 | typedef void (*callback_thread_event)(unsigned int evt); |
Satish kumar sugasi | 84e51de | 2015-09-30 18:27:43 -0700 | [diff] [blame] | 166 | typedef void (*rds_grp_cntrs_cb)(char *rds_params); |
Satish kumar sugasi | 88832b9 | 2015-12-21 18:52:29 -0800 | [diff] [blame] | 167 | typedef void (*fm_peek_cb)(char *peek_rsp); |
| 168 | typedef void (*fm_ssbi_peek_cb)(char *ssbi_peek_rsp); |
| 169 | typedef void (*fm_ch_det_th_cb)(char *ch_det_rsp); |
Satish kumar sugasi | d8731b7 | 2016-01-27 14:45:45 -0800 | [diff] [blame] | 170 | typedef void (*fm_ecc_evt_cb)(char *ecc_rsp); |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 171 | typedef void (*fm_sig_thr_cb) (int val, int status); |
| 172 | typedef void (*fm_get_ch_det_thrs_cb) (int val, int status); |
| 173 | typedef void (*fm_def_data_rd_cb) (int val, int status); |
| 174 | typedef void (*fm_get_blnd_cb) (int val, int status); |
| 175 | typedef void (*fm_set_ch_det_thrs_cb) (int status); |
| 176 | typedef void (*fm_def_data_wrt_cb) (int status); |
| 177 | typedef void (*fm_set_blnd_cb) (int status); |
| 178 | typedef void (*fm_get_stn_prm_cb) (int val, int status); |
| 179 | typedef void (*fm_get_stn_dbg_prm_cb) (int val, int status); |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 180 | |
| 181 | typedef struct { |
| 182 | size_t size; |
| 183 | |
| 184 | enb_result_cb enabled_cb; |
| 185 | tune_rsp_cb tune_cb; |
| 186 | seek_rsp_cb seek_cmpl_cb; |
| 187 | scan_rsp_cb scan_next_cb; |
| 188 | srch_list_rsp_cb srch_list_cb; |
| 189 | stereo_mode_cb stereo_status_cb; |
| 190 | rds_avl_sts_cb rds_avail_status_cb; |
| 191 | af_list_cb af_list_update_cb; |
| 192 | rt_cb rt_update_cb; |
| 193 | ps_cb ps_update_cb; |
| 194 | oda_cb oda_update_cb; |
| 195 | rt_plus_cb rt_plus_update_cb; |
| 196 | ert_cb ert_update_cb; |
| 197 | disable_cb disabled_cb; |
Satish kumar sugasi | 84e51de | 2015-09-30 18:27:43 -0700 | [diff] [blame] | 198 | rds_grp_cntrs_cb rds_grp_cntrs_rsp_cb; |
Satish kumar sugasi | 88832b9 | 2015-12-21 18:52:29 -0800 | [diff] [blame] | 199 | fm_peek_cb fm_peek_rsp_cb; |
| 200 | fm_ssbi_peek_cb fm_ssbi_peek_rsp_cb; |
| 201 | fm_ch_det_th_cb fm_ch_det_th_rsp_cb; |
Satish kumar sugasi | d8731b7 | 2016-01-27 14:45:45 -0800 | [diff] [blame] | 202 | fm_ecc_evt_cb ext_country_code_cb; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 203 | callback_thread_event thread_evt_cb; |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 204 | fm_sig_thr_cb fm_get_sig_thres_cb; |
| 205 | fm_get_ch_det_thrs_cb fm_get_ch_det_thr_cb; |
| 206 | fm_def_data_rd_cb fm_def_data_read_cb; |
| 207 | fm_get_blnd_cb fm_get_blend_cb; |
| 208 | fm_set_ch_det_thrs_cb fm_set_ch_det_thr_cb; |
| 209 | fm_def_data_wrt_cb fm_def_data_write_cb; |
| 210 | fm_set_blnd_cb fm_set_blend_cb; |
| 211 | fm_get_stn_prm_cb fm_get_station_param_cb; |
| 212 | fm_get_stn_dbg_prm_cb fm_get_station_debug_param_cb; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 213 | } fm_vendor_callbacks_t; |
| 214 | |
| 215 | pthread_mutex_t radio_fm_cmd; |
| 216 | typedef struct { |
| 217 | int (*init)(const fm_vendor_callbacks_t *p_cb); |
| 218 | int (*set_fm_ctrl)(int opcode, int val); |
| 219 | void (*Get_fm_ctrl) (int opcode, int val); |
| 220 | } fm_interface_t; |
| 221 | |
| 222 | typedef int (*fm_evt_notify_cb)(unsigned char *p_buf); |
| 223 | |
| 224 | typedef struct { |
| 225 | fm_evt_notify_cb fm_evt_notify; |
| 226 | } fm_hal_cb; |
| 227 | |
| 228 | struct radio_hci_command_hdr { |
| 229 | short opcode; /* OCF & OGF */ |
| 230 | char plen; |
| 231 | } ; |
| 232 | |
| 233 | struct radio_hci_event_hdr { |
| 234 | char evt; |
| 235 | char plen; |
| 236 | } ; |
| 237 | |
| 238 | struct radio_hci_dev { |
| 239 | char name[8]; |
| 240 | unsigned long flags; |
| 241 | short id; |
| 242 | char bus; |
| 243 | char dev_type; |
| 244 | char dev_name[248]; |
| 245 | char dev_class[3]; |
| 246 | char features[8]; |
| 247 | char commands[64]; |
| 248 | unsigned int data_block_len; |
| 249 | unsigned long cmd_last_tx; |
| 250 | int req_status; |
| 251 | int req_result; |
| 252 | }; |
| 253 | |
| 254 | /* Opcode OCF */ |
| 255 | /* HCI recv control commands opcode */ |
| 256 | #define HCI_OCF_FM_ENABLE_RECV_REQ 0x0001 |
| 257 | #define HCI_OCF_FM_DISABLE_RECV_REQ 0x0002 |
| 258 | #define HCI_OCF_FM_GET_RECV_CONF_REQ 0x0003 |
| 259 | #define HCI_OCF_FM_SET_RECV_CONF_REQ 0x0004 |
| 260 | #define HCI_OCF_FM_SET_MUTE_MODE_REQ 0x0005 |
| 261 | #define HCI_OCF_FM_SET_STEREO_MODE_REQ 0x0006 |
| 262 | #define HCI_OCF_FM_SET_ANTENNA 0x0007 |
| 263 | #define HCI_OCF_FM_SET_SIGNAL_THRESHOLD 0x0008 |
| 264 | #define HCI_OCF_FM_GET_SIGNAL_THRESHOLD 0x0009 |
| 265 | #define HCI_OCF_FM_GET_STATION_PARAM_REQ 0x000A |
| 266 | #define HCI_OCF_FM_GET_PROGRAM_SERVICE_REQ 0x000B |
| 267 | #define HCI_OCF_FM_GET_RADIO_TEXT_REQ 0x000C |
| 268 | #define HCI_OCF_FM_GET_AF_LIST_REQ 0x000D |
| 269 | #define HCI_OCF_FM_SEARCH_STATIONS 0x000E |
| 270 | #define HCI_OCF_FM_SEARCH_RDS_STATIONS 0x000F |
| 271 | #define HCI_OCF_FM_SEARCH_STATIONS_LIST 0x0010 |
| 272 | #define HCI_OCF_FM_CANCEL_SEARCH 0x0011 |
| 273 | #define HCI_OCF_FM_RDS_GRP 0x0012 |
| 274 | #define HCI_OCF_FM_RDS_GRP_PROCESS 0x0013 |
| 275 | #define HCI_OCF_FM_EN_WAN_AVD_CTRL 0x0014 |
| 276 | #define HCI_OCF_FM_EN_NOTCH_CTRL 0x0015 |
| 277 | #define HCI_OCF_FM_SET_EVENT_MASK 0x0016 |
| 278 | #define HCI_OCF_FM_SET_CH_DET_THRESHOLD 0x0017 |
| 279 | #define HCI_OCF_FM_GET_CH_DET_THRESHOLD 0x0018 |
| 280 | #define HCI_OCF_FM_SET_BLND_TBL 0x001B |
| 281 | #define HCI_OCF_FM_GET_BLND_TBL 0x001C |
| 282 | /* HCI trans control commans opcode*/ |
| 283 | #define HCI_OCF_FM_ENABLE_TRANS_REQ 0x0001 |
| 284 | #define HCI_OCF_FM_DISABLE_TRANS_REQ 0x0002 |
| 285 | #define HCI_OCF_FM_GET_TRANS_CONF_REQ 0x0003 |
| 286 | #define HCI_OCF_FM_SET_TRANS_CONF_REQ 0x0004 |
| 287 | #define HCI_OCF_FM_RDS_RT_REQ 0x0008 |
| 288 | #define HCI_OCF_FM_RDS_PS_REQ 0x0009 |
| 289 | |
| 290 | |
| 291 | /* HCI common control commands opcode */ |
| 292 | #define HCI_OCF_FM_TUNE_STATION_REQ 0x0001 |
| 293 | #define HCI_OCF_FM_DEFAULT_DATA_READ 0x0002 |
| 294 | #define HCI_OCF_FM_DEFAULT_DATA_WRITE 0x0003 |
| 295 | #define HCI_OCF_FM_RESET 0x0004 |
| 296 | #define HCI_OCF_FM_GET_FEATURE_LIST 0x0005 |
| 297 | #define HCI_OCF_FM_DO_CALIBRATION 0x0006 |
| 298 | #define HCI_OCF_FM_SET_CALIBRATION 0x0007 |
| 299 | #define HCI_OCF_FM_SET_SPUR_TABLE 0x0008 |
| 300 | #define HCI_OCF_FM_GET_SPUR_TABLE 0x0009 |
| 301 | |
| 302 | /*HCI Status parameters commands*/ |
| 303 | #define HCI_OCF_FM_READ_GRP_COUNTERS 0x0001 |
| 304 | |
| 305 | /*HCI Diagnostic commands*/ |
| 306 | #define HCI_OCF_FM_PEEK_DATA 0x0002 |
| 307 | #define HCI_OCF_FM_POKE_DATA 0x0003 |
| 308 | #define HCI_OCF_FM_SSBI_PEEK_REG 0x0004 |
| 309 | #define HCI_OCF_FM_SSBI_POKE_REG 0x0005 |
| 310 | #define HCI_OCF_FM_STATION_DBG_PARAM 0x0007 |
| 311 | #define HCI_FM_SET_INTERNAL_TONE_GENRATOR 0x0008 |
| 312 | |
| 313 | /* Opcode OGF */ |
| 314 | #define HCI_OGF_FM_RECV_CTRL_CMD_REQ 0x0013 |
| 315 | #define HCI_OGF_FM_TRANS_CTRL_CMD_REQ 0x0014 |
| 316 | #define HCI_OGF_FM_COMMON_CTRL_CMD_REQ 0x0015 |
| 317 | #define HCI_OGF_FM_STATUS_PARAMETERS_CMD_REQ 0x0016 |
| 318 | #define HCI_OGF_FM_TEST_CMD_REQ 0x0017 |
| 319 | #define HCI_OGF_FM_DIAGNOSTIC_CMD_REQ 0x003F |
| 320 | |
| 321 | /* Command opcode pack/unpack */ |
| 322 | #define hci_opcode_pack(ogf, ocf) (short) ((ocf & 0x03ff)|(ogf << 10)) |
| 323 | #define hci_opcode_ogf(op) (op >> 10) |
| 324 | #define hci_opcode_ocf(op) (op & 0x03ff) |
| 325 | #define hci_recv_ctrl_cmd_op_pack(ocf) \ |
| 326 | (short) hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ, ocf) |
| 327 | #define hci_trans_ctrl_cmd_op_pack(ocf) \ |
| 328 | (short) hci_opcode_pack(HCI_OGF_FM_TRANS_CTRL_CMD_REQ, ocf) |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 329 | #define hci_common_cmd_op_pack(ocf) \ |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 330 | (short) hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ, ocf) |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 331 | #define hci_status_param_op_pack(ocf) \ |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 332 | (short) hci_opcode_pack(HCI_OGF_FM_STATUS_PARAMETERS_CMD_REQ, ocf) |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 333 | #define hci_diagnostic_cmd_op_pack(ocf) \ |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 334 | (short) hci_opcode_pack(HCI_OGF_FM_DIAGNOSTIC_CMD_REQ, ocf) |
| 335 | |
| 336 | |
| 337 | /* HCI commands with no arguments*/ |
| 338 | #define HCI_FM_ENABLE_RECV_CMD 1 |
| 339 | #define HCI_FM_DISABLE_RECV_CMD 2 |
| 340 | #define HCI_FM_GET_RECV_CONF_CMD 3 |
| 341 | #define HCI_FM_GET_STATION_PARAM_CMD 4 |
| 342 | #define HCI_FM_GET_SIGNAL_TH_CMD 5 |
| 343 | #define HCI_FM_GET_PROGRAM_SERVICE_CMD 6 |
| 344 | #define HCI_FM_GET_RADIO_TEXT_CMD 7 |
| 345 | #define HCI_FM_GET_AF_LIST_CMD 8 |
| 346 | #define HCI_FM_CANCEL_SEARCH_CMD 9 |
| 347 | #define HCI_FM_RESET_CMD 10 |
| 348 | #define HCI_FM_GET_FEATURES_CMD 11 |
| 349 | #define HCI_FM_STATION_DBG_PARAM_CMD 12 |
| 350 | #define HCI_FM_ENABLE_TRANS_CMD 13 |
| 351 | #define HCI_FM_DISABLE_TRANS_CMD 14 |
| 352 | #define HCI_FM_GET_TX_CONFIG 15 |
| 353 | #define HCI_FM_GET_DET_CH_TH_CMD 16 |
| 354 | #define HCI_FM_GET_BLND_TBL_CMD 17 |
| 355 | |
| 356 | /* Defines for FM TX*/ |
| 357 | #define TX_PS_DATA_LENGTH 108 |
| 358 | #define TX_RT_DATA_LENGTH 64 |
| 359 | #define PS_STRING_LEN 9 |
| 360 | |
| 361 | /* ----- HCI Command request ----- */ |
| 362 | struct hci_fm_recv_conf_req { |
| 363 | char emphasis; |
| 364 | char ch_spacing; |
| 365 | char rds_std; |
| 366 | char hlsi; |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 367 | int band_low_limit; |
| 368 | int band_high_limit; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 369 | } ; |
| 370 | |
| 371 | /* ----- HCI Command request ----- */ |
| 372 | struct hci_fm_trans_conf_req_struct { |
| 373 | char emphasis; |
| 374 | char rds_std; |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 375 | int band_low_limit; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 376 | int band_high_limit; |
| 377 | } ; |
| 378 | |
| 379 | |
| 380 | /* ----- HCI Command request ----- */ |
| 381 | struct hci_fm_tx_ps { |
| 382 | char ps_control; |
| 383 | short pi; |
| 384 | char pty; |
| 385 | char ps_repeatcount; |
| 386 | char ps_num; |
| 387 | char ps_data[TX_PS_DATA_LENGTH]; |
| 388 | } ; |
| 389 | |
| 390 | struct hci_fm_tx_rt { |
| 391 | char rt_control; |
| 392 | short pi; |
| 393 | char pty; |
| 394 | char rt_len; |
| 395 | char rt_data[TX_RT_DATA_LENGTH]; |
| 396 | } ; |
| 397 | |
| 398 | struct hci_fm_mute_mode_req { |
| 399 | char hard_mute; |
| 400 | char soft_mute; |
| 401 | } ; |
| 402 | |
| 403 | struct hci_fm_stereo_mode_req { |
| 404 | char stereo_mode; |
| 405 | char sig_blend; |
| 406 | char intf_blend; |
| 407 | char most_switch; |
| 408 | } ; |
| 409 | |
| 410 | struct hci_fm_search_station_req { |
| 411 | char srch_mode; |
| 412 | char scan_time; |
| 413 | char srch_dir; |
| 414 | } ; |
| 415 | |
| 416 | struct hci_fm_search_rds_station_req { |
| 417 | struct hci_fm_search_station_req srch_station; |
| 418 | char srch_pty; |
| 419 | short srch_pi; |
| 420 | } ; |
| 421 | |
Satish kumar sugasi | 84e51de | 2015-09-30 18:27:43 -0700 | [diff] [blame] | 422 | struct hci_fm_rds_grp_cntrs_params { |
| 423 | int totalRdsSBlockErrors; |
| 424 | int totalRdsGroups; |
| 425 | int totalRdsGroup0; |
| 426 | int totalRdsGroup2; |
| 427 | int totalRdsBlockB; |
| 428 | int totalRdsProcessedGroup0; |
| 429 | int totalRdsProcessedGroup2; |
| 430 | int totalRdsGroupFiltered; |
| 431 | int totalRdsChangeFiltered; |
| 432 | } ; |
| 433 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 434 | struct hci_fm_search_station_list_req { |
| 435 | char srch_list_mode; |
| 436 | char srch_list_dir; |
| 437 | int srch_list_max; |
| 438 | char srch_pty; |
| 439 | } ; |
| 440 | |
| 441 | struct hci_fm_rds_grp_req { |
| 442 | int rds_grp_enable_mask; |
| 443 | int rds_buf_size; |
| 444 | char en_rds_change_filter; |
| 445 | } ; |
| 446 | |
| 447 | struct hci_fm_en_avd_ctrl_req { |
| 448 | char no_freqs; |
| 449 | char freq_index; |
| 450 | char lo_shft; |
| 451 | short freq_min; |
| 452 | short freq_max; |
| 453 | } ; |
| 454 | |
| 455 | struct hci_fm_def_data_rd_req { |
| 456 | char mode; |
| 457 | char length; |
| 458 | char param_len; |
| 459 | char param; |
| 460 | } ; |
| 461 | |
| 462 | struct hci_fm_def_data_wr_req { |
| 463 | char mode; |
| 464 | char length; |
| 465 | char data[DEFAULT_DATA_SIZE]; |
| 466 | } ; |
| 467 | |
| 468 | struct hci_fm_riva_data { |
| 469 | char subopcode; |
| 470 | int start_addr; |
| 471 | char length; |
| 472 | } ; |
| 473 | |
| 474 | struct hci_fm_riva_poke { |
| 475 | struct hci_fm_riva_data cmd_params; |
| 476 | char data[MAX_RIVA_PEEK_RSP_SIZE]; |
| 477 | } ; |
| 478 | |
| 479 | struct hci_fm_ssbi_req { |
| 480 | short start_addr; |
| 481 | char data; |
| 482 | } ; |
| 483 | struct hci_fm_ssbi_peek { |
| 484 | short start_address; |
| 485 | } ; |
| 486 | |
| 487 | struct hci_fm_ch_det_threshold { |
| 488 | char sinr; |
| 489 | char sinr_samples; |
| 490 | char low_th; |
| 491 | char high_th; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 492 | } ; |
| 493 | |
| 494 | struct hci_fm_blend_table { |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 495 | char BlendType; |
| 496 | char BlendRampRateUp; |
| 497 | char BlendDebounceNumSampleUp; |
| 498 | char BlendDebounceIdxUp; |
| 499 | char BlendSinrIdxSkipStep; |
| 500 | char BlendSinrHi; |
| 501 | char BlendRmssiHi; |
| 502 | char BlendIndexHi; |
| 503 | char BlendIndex[MAX_BLEND_INDEX]; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 504 | } ; |
| 505 | |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 506 | struct hci_fm_def_data_rd { |
| 507 | char mode; |
| 508 | char length; |
| 509 | char param_len; |
| 510 | char param; |
| 511 | }; |
| 512 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 513 | /*HCI events*/ |
| 514 | #define HCI_EV_TUNE_STATUS 0x01 |
| 515 | #define HCI_EV_RDS_LOCK_STATUS 0x02 |
| 516 | #define HCI_EV_STEREO_STATUS 0x03 |
| 517 | #define HCI_EV_SERVICE_AVAILABLE 0x04 |
| 518 | #define HCI_EV_SEARCH_PROGRESS 0x05 |
| 519 | #define HCI_EV_SEARCH_RDS_PROGRESS 0x06 |
| 520 | #define HCI_EV_SEARCH_LIST_PROGRESS 0x07 |
| 521 | #define HCI_EV_RDS_RX_DATA 0x08 |
| 522 | #define HCI_EV_PROGRAM_SERVICE 0x09 |
| 523 | #define HCI_EV_RADIO_TEXT 0x0A |
| 524 | #define HCI_EV_FM_AF_LIST 0x0B |
| 525 | #define HCI_EV_TX_RDS_GRP_AVBLE 0x0C |
| 526 | #define HCI_EV_TX_RDS_GRP_COMPL 0x0D |
| 527 | #define HCI_EV_TX_RDS_CONT_GRP_COMPL 0x0E |
| 528 | #define HCI_EV_CMD_COMPLETE 0x0F |
| 529 | #define HCI_EV_CMD_STATUS 0x10 |
| 530 | #define HCI_EV_TUNE_COMPLETE 0x11 |
| 531 | #define HCI_EV_SEARCH_COMPLETE 0x12 |
| 532 | #define HCI_EV_SEARCH_RDS_COMPLETE 0x13 |
| 533 | #define HCI_EV_SEARCH_LIST_COMPLETE 0x14 |
Satish kumar sugasi | d8731b7 | 2016-01-27 14:45:45 -0800 | [diff] [blame] | 534 | |
| 535 | #define HCI_EV_EXT_COUNTRY_CODE 0x17 |
Satish kumar sugasi | b0ba3c8 | 2016-05-04 20:18:23 -0700 | [diff] [blame] | 536 | #define HCI_EV_RADIO_TEXT_PLUS_ID 0x18 |
| 537 | #define HCI_EV_RADIO_TEXT_PLUS_TAG 0x19 |
Satish kumar sugasi | 8a34ad3 | 2015-10-19 18:09:49 -0700 | [diff] [blame] | 538 | #define HCI_EV_HW_ERR_EVENT 0x1A |
| 539 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 540 | #define HCI_REQ_DONE 0 |
| 541 | #define HCI_REQ_PEND 1 |
| 542 | #define HCI_REQ_CANCELED 2 |
| 543 | #define HCI_REQ_STATUS 3 |
| 544 | |
| 545 | #define MAX_RAW_RDS_GRPS 21 |
| 546 | |
| 547 | #define RDSGRP_DATA_OFFSET 0x1 |
| 548 | |
| 549 | /*RT PLUS*/ |
| 550 | #define DUMMY_CLASS 0 |
| 551 | #define RT_PLUS_LEN_1_TAG 3 |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 552 | #define RT_ERT_FLAG_BIT 5 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 553 | |
| 554 | /*TAG1*/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 555 | #define TAG1_MSB_OFFSET 3 |
| 556 | #define TAG1_MSB_MASK 7 |
| 557 | #define TAG1_LSB_OFFSET 5 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 558 | #define TAG1_POS_MSB_MASK 31 |
| 559 | #define TAG1_POS_MSB_OFFSET 1 |
| 560 | #define TAG1_POS_LSB_OFFSET 7 |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 561 | #define TAG1_LEN_OFFSET 1 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 562 | #define TAG1_LEN_MASK 63 |
| 563 | |
| 564 | /*TAG2*/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 565 | #define TAG2_MSB_OFFSET 5 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 566 | #define TAG2_MSB_MASK 1 |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 567 | #define TAG2_LSB_OFFSET 3 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 568 | #define TAG2_POS_MSB_MASK 7 |
| 569 | #define TAG2_POS_MSB_OFFSET 3 |
| 570 | #define TAG2_POS_LSB_OFFSET 5 |
| 571 | #define TAG2_LEN_MASK 31 |
| 572 | |
| 573 | #define AGT_MASK 31 |
| 574 | /*Extract 5 left most bits of lsb of 2nd block*/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 575 | #define AGT(x) (x & AGT_MASK) |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 576 | /*16 bits of 4th block*/ |
| 577 | #define AID(lsb, msb) ((msb << 8) | (lsb)) |
| 578 | /*Extract 5 right most bits of msb of 2nd block*/ |
| 579 | #define GTC(blk2msb) (blk2msb >> 3) |
| 580 | |
| 581 | #define GRP_3A 0x6 |
| 582 | #define RT_PLUS_AID 0x4bd7 |
| 583 | |
| 584 | /*ERT*/ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 585 | #define ERT_AID 0x6552 |
| 586 | #define CARRIAGE_RETURN 0x000D |
| 587 | #define MAX_ERT_SEGMENT 31 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 588 | #define ERT_FORMAT_DIR_BIT 1 |
| 589 | |
| 590 | #define EXTRACT_BIT(data, bit_pos) ((data & (1 << bit_pos)) >> bit_pos) |
| 591 | |
| 592 | struct hci_ev_tune_status { |
| 593 | char sub_event; |
| 594 | int station_freq; |
| 595 | char serv_avble; |
| 596 | char rssi; |
| 597 | char stereo_prg; |
| 598 | char rds_sync_status; |
| 599 | char mute_mode; |
| 600 | char sinr; |
| 601 | char intf_det_th; |
| 602 | } ; |
| 603 | |
| 604 | struct rds_blk_data { |
| 605 | char rdsMsb; |
| 606 | char rdsLsb; |
| 607 | char blockStatus; |
| 608 | } ; |
| 609 | |
| 610 | struct rds_grp_data { |
| 611 | struct rds_blk_data rdsBlk[4]; |
| 612 | } ; |
| 613 | |
| 614 | struct hci_ev_rds_rx_data { |
| 615 | char num_rds_grps; |
| 616 | struct rds_grp_data rds_grp_data[MAX_RAW_RDS_GRPS]; |
| 617 | } ; |
| 618 | |
| 619 | struct hci_ev_prg_service { |
| 620 | short pi_prg_id; |
| 621 | char pty_prg_type; |
| 622 | char ta_prg_code_type; |
| 623 | char ta_ann_code_flag; |
| 624 | char ms_switch_code_flag; |
| 625 | char dec_id_ctrl_code_flag; |
| 626 | char ps_num; |
| 627 | char prg_service_name[119]; |
| 628 | } ; |
| 629 | |
| 630 | struct hci_ev_radio_text { |
| 631 | short pi_prg_id; |
| 632 | char pty_prg_type; |
| 633 | char ta_prg_code_type; |
| 634 | char txt_ab_flag; |
| 635 | char radio_txt[64]; |
| 636 | } ; |
| 637 | |
| 638 | struct hci_ev_af_list { |
| 639 | int tune_freq; |
| 640 | short pi_code; |
| 641 | char af_size; |
| 642 | char af_list[FM_AF_LIST_MAX_SIZE]; |
| 643 | } ; |
| 644 | |
| 645 | struct hci_ev_cmd_complete { |
| 646 | char num_hci_cmd_pkts; |
| 647 | short cmd_opcode; |
| 648 | } ; |
| 649 | |
| 650 | struct hci_ev_cmd_status { |
| 651 | char status; |
| 652 | char num_hci_cmd_pkts; |
| 653 | short status_opcode; |
| 654 | } ; |
| 655 | |
| 656 | struct hci_ev_srch_st { |
| 657 | int station_freq; |
| 658 | char rds_cap; |
| 659 | char pty; |
| 660 | short status_opcode; |
| 661 | } ; |
| 662 | |
| 663 | struct hci_ev_rel_freq { |
| 664 | char rel_freq_msb; |
| 665 | char rel_freq_lsb; |
| 666 | |
| 667 | } ; |
| 668 | struct hci_ev_srch_list_compl { |
| 669 | char num_stations_found; |
| 670 | struct hci_ev_rel_freq rel_freq[20]; |
| 671 | } ; |
| 672 | |
| 673 | /* ----- HCI Event Response ----- */ |
| 674 | struct hci_fm_conf_rsp { |
| 675 | char status; |
| 676 | struct hci_fm_recv_conf_req recv_conf_rsp; |
| 677 | } ; |
| 678 | |
Satish kumar sugasi | 84e51de | 2015-09-30 18:27:43 -0700 | [diff] [blame] | 679 | struct hci_fm_rds_grp_cntrs_rsp { |
| 680 | char status; |
| 681 | struct hci_fm_rds_grp_cntrs_params recv_rds_grp_cntrs_rsp; |
| 682 | } ; |
| 683 | |
| 684 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 685 | struct hci_fm_get_trans_conf_rsp { |
| 686 | char status; |
| 687 | struct hci_fm_trans_conf_req_struct trans_conf_rsp; |
| 688 | } ; |
| 689 | struct hci_fm_sig_threshold_rsp { |
| 690 | char status; |
| 691 | char sig_threshold; |
| 692 | } ; |
| 693 | |
| 694 | struct hci_fm_station_rsp { |
| 695 | struct hci_ev_tune_status station_rsp; |
| 696 | } ; |
| 697 | |
| 698 | struct hci_fm_prgm_srv_rsp { |
| 699 | char status; |
| 700 | struct hci_ev_prg_service prg_srv; |
| 701 | } ; |
| 702 | |
| 703 | struct hci_fm_radio_txt_rsp { |
| 704 | char status; |
| 705 | struct hci_ev_radio_text rd_txt; |
| 706 | } ; |
| 707 | |
| 708 | struct hci_fm_af_list_rsp { |
| 709 | char status; |
| 710 | struct hci_ev_af_list rd_txt; |
| 711 | } ; |
| 712 | |
| 713 | struct hci_fm_data_rd_rsp { |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 714 | char data_len; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 715 | char data[DEFAULT_DATA_SIZE]; |
| 716 | } ; |
| 717 | |
| 718 | struct hci_fm_feature_list_rsp { |
| 719 | char status; |
| 720 | char feature_mask; |
| 721 | } ; |
| 722 | |
| 723 | struct hci_fm_dbg_param_rsp { |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 724 | char blend; |
| 725 | char soft_mute; |
| 726 | char inf_blend; |
| 727 | char inf_soft_mute; |
| 728 | char pilot_pil; |
| 729 | char io_verc; |
| 730 | char in_det_out; |
| 731 | } ; |
| 732 | |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 733 | #define CLKSPURID_INDEX0 0 |
| 734 | #define CLKSPURID_INDEX1 5 |
| 735 | #define CLKSPURID_INDEX2 10 |
| 736 | #define CLKSPURID_INDEX3 15 |
| 737 | #define CLKSPURID_INDEX4 20 |
| 738 | #define CLKSPURID_INDEX5 25 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 739 | |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 740 | #define MAX_SPUR_FREQ_LIMIT 30 |
| 741 | #define CKK_SPUR 0x3B |
| 742 | #define SPUR_DATA_SIZE 0x4 |
| 743 | #define SPUR_ENTRIES_PER_ID 0x5 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 744 | |
| 745 | #define COMPUTE_SPUR(val) ((((val) - (76000)) / (50))) |
| 746 | #define GET_FREQ(val, bit) ((bit == 1) ? ((val) >> 8) : ((val) & 0xFF)) |
| 747 | #define GET_SPUR_ENTRY_LEVEL(val) ((val) / (5)) |
| 748 | |
| 749 | struct hci_fm_spur_data { |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 750 | int freq[MAX_SPUR_FREQ_LIMIT]; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 751 | char rmssi[MAX_SPUR_FREQ_LIMIT]; |
| 752 | char enable[MAX_SPUR_FREQ_LIMIT]; |
| 753 | } ; |
| 754 | |
| 755 | |
| 756 | /* HCI dev events */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 757 | #define RADIO_HCI_DEV_REG 1 |
| 758 | #define RADIO_HCI_DEV_WRITE 2 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 759 | |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 760 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
| 761 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 762 | |
| 763 | /* FM RDS */ |
| 764 | #define RDS_PTYPE 2 |
| 765 | #define RDS_PID_LOWER 1 |
| 766 | #define RDS_PID_HIGHER 0 |
| 767 | #define RDS_OFFSET 5 |
| 768 | #define RDS_PS_LENGTH_OFFSET 7 |
| 769 | #define RDS_STRING 8 |
| 770 | #define RDS_PS_DATA_OFFSET 8 |
| 771 | #define RDS_CONFIG_OFFSET 3 |
| 772 | #define RDS_AF_JUMP_OFFSET 4 |
| 773 | #define PI_CODE_OFFSET 4 |
| 774 | #define AF_SIZE_OFFSET 6 |
| 775 | #define AF_LIST_OFFSET 7 |
| 776 | #define RT_A_B_FLAG_OFFSET 4 |
| 777 | /*FM states*/ |
| 778 | |
| 779 | enum radio_state_t { |
| 780 | FM_OFF, |
| 781 | FM_RECV, |
| 782 | FM_TRANS, |
| 783 | FM_RESET, |
| 784 | FM_CALIB, |
| 785 | FM_TURNING_OFF, |
| 786 | FM_RECV_TURNING_ON, |
| 787 | FM_TRANS_TURNING_ON, |
| 788 | FM_MAX_NO_STATES, |
| 789 | }; |
| 790 | |
| 791 | enum emphasis_type { |
| 792 | FM_RX_EMP75 = 0x0, |
| 793 | FM_RX_EMP50 = 0x1 |
| 794 | }; |
| 795 | |
| 796 | enum channel_space_type { |
| 797 | FM_RX_SPACE_200KHZ = 0x0, |
| 798 | FM_RX_SPACE_100KHZ = 0x1, |
| 799 | FM_RX_SPACE_50KHZ = 0x2 |
| 800 | }; |
| 801 | |
| 802 | enum high_low_injection { |
| 803 | AUTO_HI_LO_INJECTION = 0x0, |
| 804 | LOW_SIDE_INJECTION = 0x1, |
| 805 | HIGH_SIDE_INJECTION = 0x2 |
| 806 | }; |
| 807 | |
| 808 | enum fm_rds_type { |
| 809 | FM_RX_RDBS_SYSTEM = 0x0, |
| 810 | FM_RX_RDS_SYSTEM = 0x1 |
| 811 | }; |
| 812 | |
| 813 | enum hlm_region_t { |
| 814 | HELIUM_REGION_US, |
| 815 | HELIUM_REGION_EU, |
| 816 | HELIUM_REGION_JAPAN, |
| 817 | HELIUM_REGION_JAPAN_WIDE, |
| 818 | HELIUM_REGION_OTHER |
| 819 | }; |
| 820 | |
| 821 | /* Search options */ |
| 822 | enum search_t { |
| 823 | SEEK, |
| 824 | SCAN, |
| 825 | SCAN_FOR_STRONG, |
| 826 | SCAN_FOR_WEAK, |
| 827 | RDS_SEEK_PTY, |
| 828 | RDS_SCAN_PTY, |
| 829 | RDS_SEEK_PI, |
| 830 | RDS_AF_JUMP, |
| 831 | }; |
| 832 | |
| 833 | enum spur_entry_levels { |
| 834 | ENTRY_0, |
| 835 | ENTRY_1, |
| 836 | ENTRY_2, |
| 837 | ENTRY_3, |
| 838 | ENTRY_4, |
| 839 | ENTRY_5, |
| 840 | }; |
| 841 | |
| 842 | /* Band limits */ |
| 843 | #define REGION_US_EU_BAND_LOW 87500 |
| 844 | #define REGION_US_EU_BAND_HIGH 108000 |
| 845 | #define REGION_JAPAN_STANDARD_BAND_LOW 76000 |
| 846 | #define REGION_JAPAN_STANDARD_BAND_HIGH 90000 |
| 847 | #define REGION_JAPAN_WIDE_BAND_LOW 90000 |
| 848 | #define REGION_JAPAN_WIDE_BAND_HIGH 108000 |
| 849 | |
| 850 | #define SRCH_MODE 0x07 |
| 851 | #define SRCH_DIR 0x08 /* 0-up 1-down */ |
| 852 | #define SCAN_DWELL 0x70 |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 853 | #define SRCH_ON 0x80 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 854 | |
| 855 | /* I/O Control */ |
| 856 | #define IOC_HRD_MUTE 0x03 |
| 857 | #define IOC_SFT_MUTE 0x01 |
| 858 | #define IOC_MON_STR 0x01 |
| 859 | #define IOC_SIG_BLND 0x01 |
| 860 | #define IOC_INTF_BLND 0x01 |
| 861 | #define IOC_ANTENNA 0x01 |
| 862 | |
| 863 | /* RDS Control */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 864 | #define RDS_ON 0x01 |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 865 | #define RDS_BUF_SZ 100 |
| 866 | |
| 867 | /* constants */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 868 | #define RDS_BLOCKS_NUM (4) |
| 869 | #define BYTES_PER_BLOCK (3) |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 870 | #define MAX_PS_LENGTH (108) |
| 871 | #define MAX_RT_LENGTH (64) |
| 872 | #define RDS_GRP_CNTR_LEN (36) |
| 873 | #define RX_RT_DATA_LENGTH (63) |
| 874 | /* Search direction */ |
| 875 | #define SRCH_DIR_UP (0) |
| 876 | #define SRCH_DIR_DOWN (1) |
| 877 | |
| 878 | /*Search RDS stations*/ |
| 879 | #define SEARCH_RDS_STNS_MODE_OFFSET 4 |
| 880 | |
| 881 | /*Search Station list */ |
| 882 | #define PARAMS_PER_STATION 0x08 |
| 883 | #define STN_NUM_OFFSET 0x01 |
| 884 | #define STN_FREQ_OFFSET 0x02 |
| 885 | #define KHZ_TO_MHZ 1000 |
| 886 | #define GET_MSB(x)((x >> 8) & 0xFF) |
| 887 | #define GET_LSB(x)((x) & 0xFF) |
| 888 | |
| 889 | /* control options */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 890 | #define CTRL_ON (1) |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 891 | #define CTRL_OFF (0) |
| 892 | |
| 893 | /*Diagnostic commands*/ |
| 894 | |
| 895 | #define RIVA_PEEK_OPCODE 0x0D |
| 896 | #define RIVA_POKE_OPCODE 0x0C |
| 897 | |
| 898 | #define PEEK_DATA_OFSET 0x1 |
| 899 | #define RIVA_PEEK_PARAM 0x6 |
| 900 | #define RIVA_PEEK_LEN_OFSET 0x6 |
| 901 | #define SSBI_PEEK_LEN 0x01 |
| 902 | /*Calibration data*/ |
| 903 | #define PROCS_CALIB_MODE 1 |
| 904 | #define PROCS_CALIB_SIZE 23 |
| 905 | #define DC_CALIB_MODE 2 |
| 906 | #define DC_CALIB_SIZE 48 |
| 907 | #define RSB_CALIB_MODE 3 |
| 908 | #define RSB_CALIB_SIZE 4 |
| 909 | #define CALIB_DATA_OFSET 2 |
| 910 | #define CALIB_MODE_OFSET 1 |
| 911 | #define MAX_CALIB_SIZE 75 |
| 912 | |
| 913 | /* Channel validity */ |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 914 | #define INVALID_CHANNEL (0) |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 915 | #define VALID_CHANNEL (1) |
| 916 | |
| 917 | struct hci_fm_set_cal_req_proc { |
| 918 | char mode; |
| 919 | /*Max process calibration data size*/ |
| 920 | char data[PROCS_CALIB_SIZE]; |
| 921 | } ; |
| 922 | |
| 923 | struct hci_fm_set_cal_req_dc { |
| 924 | char mode; |
| 925 | /*Max DC calibration data size*/ |
| 926 | char data[DC_CALIB_SIZE]; |
| 927 | } ; |
| 928 | |
| 929 | struct hci_cc_do_calibration_rsp { |
| 930 | char status; |
| 931 | char mode; |
| 932 | char data[MAX_CALIB_SIZE]; |
| 933 | } ; |
| 934 | |
| 935 | struct hci_fm_set_spur_table_req { |
| 936 | char mode; |
| 937 | char no_of_freqs_entries; |
| 938 | char spur_data[FM_SPUR_TBL_SIZE]; |
| 939 | } ; |
| 940 | /* Low Power mode*/ |
| 941 | #define SIG_LEVEL_INTR (1 << 0) |
| 942 | #define RDS_SYNC_INTR (1 << 1) |
| 943 | #define AUDIO_CTRL_INTR (1 << 2) |
| 944 | #define AF_JUMP_ENABLE (1 << 4) |
| 945 | |
| 946 | int hci_def_data_read(struct hci_fm_def_data_rd_req *arg, |
| 947 | struct radio_hci_dev *hdev); |
| 948 | int hci_def_data_write(struct hci_fm_def_data_wr_req *arg, |
| 949 | struct radio_hci_dev *hdev); |
| 950 | int hci_fm_do_calibration(char *arg, struct radio_hci_dev *hdev); |
| 951 | int hci_fm_do_calibration(char *arg, struct radio_hci_dev *hdev); |
| 952 | |
| 953 | static inline int is_valid_tone(int tone) |
| 954 | { |
| 955 | if ((tone >= MIN_TX_TONE_VAL) && |
| 956 | (tone <= MAX_TX_TONE_VAL)) |
| 957 | return 1; |
| 958 | else |
| 959 | return 0; |
| 960 | } |
| 961 | |
| 962 | static inline int is_valid_hard_mute(int hard_mute) |
| 963 | { |
| 964 | if ((hard_mute >= MIN_HARD_MUTE_VAL) && |
| 965 | (hard_mute <= MAX_HARD_MUTE_VAL)) |
| 966 | return 1; |
| 967 | else |
| 968 | return 0; |
| 969 | } |
| 970 | |
| 971 | static inline int is_valid_srch_mode(int srch_mode) |
| 972 | { |
| 973 | if ((srch_mode >= MIN_SRCH_MODE) && |
| 974 | (srch_mode <= MAX_SRCH_MODE)) |
| 975 | return 1; |
| 976 | else |
| 977 | return 0; |
| 978 | } |
| 979 | |
| 980 | static inline int is_valid_scan_dwell_prd(int scan_dwell_prd) |
| 981 | { |
| 982 | if ((scan_dwell_prd >= MIN_SCAN_DWELL) && |
| 983 | (scan_dwell_prd <= MAX_SCAN_DWELL)) |
| 984 | return 1; |
| 985 | else |
| 986 | return 0; |
| 987 | } |
| 988 | |
| 989 | static inline int is_valid_sig_th(int sig_th) |
| 990 | { |
| 991 | if ((sig_th >= MIN_SIG_TH) && |
| 992 | (sig_th <= MAX_SIG_TH)) |
| 993 | return 1; |
| 994 | else |
| 995 | return 0; |
| 996 | } |
| 997 | |
| 998 | static inline int is_valid_pty(int pty) |
| 999 | { |
| 1000 | if ((pty >= MIN_PTY) && |
| 1001 | (pty <= MAX_PTY)) |
| 1002 | return 1; |
| 1003 | else |
| 1004 | return 0; |
| 1005 | } |
| 1006 | |
| 1007 | static inline int is_valid_pi(int pi) |
| 1008 | { |
| 1009 | if ((pi >= MIN_PI) && |
| 1010 | (pi <= MAX_PI)) |
| 1011 | return 1; |
| 1012 | else |
| 1013 | return 0; |
| 1014 | } |
| 1015 | |
| 1016 | static inline int is_valid_srch_station_cnt(int cnt) |
| 1017 | { |
| 1018 | if ((cnt >= MIN_SRCH_STATIONS_CNT) && |
| 1019 | (cnt <= MAX_SRCH_STATIONS_CNT)) |
| 1020 | return 1; |
| 1021 | else |
| 1022 | return 0; |
| 1023 | } |
| 1024 | |
| 1025 | static inline int is_valid_chan_spacing(int spacing) |
| 1026 | { |
| 1027 | if ((spacing >= MIN_CHAN_SPACING) && |
| 1028 | (spacing <= MAX_CHAN_SPACING)) |
| 1029 | return 1; |
| 1030 | else |
| 1031 | return 0; |
| 1032 | } |
| 1033 | |
| 1034 | static inline int is_valid_emphasis(int emphasis) |
| 1035 | { |
| 1036 | if ((emphasis >= MIN_EMPHASIS) && |
| 1037 | (emphasis <= MAX_EMPHASIS)) |
| 1038 | return 1; |
| 1039 | else |
| 1040 | return 0; |
| 1041 | } |
| 1042 | |
| 1043 | static inline int is_valid_rds_std(int rds_std) |
| 1044 | { |
| 1045 | if ((rds_std >= MIN_RDS_STD) && |
| 1046 | (rds_std <= MAX_RDS_STD)) |
| 1047 | return 1; |
| 1048 | else |
| 1049 | return 0; |
| 1050 | } |
| 1051 | |
| 1052 | static inline int is_valid_antenna(int antenna_type) |
| 1053 | { |
| 1054 | if ((antenna_type >= MIN_ANTENNA_VAL) && |
| 1055 | (antenna_type <= MAX_ANTENNA_VAL)) |
| 1056 | return 1; |
| 1057 | else |
| 1058 | return 0; |
| 1059 | } |
| 1060 | |
| 1061 | static inline int is_valid_ps_repeat_cnt(int cnt) |
| 1062 | { |
| 1063 | if ((cnt >= MIN_TX_PS_REPEAT_CNT) && |
| 1064 | (cnt <= MAX_TX_PS_REPEAT_CNT)) |
| 1065 | return 1; |
| 1066 | else |
| 1067 | return 0; |
| 1068 | } |
| 1069 | |
| 1070 | static inline int is_valid_soft_mute(int soft_mute) |
| 1071 | { |
| 1072 | if ((soft_mute >= MIN_SOFT_MUTE) && |
| 1073 | (soft_mute <= MAX_SOFT_MUTE)) |
| 1074 | return 1; |
| 1075 | else |
| 1076 | return 0; |
| 1077 | } |
| 1078 | |
| 1079 | static inline int is_valid_peek_len(int len) |
| 1080 | { |
| 1081 | if ((len >= MIN_PEEK_ACCESS_LEN) && |
| 1082 | (len <= MAX_PEEK_ACCESS_LEN)) |
| 1083 | return 1; |
| 1084 | else |
| 1085 | return 0; |
| 1086 | } |
| 1087 | |
| 1088 | static inline int is_valid_reset_cntr(int cntr) |
| 1089 | { |
| 1090 | if ((cntr >= MIN_RESET_CNTR) && |
| 1091 | (cntr <= MAX_RESET_CNTR)) |
| 1092 | return 1; |
| 1093 | else |
| 1094 | return 0; |
| 1095 | } |
| 1096 | |
| 1097 | static inline int is_valid_hlsi(int hlsi) |
| 1098 | { |
| 1099 | if ((hlsi >= MIN_HLSI) && |
| 1100 | (hlsi <= MAX_HLSI)) |
| 1101 | return 1; |
| 1102 | else |
| 1103 | return 0; |
| 1104 | } |
| 1105 | |
| 1106 | static inline int is_valid_notch_filter(int filter) |
| 1107 | { |
| 1108 | if ((filter >= MIN_NOTCH_FILTER) && |
| 1109 | (filter <= MAX_NOTCH_FILTER)) |
| 1110 | return 1; |
| 1111 | else |
| 1112 | return 0; |
| 1113 | } |
| 1114 | |
| 1115 | static inline int is_valid_intf_det_low_th(int th) |
| 1116 | { |
| 1117 | if ((th >= MIN_INTF_DET_OUT_LW_TH) && |
| 1118 | (th <= MAX_INTF_DET_OUT_LW_TH)) |
| 1119 | return 1; |
| 1120 | else |
| 1121 | return 0; |
| 1122 | } |
| 1123 | |
| 1124 | static inline int is_valid_intf_det_hgh_th(int th) |
| 1125 | { |
| 1126 | if ((th >= MIN_INTF_DET_OUT_HG_TH) && |
| 1127 | (th <= MAX_INTF_DET_OUT_HG_TH)) |
| 1128 | return 1; |
| 1129 | else |
| 1130 | return 0; |
| 1131 | } |
| 1132 | |
| 1133 | static inline int is_valid_sinr_th(int th) |
| 1134 | { |
| 1135 | if ((th >= MIN_SINR_TH) && |
| 1136 | (th <= MAX_SINR_TH)) |
| 1137 | return 1; |
| 1138 | else |
| 1139 | return 0; |
| 1140 | } |
| 1141 | |
| 1142 | static inline int is_valid_sinr_samples(int samples_cnt) |
| 1143 | { |
| 1144 | if ((samples_cnt >= MIN_SINR_SAMPLES) && |
| 1145 | (samples_cnt <= MAX_SINR_SAMPLES)) |
| 1146 | return 1; |
| 1147 | else |
| 1148 | return 0; |
| 1149 | } |
| 1150 | |
| 1151 | static inline int is_valid_fm_state(int state) |
| 1152 | { |
| 1153 | if ((state >= 0) && (state < FM_MAX_NO_STATES)) |
| 1154 | return 1; |
| 1155 | else |
| 1156 | return 0; |
| 1157 | } |
| 1158 | |
| 1159 | static inline int is_valid_blend_value(int val) |
| 1160 | { |
| 1161 | if ((val >= MIN_BLEND_HI) && (val <= MAX_BLEND_HI)) |
| 1162 | return 1; |
| 1163 | else |
| 1164 | return 0; |
| 1165 | } |
| 1166 | |
| 1167 | struct helium_device { |
| 1168 | int tune_req; |
| 1169 | unsigned int mode; |
| 1170 | short pi; |
| 1171 | char pty; |
| 1172 | char ps_repeatcount; |
| 1173 | char prev_trans_rds; |
| 1174 | char af_jump_bit; |
| 1175 | struct hci_fm_mute_mode_req mute_mode; |
| 1176 | struct hci_fm_stereo_mode_req stereo_mode; |
| 1177 | struct hci_fm_station_rsp fm_st_rsp; |
| 1178 | struct hci_fm_search_station_req srch_st; |
| 1179 | struct hci_fm_search_rds_station_req srch_rds; |
| 1180 | struct hci_fm_search_station_list_req srch_st_list; |
| 1181 | struct hci_fm_recv_conf_req recv_conf; |
| 1182 | struct hci_fm_trans_conf_req_struct trans_conf; |
| 1183 | struct hci_fm_rds_grp_req rds_grp; |
| 1184 | unsigned char g_search_mode; |
| 1185 | unsigned char power_mode; |
| 1186 | int search_on; |
| 1187 | unsigned char spur_table_size; |
| 1188 | unsigned char g_scan_time; |
| 1189 | unsigned int g_antenna; |
| 1190 | unsigned int g_rds_grp_proc_ps; |
| 1191 | unsigned char event_mask; |
| 1192 | enum hlm_region_t region; |
| 1193 | struct hci_fm_dbg_param_rsp st_dbg_param; |
| 1194 | struct hci_ev_srch_list_compl srch_st_result; |
Satish kumar sugasi | 88832b9 | 2015-12-21 18:52:29 -0800 | [diff] [blame] | 1195 | struct hci_fm_riva_poke riva_data_req; |
| 1196 | struct hci_fm_ssbi_req ssbi_data_accs; |
| 1197 | struct hci_fm_ssbi_peek ssbi_peek_reg; |
| 1198 | struct hci_fm_ch_det_threshold ch_det_threshold; |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 1199 | struct hci_fm_data_rd_rsp def_data; |
| 1200 | struct hci_fm_blend_table blend_tbl; |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 1201 | }; |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 1202 | |
| 1203 | #define set_bit(flag, bit_pos) ((flag) |= (1 << (bit_pos))) |
| 1204 | #define clear_bit(flag, bit_pos) ((flag) &= (~(1 << (bit_pos)))) |
| 1205 | #define test_bit(flag, bit_pos) ((flag) & (1 << (bit_pos))) |
| 1206 | #define clear_all_bit(flag) ((flag) &= (~0xFFFFFFFF)) |
| 1207 | #define CMD_CHDET_SINR_TH (1) |
| 1208 | #define CMD_CHDET_SINR_SAMPLE (2) |
| 1209 | #define CMD_CHDET_INTF_TH_LOW (3) |
| 1210 | #define CMD_CHDET_INTF_TH_HIGH (4) |
| 1211 | |
| 1212 | #define CMD_DEFRD_AF_RMSSI_TH (1) |
| 1213 | #define CMD_DEFRD_AF_RMSSI_SAMPLE (2) |
| 1214 | #define CMD_DEFRD_GD_CH_RMSSI_TH (3) |
| 1215 | #define CMD_DEFRD_SEARCH_ALGO (4) |
| 1216 | #define CMD_DEFRD_SINR_FIRST_STAGE (5) |
| 1217 | #define CMD_DEFRD_RMSSI_FIRST_STAGE (6) |
| 1218 | #define CMD_DEFRD_CF0TH12 (7) |
| 1219 | #define CMD_DEFRD_TUNE_POWER (8) |
| 1220 | #define CMD_DEFRD_REPEATCOUNT (9) |
| 1221 | |
| 1222 | #define CMD_STNPARAM_RSSI (1) |
| 1223 | #define CMD_STNPARAM_SINR (2) |
| 1224 | #define CMD_STNPARAM_INTF_DET_TH (3) |
| 1225 | |
| 1226 | #define CMD_STNDBGPARAM_BLEND (1) |
| 1227 | #define CMD_STNDBGPARAM_SOFTMUTE (2) |
| 1228 | #define CMD_STNDBGPARAM_INFBLEND (3) |
| 1229 | #define CMD_STNDBGPARAM_INFSOFTMUTE (4) |
| 1230 | #define CMD_STNDBGPARAM_PILOTPLL (5) |
| 1231 | #define CMD_STNDBGPARAM_IOVERC (6) |
| 1232 | #define CMD_STNDBGPARAM_INFDETOUT (7) |
| 1233 | |
| 1234 | #define CMD_BLENDTBL_SINR_HI (1) |
| 1235 | #define CMD_BLENDTBL_RMSSI_HI (2) |
| 1236 | |
Satish kumar sugasi | 88832b9 | 2015-12-21 18:52:29 -0800 | [diff] [blame] | 1237 | int hci_fm_disable_recv_req(); |
| 1238 | int helium_search_list(struct hci_fm_search_station_list_req *s_list); |
| 1239 | int helium_search_rds_stations(struct hci_fm_search_rds_station_req *rds_srch); |
| 1240 | int helium_search_stations(struct hci_fm_search_station_req *srch); |
| 1241 | int helium_cancel_search_req(); |
| 1242 | int hci_fm_set_recv_conf_req (struct hci_fm_recv_conf_req *conf); |
| 1243 | int hci_fm_get_program_service_req (); |
| 1244 | int hci_fm_get_rds_grpcounters_req (int val); |
| 1245 | int hci_fm_set_notch_filter_req (int val); |
| 1246 | int helium_set_sig_threshold_req(char th); |
| 1247 | int helium_rds_grp_mask_req(struct hci_fm_rds_grp_req *rds_grp_msk); |
| 1248 | int helium_rds_grp_process_req(int rds_grp); |
| 1249 | int helium_set_event_mask_req(char e_mask); |
| 1250 | int helium_set_antenna_req(char ant); |
| 1251 | int helium_set_fm_mute_mode_req(struct hci_fm_mute_mode_req *mute); |
| 1252 | int hci_fm_tune_station_req(int param); |
| 1253 | int hci_set_fm_stereo_mode_req(struct hci_fm_stereo_mode_req *param); |
| 1254 | int hci_peek_data(struct hci_fm_riva_data *data); |
| 1255 | int hci_poke_data(struct hci_fm_riva_poke *data); |
| 1256 | int hci_ssbi_poke_reg(struct hci_fm_ssbi_req *data); |
| 1257 | int hci_ssbi_peek_reg(struct hci_fm_ssbi_peek *data); |
| 1258 | int hci_fm_get_ch_det_th(); |
| 1259 | int set_ch_det_thresholds_req(struct hci_fm_ch_det_threshold *ch_det_th); |
Kamal Negi | 8813e0f | 2016-02-10 19:12:09 +0530 | [diff] [blame] | 1260 | int hci_fm_default_data_read_req(struct hci_fm_def_data_rd_req *def_data_rd); |
| 1261 | int hci_fm_get_blend_req(); |
| 1262 | int hci_fm_set_blend_tbl_req(struct hci_fm_blend_table *blnd_tbl); |
| 1263 | int hci_fm_default_data_write_req(struct hci_fm_def_data_wr_req * data_wrt); |
| 1264 | int hci_fm_get_station_dbg_param_req(); |
| 1265 | int hci_fm_get_station_cmd_param_req(); |
Satish kumar sugasi | 88832b9 | 2015-12-21 18:52:29 -0800 | [diff] [blame] | 1266 | |
Satish kumar sugasi | 644b488 | 2016-05-04 20:15:31 -0700 | [diff] [blame] | 1267 | #endif /* __UAPI_RADIO_HCI_CORE_H */ |