Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * linux/sound/cs35l35.h -- Platform data for CS35l35
0004  *
0005  * Copyright (c) 2016 Cirrus Logic Inc.
0006  */
0007 
0008 #ifndef __CS35L35_H
0009 #define __CS35L35_H
0010 
0011 struct classh_cfg {
0012     /*
0013      * Class H Algorithm Control Variables
0014      * You can either have it done
0015      * automatically or you can adjust
0016      * these variables for tuning
0017      *
0018      * if you do not enable the internal algorithm
0019      * you will get a set of mixer controls for
0020      * Class H tuning
0021      *
0022      * Section 4.3 of the datasheet
0023      */
0024     bool classh_bst_override;
0025     bool classh_algo_enable;
0026     int classh_bst_max_limit;
0027     int classh_mem_depth;
0028     int classh_release_rate;
0029     int classh_headroom;
0030     int classh_wk_fet_disable;
0031     int classh_wk_fet_delay;
0032     int classh_wk_fet_thld;
0033     int classh_vpch_auto;
0034     int classh_vpch_rate;
0035     int classh_vpch_man;
0036 };
0037 
0038 struct monitor_cfg {
0039     /*
0040      * Signal Monitor Data
0041      * highly configurable signal monitoring
0042      * data positioning and different types of
0043      * monitoring data.
0044      *
0045      * Section 4.8.2 - 4.8.4 of the datasheet
0046      */
0047     bool is_present;
0048     bool imon_specs;
0049     bool vmon_specs;
0050     bool vpmon_specs;
0051     bool vbstmon_specs;
0052     bool vpbrstat_specs;
0053     bool zerofill_specs;
0054     u8 imon_dpth;
0055     u8 imon_loc;
0056     u8 imon_frm;
0057     u8 imon_scale;
0058     u8 vmon_dpth;
0059     u8 vmon_loc;
0060     u8 vmon_frm;
0061     u8 vpmon_dpth;
0062     u8 vpmon_loc;
0063     u8 vpmon_frm;
0064     u8 vbstmon_dpth;
0065     u8 vbstmon_loc;
0066     u8 vbstmon_frm;
0067     u8 vpbrstat_dpth;
0068     u8 vpbrstat_loc;
0069     u8 vpbrstat_frm;
0070     u8 zerofill_dpth;
0071     u8 zerofill_loc;
0072     u8 zerofill_frm;
0073 };
0074 
0075 struct cs35l35_platform_data {
0076 
0077     /* Stereo (2 Device) */
0078     bool stereo;
0079     /* serial port drive strength */
0080     int sp_drv_str;
0081     /* serial port drive in unused slots */
0082     int sp_drv_unused;
0083     /* Boost Power Down with FET */
0084     bool bst_pdn_fet_on;
0085     /* Boost Voltage : used if ClassH Algo Enabled */
0086     int bst_vctl;
0087     /* Boost Converter Peak Current CTRL */
0088     int bst_ipk;
0089     /* Amp Gain Zero Cross */
0090     bool gain_zc;
0091     /* Audio Input Location */
0092     int aud_channel;
0093     /* Advisory Input Location */
0094     int adv_channel;
0095     /* Shared Boost for stereo */
0096     bool shared_bst;
0097     /* Specifies this amp is using an external boost supply */
0098     bool ext_bst;
0099     /* Inductor Value */
0100     int boost_ind;
0101     /* ClassH Algorithm */
0102     struct classh_cfg classh_algo;
0103     /* Monitor Config */
0104     struct monitor_cfg mon_cfg;
0105 };
0106 
0107 #endif /* __CS35L35_H */