diff options
author | Tai Kuo <taikuo@google.com> | 2022-06-24 15:48:56 +0800 |
---|---|---|
committer | Tai Kuo <taikuo@google.com> | 2022-07-25 16:44:35 +0800 |
commit | 23fd0fffc5ae321966831865e08e106574e11ef9 (patch) | |
tree | e50fc20189234fe97db428aac391f814991f2ab1 | |
parent | 9ef64cbf14e1e7818e3b11e028c5f955f98f4ff2 (diff) | |
download | amplifiers-23fd0fffc5ae321966831865e08e106574e11ef9.tar.gz |
Revert "cs40l26: fix back-to-back OWT effects make OWT malfunction"
This reverts commit 1dcf4405cceab9a3701a9d4f4822628502a5322e.
Bug: 237047104
Test: n/a
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: I1c6c09e30975340b15b446fb3fd671954c886f01
-rw-r--r-- | cs40l26/cs40l26.c | 22 | ||||
-rw-r--r-- | cs40l26/cs40l26.h | 4 |
2 files changed, 0 insertions, 26 deletions
diff --git a/cs40l26/cs40l26.c b/cs40l26/cs40l26.c index 9ac8e87..93fe669 100644 --- a/cs40l26/cs40l26.c +++ b/cs40l26/cs40l26.c @@ -708,7 +708,6 @@ static int cs40l26_handle_mbox_buffer(struct cs40l26_private *cs40l26) switch (val) { case CS40L26_DSP_MBOX_COMPLETE_MBOX: dev_dbg(dev, "Mailbox: COMPLETE_MBOX\n"); - complete_all(&cs40l26->erase_cont); cs40l26_vibe_state_update(cs40l26, CS40L26_VIBE_STATE_EVENT_MBOX_COMPLETE); break; @@ -1944,8 +1943,6 @@ static void cs40l26_vibe_start_worker(struct work_struct *work) if (!cs40l26->vibe_state_reporting) cs40l26_vibe_state_update(cs40l26, CS40L26_VIBE_STATE_EVENT_MBOX_PLAYBACK); - - reinit_completion(&cs40l26->erase_cont); err_mutex: mutex_unlock(&cs40l26->lock); pm_runtime_mark_last_busy(dev); @@ -2960,7 +2957,6 @@ static void cs40l26_erase_worker(struct work_struct *work) struct cs40l26_private, erase_work); int ret = 0; int effect_id; - u16 duration; u32 index; ret = pm_runtime_get_sync(cs40l26->dev); @@ -2971,22 +2967,6 @@ static void cs40l26_erase_worker(struct work_struct *work) effect_id = cs40l26->erase_effect->id; index = cs40l26->trigger_indices[effect_id]; - duration = (cs40l26->erase_effect->replay.length == 0) ? - CS40L26_OWT_DURATION_MS : cs40l26->erase_effect->replay.length; - - /* Check if effect playing is the one to be deleted. */ - if (cs40l26->vibe_state == CS40L26_VIBE_STATE_HAPTIC && - cs40l26->trigger_effect->id == effect_id) { - /* Wait for effect to complete. */ - mutex_unlock(&cs40l26->lock); - if (!wait_for_completion_timeout(&cs40l26->erase_cont, - msecs_to_jiffies(duration + CS40L26_ERASE_WAIT_MS))) { - dev_err(cs40l26->dev, "Failed to erase effect in-flight\n"); - ret = -ETIME; - goto pm_err; - } - mutex_lock(&cs40l26->lock); - } dev_dbg(cs40l26->dev, "%s: effect ID = %d\n", __func__, effect_id); @@ -3012,7 +2992,6 @@ static void cs40l26_erase_worker(struct work_struct *work) out_mutex: mutex_unlock(&cs40l26->lock); -pm_err: pm_runtime_mark_last_busy(cs40l26->dev); pm_runtime_put_autosuspend(cs40l26->dev); @@ -4819,7 +4798,6 @@ int cs40l26_probe(struct cs40l26_private *cs40l26, cs40l26->pm_ready = false; init_completion(&cs40l26->i2s_cont); - init_completion(&cs40l26->erase_cont); if (!cs40l26->fw_defer) { ret = cs40l26_fw_upload(cs40l26); diff --git a/cs40l26/cs40l26.h b/cs40l26/cs40l26.h index 463afef..639c309 100644 --- a/cs40l26/cs40l26.h +++ b/cs40l26/cs40l26.h @@ -927,9 +927,6 @@ #define CS40L26_AMP_VOL_PCM_MAX 0x07FF -#define CS40L26_ERASE_WAIT_MS 500 -#define CS40L26_OWT_DURATION_MS 10000 - /* GPI Triggering */ #define CS40L26_GPIO1 1 #define CS40L26_EVENT_MAP_INDEX_MASK GENMASK(8, 0) @@ -1516,7 +1513,6 @@ struct cs40l26_private { bool comp_enable_redc; bool comp_enable_f0; struct completion i2s_cont; - struct completion erase_cont; u8 vpbr_thld; }; |