blob: 5d6bf108e91e027f9e3d6748453e0c7cdfdbcaa7 (
plain)
1
2
3
4
5
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/*
* linux/sound/cs35l41.h -- Platform data for CS35L41
*
* Copyright (c) 2016 Cirrus Logic Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __CS35L41_H
#define __CS35L41_H
#include <sound/soc.h>
struct classh_cfg {
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_delay;
int classh_wk_fet_thld;
};
struct cs35l41_irq_cfg {
bool is_present;
bool irq_pol_inv;
bool irq_out_en;
int irq_src_sel;
};
struct cs35l41_platform_data {
bool sclk_frc;
bool lrclk_frc;
bool right_channel;
bool amp_gain_zc;
bool dsp_ng_enable;
bool inv_pcm;
bool use_fsync_errata;
int bst_ind;
int bst_vctrl;
int bst_ipk;
int temp_warn_thld;
int dsp_ng_pcm_thld;
int dsp_ng_delay;
int dout_hiz;
unsigned int hw_ng_sel;
unsigned int hw_ng_delay;
unsigned int hw_ng_thld;
unsigned int fixed_rate;
unsigned int fixed_width;
unsigned int fixed_wl;
bool fixed_params;
const char *dsp_part_name;
const char *mfd_suffix;
struct cs35l41_irq_cfg irq_config1;
struct cs35l41_irq_cfg irq_config2;
struct classh_cfg classh_config;
};
struct cs35l41_private {
struct wm_adsp dsp; /* needs to be first member */
struct snd_soc_codec *codec;
struct cs35l41_platform_data pdata;
struct device *dev;
struct regmap *regmap;
struct regulator_bulk_data supplies[2];
int num_supplies;
int irq;
int clksrc;
int extclk_freq;
int extclk_cfg;
int sclk;
int amp_mute;
int pcm_vol;
int pcm_active;
int dsprx2_src;
int lrclk_fmt;
int sclk_fmt;
int pcm_source_last;
int pll_freq_last;
unsigned int spk_3_trim;
unsigned int spk_4_trim;
bool dspa_mode;
bool i2s_mode;
bool swire_mode;
bool halo_booted;
bool halo_routed;
bool halo_played;
/* GPIO for /RST */
struct gpio_desc *reset_gpio;
struct completion global_pup_done;
struct completion global_pdn_done;
struct completion mbox_cmd;
struct mutex rate_lock;
};
int cs35l41_reinit(struct snd_soc_component *component);
int cs35l41_probe(struct cs35l41_private *cs35l41);
int cs35l41_remove(struct cs35l41_private *cs35l41);
#endif /* __CS35L41_H */
|