add MTK-combo-module,continue with commit 17f39ed917874e77e80411f33faba1b7ee8138c8
[firefly-linux-kernel-4.4.55.git] / drivers / mtk_wcn_combo / drv_fm / include / fm.h
1 /* Copyright Statement:
2  *
3  * This software/firmware and related documentation ("MediaTek Software") are
4  * protected under relevant copyright laws. The information contained herein
5  * is confidential and proprietary to MediaTek Inc. and/or its licensors.
6  * Without the prior written permission of MediaTek inc. and/or its licensors,
7  * any reproduction, modification, use or disclosure of MediaTek Software,
8  * and information contained herein, in whole or in part, shall be strictly prohibited.
9  */
10 /* MediaTek Inc. (C) 2010. All rights reserved.
11  *
12  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
13  * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
14  * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
15  * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
18  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
19  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
20  * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
21  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
22  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
23  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
24  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
25  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
26  * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
27  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
28  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
29  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
30  *
31  * The following software/firmware and/or related documentation ("MediaTek Software")
32  * have been modified by MediaTek Inc. All revisions are subject to any receiver's
33  * applicable license agreements with MediaTek Inc.
34  */
35
36 /* alps/ALPS_SW/TRUNK/MAIN/alps/kernel/arch/arm/mach-mt6516/include/mach/fm.h
37  *
38  * (C) Copyright 2009 
39  * MediaTek <www.MediaTek.com>
40  * William Chung <William.Chung@MediaTek.com>
41  *
42  * MT6516 AR10x0 FM Radio Driver
43  *
44  * This program is free software; you can redistribute it and/or modify
45  * it under the terms of the GNU General Public License as published by
46  * the Free Software Foundation; either version 2 of the License, or
47  * (at your option) any later version.
48  *
49  * This program is distributed in the hope that it will be useful,
50  * but WITHOUT ANY WARRANTY; without even the implied warranty of
51  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52  * GNU General Public License for more details.
53  *
54  * You should have received a copy of the GNU General Public License
55  * along with this program; if not, write to the Free Software
56  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
57  */
58
59 #ifndef __FM_H__
60 #define __FM_H__
61
62 //#define FMDEBUG
63
64 #include <linux/ioctl.h>
65 #include <linux/time.h>
66
67 //scan sort ways
68 enum{
69     FM_SCAN_SORT_NON = 0,
70     FM_SCAN_SORT_UP,
71     FM_SCAN_SORT_DOWN,
72     FM_SCAN_SORT_MAX
73 };
74
75 //*****************************************************************************************
76 //***********************************FM config for customer ***********************************
77 //*****************************************************************************************
78 //RX
79 #define FMR_RSSI_TH_LONG    0x0301      //FM radio long antenna RSSI threshold(11.375dBuV)
80 #define FMR_RSSI_TH_SHORT   0x02E0      //FM radio short antenna RSSI threshold(-1dBuV)
81 #define FMR_CQI_TH          0x00E9      //FM radio Channel quality indicator threshold(0x0000~0x00FF)
82 #define FMR_SEEK_SPACE      1           //FM radio seek space,1:100KHZ; 2:200KHZ
83 #define FMR_SCAN_CH_SIZE    40          //FM radio scan max channel size
84 #define FMR_BAND            1           //FM radio band, 1:87.5MHz~108.0MHz; 2:76.0MHz~90.0MHz; 3:76.0MHz~108.0MHz; 4:special
85 #define FMR_BAND_FREQ_L     875         //FM radio special band low freq(Default 87.5MHz)
86 #define FMR_BAND_FREQ_H     1080        //FM radio special band high freq(Default 108.0MHz)
87 #define FM_SCAN_SORT_SELECT FM_SCAN_SORT_DOWN
88
89 //TX
90 #define FMTX_PWR_LEVEL_MAX  120         //FM transmitter power level, rang: 85db~120db, default 120db
91
92 //*****************************************************************************************
93 //***********************************FM config for engineer ***********************************
94 //*****************************************************************************************
95 //RX
96 #define FMR_MR_TH           0x01BD      //FM radio MR threshold
97 #define ADDR_SCAN_TH        0xE0        //scan thrshold register
98 #define ADDR_CQI_TH         0xE1        //scan CQI register
99
100 //TX
101 #define FMTX_SCAN_HOLE_LOW  923         //92.3MHz~95.4MHz should not show to user
102 #define FMTX_SCAN_HOLE_HIGH 954         //92.3MHz~95.4MHz should not show to user
103 //*****************************************************************************************
104
105 #define FM_NAME             "fm"
106 #define FM_DEVICE_NAME      "/dev/fm"
107
108 // errno
109 #define FM_SUCCESS      0
110 #define FM_FAILED       1
111 #define FM_EPARM        2
112 #define FM_BADSTATUS    3
113 #define FM_TUNE_FAILED  4
114 #define FM_SEEK_FAILED  5
115 #define FM_BUSY         6
116 #define FM_SCAN_FAILED  7
117
118 // band
119
120 #define FM_BAND_UNKNOWN 0
121 #define FM_BAND_UE      1 // US/Europe band  87.5MHz ~ 108MHz (DEFAULT)
122 #define FM_BAND_JAPAN   2 // Japan band      76MHz   ~ 90MHz
123 #define FM_BAND_JAPANW  3 // Japan wideband  76MHZ   ~ 108MHz
124 #define FM_BAND_SPECIAL 4 // special   band  between 76MHZ   and  108MHz
125 #define FM_BAND_DEFAULT FM_BAND_UE
126 #define FM_FREQ_MIN  FMR_BAND_FREQ_L
127 #define FM_FREQ_MAX  FMR_BAND_FREQ_H
128 #define FM_RAIDO_BAND FM_BAND_UE
129 // space
130 #define FM_SPACE_UNKNOWN    0
131 #define FM_SPACE_100K       1
132 #define FM_SPACE_200K       2
133 #define FM_SPACE_DEFAULT    FMR_SEEK_SPACE
134 #define FM_SEEK_SPACE FMR_SEEK_SPACE
135
136 //max scan chl num
137 #define FM_MAX_CHL_SIZE FMR_SCAN_CH_SIZE
138 // auto HiLo
139 #define FM_AUTO_HILO_OFF    0
140 #define FM_AUTO_HILO_ON     1
141
142 // seek direction
143 #define FM_SEEK_UP          0
144 #define FM_SEEK_DOWN        1
145
146 #define FM_CHIP_AR1000 0x1000
147 #define FM_CHIP_MT5192 0x91
148 #define FM_CHIP_MT5193 0x92
149 #define FM_CHIP_MT6616 0x6616
150 #define FM_CHIP_MT6620 0x6620
151 #define FM_CHIP_MT6626 0x6626
152 #define FM_CHIP_MT6628 0x6628
153 #define FM_CHIP_UNSUPPORTED 0xffff
154
155 // seek threshold
156 #define FM_SEEKTH_LEVEL_DEFAULT 4
157
158 #define FM_IOC_MAGIC        0xf5 // FIXME: any conflict?
159
160 struct fm_tune_parm {
161     uint8_t err;
162     uint8_t band;
163     uint8_t space;
164     uint8_t hilo;
165     uint16_t freq; // IN/OUT parameter
166 };
167
168 struct fm_seek_parm {
169     uint8_t err;
170     uint8_t band;
171     uint8_t space;
172     uint8_t hilo;
173     uint8_t seekdir;
174     uint8_t seekth;
175     uint16_t freq; // IN/OUT parameter
176 };
177
178 struct fm_scan_parm {
179     uint8_t  err;
180     uint8_t  band;
181     uint8_t  space;
182     uint8_t  hilo;
183     uint16_t freq; // OUT parameter
184     uint16_t ScanTBL[16]; //need no less than the chip
185     uint16_t ScanTBLSize; //IN/OUT parameter
186 };
187
188 struct fm_ch_rssi{
189     uint16_t freq;
190     int rssi;
191 };
192
193 struct fm_rssi_req{
194     uint16_t num;
195     uint16_t read_cnt;
196     struct fm_ch_rssi cr[16*16];
197 };
198
199 struct fm_hw_info{
200     int chip_id; //chip ID, eg. 6620
201     int eco_ver; //chip ECO version, eg. E3
202     int rom_ver; //FM DSP rom code version, eg. V2
203     int patch_ver; //FM DSP patch version, eg. 1.11
204     int reserve;
205 };
206
207 //For RDS feature
208 typedef struct
209 {
210    uint8_t TP;
211    uint8_t TA;
212    uint8_t Music;
213    uint8_t Stereo;
214    uint8_t Artificial_Head;
215    uint8_t Compressed;
216    uint8_t Dynamic_PTY;
217    uint8_t Text_AB;
218    uint32_t flag_status;
219 }RDSFlag_Struct;
220
221 typedef struct
222 {
223    uint16_t Month;
224    uint16_t Day;
225    uint16_t Year;
226    uint16_t Hour;
227    uint16_t Minute;
228    uint8_t Local_Time_offset_signbit;
229    uint8_t Local_Time_offset_half_hour;
230 }CT_Struct;
231
232 typedef struct
233 {
234    int16_t AF_Num;
235    int16_t AF[2][25];  //100KHz
236    uint8_t Addr_Cnt;
237    uint8_t isMethod_A;
238    uint8_t isAFNum_Get;
239 }AF_Info;
240
241 typedef struct
242 {
243    uint8_t PS[3][8];
244    uint8_t Addr_Cnt;
245 }PS_Info;
246
247 typedef struct
248 {
249    uint8_t TextData[4][64];
250    uint8_t GetLength;
251    uint8_t isRTDisplay;
252    uint8_t TextLength;
253    uint8_t isTypeA;
254    uint8_t BufCnt;
255    uint16_t Addr_Cnt;
256 }RT_Info;
257
258 struct rds_raw_data
259 {
260     int dirty; //indicate if the data changed or not
261     int len; //the data len form chip
262     uint8_t data[146];
263 };
264
265 struct rds_group_cnt
266 {
267     unsigned long total;
268     unsigned long groupA[16]; //RDS groupA counter
269     unsigned long groupB[16]; //RDS groupB counter
270 };
271
272 enum rds_group_cnt_opcode
273 {
274     RDS_GROUP_CNT_READ = 0,
275     RDS_GROUP_CNT_WRITE,
276     RDS_GROUP_CNT_RESET,
277     RDS_GROUP_CNT_MAX
278 };
279
280 struct rds_group_cnt_req
281 {
282     int err;
283     enum rds_group_cnt_opcode op;
284     struct rds_group_cnt gc;
285 };
286
287 typedef struct
288 {
289    CT_Struct CT;
290    RDSFlag_Struct RDSFlag;
291    uint16_t PI;
292    uint8_t Switch_TP;
293    uint8_t PTY;
294    AF_Info AF_Data;
295    AF_Info AFON_Data;
296    uint8_t Radio_Page_Code;
297    uint16_t Program_Item_Number_Code;
298    uint8_t Extend_Country_Code;
299    uint16_t Language_Code;
300    PS_Info PS_Data;
301    uint8_t PS_ON[8];   
302    RT_Info RT_Data;
303    //uint16_t Block_Backup[32][4];
304    //uint16_t Group_Cnt[32];
305    //uint8_t EINT_Flag;
306    //uint8_t RDS_Flag;
307    uint16_t event_status; //will use RDSFlag_Struct RDSFlag->flag_status to check which event, is that ok? 
308 } RDSData_Struct;
309
310
311 //Need care the following definition.
312 //valid Rds Flag for notify
313 typedef enum {
314    RDS_FLAG_IS_TP              = 0x0001, // Program is a traffic program
315    RDS_FLAG_IS_TA              = 0x0002, // Program currently broadcasts a traffic ann.
316    RDS_FLAG_IS_MUSIC           = 0x0004, // Program currently broadcasts music
317    RDS_FLAG_IS_STEREO          = 0x0008, // Program is transmitted in stereo
318    RDS_FLAG_IS_ARTIFICIAL_HEAD = 0x0010, // Program is an artificial head recording
319    RDS_FLAG_IS_COMPRESSED      = 0x0020, // Program content is compressed
320    RDS_FLAG_IS_DYNAMIC_PTY     = 0x0040, // Program type can change 
321    RDS_FLAG_TEXT_AB            = 0x0080  // If this flag changes state, a new radio text                                         string begins
322 } RdsFlag;
323
324 typedef enum {
325    RDS_EVENT_FLAGS          = 0x0001, // One of the RDS flags has changed state
326    RDS_EVENT_PI_CODE        = 0x0002, // The program identification code has changed
327    RDS_EVENT_PTY_CODE       = 0x0004, // The program type code has changed
328    RDS_EVENT_PROGRAMNAME    = 0x0008, // The program name has changed
329    RDS_EVENT_UTCDATETIME    = 0x0010, // A new UTC date/time is available
330    RDS_EVENT_LOCDATETIME    = 0x0020, // A new local date/time is available
331    RDS_EVENT_LAST_RADIOTEXT = 0x0040, // A radio text string was completed
332    RDS_EVENT_AF             = 0x0080, // Current Channel RF signal strength too weak, need do AF switch  
333    RDS_EVENT_AF_LIST        = 0x0100, // An alternative frequency list is ready
334    RDS_EVENT_AFON_LIST      = 0x0200, // An alternative frequency list is ready
335    RDS_EVENT_TAON           = 0x0400,  // Other Network traffic announcement start
336    RDS_EVENT_TAON_OFF       = 0x0800, // Other Network traffic announcement finished.
337    RDS_EVENT_RDS            = 0x2000, // RDS Interrupt had arrived durint timer period  
338    RDS_EVENT_NO_RDS         = 0x4000, // RDS Interrupt not arrived durint timer period  
339    RDS_EVENT_RDS_TIMER      = 0x8000 // Timer for RDS Bler Check. ---- BLER  block error rate
340 } RdsEvent;
341
342 struct fm_rds_tx_parm {
343     uint8_t err;
344     uint16_t pi;
345     uint16_t ps[12]; // 4 ps
346     uint16_t other_rds[87];  // 0~29 other groups
347     uint8_t other_rds_cnt; // # of other group
348 };
349
350 typedef struct fm_rds_tx_req{
351     unsigned char pty;         // 0~31 integer
352     unsigned char rds_rbds;    // 0:RDS, 1:RBDS
353     unsigned char dyn_pty;     // 0:static, 1:dynamic
354     unsigned short pi_code;    // 2-byte hex
355     unsigned char ps_buf[8];     // hex buf of PS
356     unsigned char ps_len;      // length of PS, must be 0 / 8"
357     unsigned char af;          // 0~204, 0:not used, 1~204:(87.5+0.1*af)MHz
358     unsigned char ah;          // Artificial head, 0:no, 1:yes
359     unsigned char stereo;      // 0:mono, 1:stereo
360     unsigned char compress;    // Audio compress, 0:no, 1:yes
361     unsigned char tp;          // traffic program, 0:no, 1:yes
362     unsigned char ta;          // traffic announcement, 0:no, 1:yes
363     unsigned char speech;      // 0:music, 1:speech
364 }fm_rds_tx_req;
365
366 #define TX_SCAN_MAX 10
367 #define TX_SCAN_MIN 1
368 struct fm_tx_scan_parm {
369     uint8_t  err;
370     uint8_t  band;      //87.6~108MHz
371     uint8_t  space;
372     uint8_t  hilo;
373     uint16_t freq;      // start freq, if less than band min freq, then will use band min freq
374     uint8_t      scandir;
375     uint16_t ScanTBL[TX_SCAN_MAX];      //need no less than the chip
376     uint16_t ScanTBLSize; //IN: desired size, OUT: scan result size 
377 };
378
379 struct fm_gps_rtc_info{
380     int             err;            //error number, 0: success, other: err code
381     int             retryCnt;       //GPS mnl can decide retry times
382     int             ageThd;         //GPS 3D fix time diff threshold
383     int             driftThd;       //GPS RTC drift threshold
384     struct timeval  tvThd;          //time value diff threshold
385     int             age;            //GPS 3D fix time diff
386     int             drift;          //GPS RTC drift
387     union{
388         unsigned long stamp;        //time stamp in jiffies
389         struct timeval  tv;         //time stamp value in RTC
390     };
391     int             flag;           //rw flag
392 };
393
394 typedef enum
395 {
396         FM_I2S_ON = 0,
397         FM_I2S_OFF
398 }fm_i2s_state;
399
400 typedef enum
401 {
402         FM_I2S_MASTER = 0,
403         FM_I2S_SLAVE
404 }fm_i2s_mode;
405
406 typedef enum
407 {
408         FM_I2S_32K = 0,
409         FM_I2S_44K,
410         FM_I2S_48K
411 }fm_i2s_sample;
412
413 struct fm_i2s_setting{
414     int onoff;
415     int mode;
416     int sample;
417 };
418
419 typedef enum{
420     FM_RX = 0,
421     FM_TX = 1
422 }FM_PWR_T;
423
424 #define FM_IOCTL_POWERUP       _IOWR(FM_IOC_MAGIC, 0, struct fm_tune_parm*)
425 #define FM_IOCTL_POWERDOWN     _IOWR(FM_IOC_MAGIC, 1, int32_t*)
426 #define FM_IOCTL_TUNE          _IOWR(FM_IOC_MAGIC, 2, struct fm_tune_parm*)
427 #define FM_IOCTL_SEEK          _IOWR(FM_IOC_MAGIC, 3, struct fm_seek_parm*)
428 #define FM_IOCTL_SETVOL        _IOWR(FM_IOC_MAGIC, 4, uint32_t*)
429 #define FM_IOCTL_GETVOL        _IOWR(FM_IOC_MAGIC, 5, uint32_t*)
430 #define FM_IOCTL_MUTE          _IOWR(FM_IOC_MAGIC, 6, uint32_t*)
431 #define FM_IOCTL_GETRSSI       _IOWR(FM_IOC_MAGIC, 7, uint32_t*)
432 #define FM_IOCTL_SCAN          _IOWR(FM_IOC_MAGIC, 8, struct fm_scan_parm*)
433 #define FM_IOCTL_STOP_SCAN     _IO(FM_IOC_MAGIC,   9)
434 #define FM_IOCTL_POWERUP_TX    _IOWR(FM_IOC_MAGIC, 20, struct fm_tune_parm*)
435 #define FM_IOCTL_TUNE_TX       _IOWR(FM_IOC_MAGIC, 21, struct fm_tune_parm*)
436 #define FM_IOCTL_RDS_TX        _IOWR(FM_IOC_MAGIC, 22, struct fm_rds_tx_parm*)
437
438 //IOCTL and struct for test
439 #define FM_IOCTL_GETCHIPID     _IOWR(FM_IOC_MAGIC, 10, uint16_t*)
440 #define FM_IOCTL_EM_TEST       _IOWR(FM_IOC_MAGIC, 11, struct fm_em_parm*)
441 #define FM_IOCTL_RW_REG        _IOWR(FM_IOC_MAGIC, 12, struct fm_ctl_parm*)
442 #define FM_IOCTL_GETMONOSTERO  _IOWR(FM_IOC_MAGIC, 13, uint16_t*)
443 #define FM_IOCTL_GETCURPAMD    _IOWR(FM_IOC_MAGIC, 14, uint16_t*)
444 #define FM_IOCTL_GETGOODBCNT   _IOWR(FM_IOC_MAGIC, 15, uint16_t*)
445 #define FM_IOCTL_GETBADBNT     _IOWR(FM_IOC_MAGIC, 16, uint16_t*)
446 #define FM_IOCTL_GETBLERRATIO  _IOWR(FM_IOC_MAGIC, 17, uint16_t*)
447
448
449 //IOCTL for RDS 
450 #define FM_IOCTL_RDS_ONOFF     _IOWR(FM_IOC_MAGIC, 18, uint16_t*)
451 #define FM_IOCTL_RDS_SUPPORT   _IOWR(FM_IOC_MAGIC, 19, int32_t*)
452
453 #define FM_IOCTL_RDS_SIM_DATA  _IOWR(FM_IOC_MAGIC, 23, uint32_t*)
454 #define FM_IOCTL_IS_FM_POWERED_UP  _IOWR(FM_IOC_MAGIC, 24, uint32_t*)
455
456 //IOCTL for FM Tx
457 #define FM_IOCTL_TX_SUPPORT    _IOWR(FM_IOC_MAGIC, 25, int32_t*)
458 #define FM_IOCTL_RDSTX_SUPPORT _IOWR(FM_IOC_MAGIC, 26, int32_t*)
459 #define FM_IOCTL_RDSTX_ENABLE  _IOWR(FM_IOC_MAGIC, 27, int32_t*)
460 #define FM_IOCTL_TX_SCAN       _IOWR(FM_IOC_MAGIC, 28, struct fm_tx_scan_parm*)
461
462 //IOCTL for FM over BT
463 #define FM_IOCTL_OVER_BT_ENABLE  _IOWR(FM_IOC_MAGIC, 29, int32_t*)
464
465 //IOCTL for FM ANTENNA SWITCH
466 #define FM_IOCTL_ANA_SWITCH     _IOWR(FM_IOC_MAGIC, 30, int32_t*)
467 #define FM_IOCTL_GETCAPARRAY    _IOWR(FM_IOC_MAGIC, 31, int32_t*)
468
469 //IOCTL for FM compensation by GPS RTC
470 #define FM_IOCTL_GPS_RTC_DRIFT  _IOWR(FM_IOC_MAGIC, 32, struct fm_gps_rtc_info*)
471
472 //IOCTL for FM I2S Setting
473 #define FM_IOCTL_I2S_SETTING  _IOWR(FM_IOC_MAGIC, 33, struct fm_i2s_setting*)
474
475 #define FM_IOCTL_RDS_GROUPCNT   _IOWR(FM_IOC_MAGIC, 34, struct rds_group_cnt_req*)
476 #define FM_IOCTL_RDS_GET_LOG    _IOWR(FM_IOC_MAGIC, 35, struct rds_raw_data*)
477
478 #define FM_IOCTL_SCAN_GETRSSI   _IOWR(FM_IOC_MAGIC, 36, struct fm_rssi_req*)
479 #define FM_IOCTL_SETMONOSTERO   _IOWR(FM_IOC_MAGIC, 37, int32_t)
480 #define FM_IOCTL_GET_HW_INFO    _IOWR(FM_IOC_MAGIC, 38, struct fm_hw_info*)
481
482 #define FM_IOCTL_DUMP_REG   _IO(FM_IOC_MAGIC, 0xFF)
483
484 enum group_idx {
485     mono=0,
486     stereo,
487     RSSI_threshold,
488     HCC_Enable,
489     PAMD_threshold,
490     Softmute_Enable,
491     De_emphasis,
492     HL_Side,
493     Demod_BW,
494     Dynamic_Limiter,
495     Softmute_Rate,
496     AFC_Enable,
497     Softmute_Level,
498     Analog_Volume,
499     GROUP_TOTAL_NUMS
500 };
501         
502 enum item_idx {
503     Sblend_OFF=0,
504     Sblend_ON,  
505     ITEM_TOTAL_NUMS
506 };
507
508 struct fm_ctl_parm {
509     uint8_t err;
510     uint8_t addr;
511     uint16_t val;
512     uint16_t rw_flag;//0:write, 1:read
513 };
514
515 struct fm_em_parm {
516         uint16_t group_idx;
517         uint16_t item_idx;
518         uint32_t item_value;    
519 };
520 #endif // __FM_H__