Blame view

include/sound/cs35l35.h 2.21 KB
d2912cb15   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-only */
6387f866a   Brian Austin   ASoC: Add support...
2
3
4
5
  /*
   * linux/sound/cs35l35.h -- Platform data for CS35l35
   *
   * Copyright (c) 2016 Cirrus Logic Inc.
6387f866a   Brian Austin   ASoC: Add support...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
   */
  
  #ifndef __CS35L35_H
  #define __CS35L35_H
  
  struct classh_cfg {
  	/*
  	 * Class H Algorithm Control Variables
  	 * You can either have it done
  	 * automatically or you can adjust
  	 * these variables for tuning
  	 *
  	 * if you do not enable the internal algorithm
  	 * you will get a set of mixer controls for
  	 * Class H tuning
  	 *
  	 * Section 4.3 of the datasheet
  	 */
  	bool classh_bst_override;
  	bool classh_algo_enable;
  	int classh_bst_max_limit;
  	int classh_mem_depth;
  	int classh_release_rate;
  	int classh_headroom;
  	int classh_wk_fet_disable;
  	int classh_wk_fet_delay;
  	int classh_wk_fet_thld;
  	int classh_vpch_auto;
  	int classh_vpch_rate;
  	int classh_vpch_man;
  };
  
  struct monitor_cfg {
  	/*
  	 * Signal Monitor Data
  	 * highly configurable signal monitoring
  	 * data positioning and different types of
  	 * monitoring data.
  	 *
  	 * Section 4.8.2 - 4.8.4 of the datasheet
  	 */
  	bool is_present;
  	bool imon_specs;
  	bool vmon_specs;
  	bool vpmon_specs;
  	bool vbstmon_specs;
  	bool vpbrstat_specs;
  	bool zerofill_specs;
  	u8 imon_dpth;
  	u8 imon_loc;
  	u8 imon_frm;
06bdf385f   Charles Keepax   ASoC: cs35l35: Al...
57
  	u8 imon_scale;
6387f866a   Brian Austin   ASoC: Add support...
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  	u8 vmon_dpth;
  	u8 vmon_loc;
  	u8 vmon_frm;
  	u8 vpmon_dpth;
  	u8 vpmon_loc;
  	u8 vpmon_frm;
  	u8 vbstmon_dpth;
  	u8 vbstmon_loc;
  	u8 vbstmon_frm;
  	u8 vpbrstat_dpth;
  	u8 vpbrstat_loc;
  	u8 vpbrstat_frm;
  	u8 zerofill_dpth;
  	u8 zerofill_loc;
  	u8 zerofill_frm;
  };
  
  struct cs35l35_platform_data {
  
  	/* Stereo (2 Device) */
  	bool stereo;
  	/* serial port drive strength */
  	int sp_drv_str;
8d45f2d23   Charles Keepax   ASoC: cs35l35: Ad...
81
82
  	/* serial port drive in unused slots */
  	int sp_drv_unused;
6387f866a   Brian Austin   ASoC: Add support...
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  	/* Boost Power Down with FET */
  	bool bst_pdn_fet_on;
  	/* Boost Voltage : used if ClassH Algo Enabled */
  	int bst_vctl;
  	/* Boost Converter Peak Current CTRL */
  	int bst_ipk;
  	/* Amp Gain Zero Cross */
  	bool gain_zc;
  	/* Audio Input Location */
  	int aud_channel;
  	/* Advisory Input Location */
  	int adv_channel;
  	/* Shared Boost for stereo */
  	bool shared_bst;
77b329d19   Charles Keepax   ASoC: cs35l35: Co...
97
98
  	/* Specifies this amp is using an external boost supply */
  	bool ext_bst;
b7c752d68   Brian Austin   ASoC: cs35l35: Ad...
99
100
  	/* Inductor Value */
  	int boost_ind;
6387f866a   Brian Austin   ASoC: Add support...
101
102
103
104
105
106
107
  	/* ClassH Algorithm */
  	struct classh_cfg classh_algo;
  	/* Monitor Config */
  	struct monitor_cfg mon_cfg;
  };
  
  #endif /* __CS35L35_H */