Home | History | Annotate | Download | only in mfd
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __LINUX_MFD_MSM_ADIE_CODEC_H
     20 #define __LINUX_MFD_MSM_ADIE_CODEC_H
     21 #include <linux/types.h>
     22 #define ADIE_CODEC_ACTION_ENTRY 0x1
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define ADIE_CODEC_ACTION_DELAY_WAIT 0x2
     25 #define ADIE_CODEC_ACTION_STAGE_REACHED 0x3
     26 #define ADIE_CODEC_PATH_OFF 0x0050
     27 #define ADIE_CODEC_DIGITAL_READY 0x0100
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define ADIE_CODEC_DIGITAL_ANALOG_READY 0x1000
     30 #define ADIE_CODEC_ANALOG_OFF 0x0750
     31 #define ADIE_CODEC_DIGITAL_OFF 0x0600
     32 #define ADIE_CODEC_FLASH_IMAGE 0x0001
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define ADIE_CODEC_RX 0
     35 #define ADIE_CODEC_TX 1
     36 #define ADIE_CODEC_LB 3
     37 #define ADIE_CODEC_MAX 4
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define ADIE_CODEC_PACK_ENTRY(reg, mask, val) ((val)|(mask << 8)|(reg << 16))
     40 #define ADIE_CODEC_UNPACK_ENTRY(packed, reg, mask, val)   do {   ((reg) = ((packed >> 16) & (0xff)));   ((mask) = ((packed >> 8) & (0xff)));   ((val) = ((packed) & (0xff)));   } while (0);
     41 struct adie_codec_action_unit {
     42  u32 type;
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44  u32 action;
     45 };
     46 struct adie_codec_hwsetting_entry{
     47  struct adie_codec_action_unit *actions;
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49  u32 action_sz;
     50  u32 freq_plan;
     51  u32 osr;
     52 };
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 struct adie_codec_dev_profile {
     55  u32 path_type;
     56  u32 setting_sz;
     57  struct adie_codec_hwsetting_entry *settings;
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 };
     60 struct adie_codec_register {
     61  u8 reg;
     62  u8 mask;
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  u8 val;
     65 };
     66 struct adie_codec_register_image {
     67  struct adie_codec_register *regs;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  u32 img_sz;
     70 };
     71 struct adie_codec_path;
     72 struct adie_codec_anc_data {
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74  u32 size;
     75  u32 writes[];
     76 };
     77 struct adie_codec_operations {
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79  int codec_id;
     80  int (*codec_open) (struct adie_codec_dev_profile *profile,
     81  struct adie_codec_path **path_pptr);
     82  int (*codec_close) (struct adie_codec_path *path_ptr);
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84  int (*codec_setpath) (struct adie_codec_path *path_ptr,
     85  u32 freq_plan, u32 osr);
     86  int (*codec_proceed_stage) (struct adie_codec_path *path_ptr,
     87  u32 state);
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89  u32 (*codec_freq_supported) (struct adie_codec_dev_profile *profile,
     90  u32 requested_freq);
     91  int (*codec_enable_sidetone) (struct adie_codec_path *rx_path_ptr,
     92  u32 enable);
     93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     94  int (*codec_enable_anc) (struct adie_codec_path *rx_path_ptr,
     95  u32 enable, struct adie_codec_anc_data *calibration_writes);
     96  int (*codec_set_device_digital_volume) (
     97  struct adie_codec_path *path_ptr,
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99  u32 num_channels,
    100  u32 vol_percentage);
    101  int (*codec_set_device_analog_volume) (struct adie_codec_path *path_ptr,
    102  u32 num_channels,
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104  u32 volume);
    105  int (*codec_set_master_mode) (struct adie_codec_path *path_ptr,
    106  u8 master);
    107 };
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109 #endif
    110 
    111