diff options
author | chasewu <chasewu@google.com> | 2021-06-18 14:10:12 +0800 |
---|---|---|
committer | chasewu <chasewu@google.com> | 2021-06-22 10:32:11 +0800 |
commit | 3f26a716826ce7ff2659e133b8f4adfb79ab72bd (patch) | |
tree | 23fc2ce109deeb7ab2b63fcece8e97b69e442baa | |
parent | b5f493d4757edacf7c94f9eff212a40e54b5d082 (diff) | |
download | amplifiers-3f26a716826ce7ff2659e133b8f4adfb79ab72bd.tar.gz |
cs40l25: Add new wavetable PWLE structure
To prepare for more refactoring add a new datastructure to hold type 12
piecewise linear envelope waveforms.
Bug: 191278456
Test: local sanity checking PWLE commands
Change-Id: I80ad58b23dc6592246214571eeef07d36815c4bb
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: chasewu <chasewu@google.com>
-rw-r--r-- | cs40l25/include/linux/mfd/cs40l25-wavetable.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cs40l25/include/linux/mfd/cs40l25-wavetable.h b/cs40l25/include/linux/mfd/cs40l25-wavetable.h index f84d4ec..2b35db3 100644 --- a/cs40l25/include/linux/mfd/cs40l25-wavetable.h +++ b/cs40l25/include/linux/mfd/cs40l25-wavetable.h @@ -37,4 +37,25 @@ struct wt_type10_comp { struct wt_type10_comp_section sections[WT_MAX_SECTIONS]; }; +#define WT_T12_FLAG_CHIRP BIT(7) +#define WT_T12_FLAG_BRAKE BIT(6) +#define WT_T12_FLAG_AMP_REG BIT(5) + +struct wt_type12_pwle_section { + u16 time; + u16 level; + u16 frequency; + u8 flags; + u32 vbtarget; +}; + +struct wt_type12_pwle { + u32 wlength; + u8 repeat; + u16 wait; + u8 nsections; + + struct wt_type12_pwle_section sections[WT_MAX_SECTIONS]; +}; + #endif |