diff options
author | chasewu <chasewu@google.com> | 2022-03-28 23:52:57 +0800 |
---|---|---|
committer | Chase Wu <chasewu@google.com> | 2022-03-29 07:00:27 +0000 |
commit | 78786abe58e4aefa7c8e8d39acb4f831e639dd86 (patch) | |
tree | a3a24f2314bd2bf8cf5ac2635afaa73a81ea93fc | |
parent | cd1ebb608dce6155a1fb9641a73d818d4b1b874f (diff) | |
download | amplifiers-78786abe58e4aefa7c8e8d39acb4f831e639dd86.tar.gz |
cs40l25: update cirrus's latest updateandroid-t-beta-2_r0.4android-gs-raviole-5.10-t-beta-2
3020ec719047 misc: cs40l25: Change max size of PWLE string
Add in the PWLE extended frequency flag for use cases where
the frequency is at a range of 0.25Hz to 1023.75Hz.
3ab02c8e6360 misc: cs40l25: Change start i2s to an ack write
Change write I2S start to an ack write so we can poll the
status of the mailbox to ensure that the command has completed.
Bug: 225008325
Test: HW check the output waveform
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I46892d55647cfee58a742ae447245edf0e6bda4f
-rw-r--r-- | cs40l25/cs40l2x.c | 10 | ||||
-rw-r--r-- | cs40l25/include/linux/mfd/cs40l25-wavetable.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cs40l25/cs40l2x.c b/cs40l25/cs40l2x.c index a6d34c4..c4dadf5 100644 --- a/cs40l25/cs40l2x.c +++ b/cs40l25/cs40l2x.c @@ -1879,10 +1879,12 @@ static int cs40l2x_pwle_frequency_entry(struct cs40l2x_private *cs40l2x, return ret; } - if (cs40l2x->ext_freq_min_fw) + if (cs40l2x->ext_freq_min_fw) { section->frequency = (val / (1000 / 4)); - else + section->flags |= WT_T12_FLAG_EXT_FREQ; + } else { section->frequency = (val / (1000 / 8)) - 400; + } return ret; } @@ -6900,8 +6902,8 @@ static void cs40l2x_vibe_mode_worker(struct work_struct *work) if (ret) goto err_exit; - ret = regmap_write(regmap, CS40L2X_DSP_VIRT1_MBOX_5, - CS40L2X_A2H_I2S_START); + ret = cs40l2x_ack_write(cs40l2x, CS40L2X_MBOX_USER_CONTROL, + CS40L2X_A2H_I2S_START, CS40L2X_USER_CTRL_SUCCESS); if (ret) goto err_exit; diff --git a/cs40l25/include/linux/mfd/cs40l25-wavetable.h b/cs40l25/include/linux/mfd/cs40l25-wavetable.h index 2b35db3..ee8b029 100644 --- a/cs40l25/include/linux/mfd/cs40l25-wavetable.h +++ b/cs40l25/include/linux/mfd/cs40l25-wavetable.h @@ -40,6 +40,7 @@ struct wt_type10_comp { #define WT_T12_FLAG_CHIRP BIT(7) #define WT_T12_FLAG_BRAKE BIT(6) #define WT_T12_FLAG_AMP_REG BIT(5) +#define WT_T12_FLAG_EXT_FREQ BIT(4) struct wt_type12_pwle_section { u16 time; |