Skip to contentSkip to conversation

ASoC: SDCA: Add PDE verification reusable helper

PATCH Superseded Niranjan H Y 2 participants 3 messages Apr 30

Subsystems (3)

v13 of 16 Superseded Latest is v16 →

lore
Share & tools
lore
#0 lore raw

PATCH v13 1/4 ASoC: SDCA: Add PDE verification reusable helper

Implement sdca_asoc_pde_ensure_ps() helper function to poll for PDE
power state transitions. Per SDCA specification, after writing REQUESTED_PS, drivers must poll ACTUAL_PS until the target power state is reached.

Changes include:
- Add sdca_asoc_pde_ensure_ps() to handle ACTUAL_PS polling with support for device-specific delay tables or default intervals
- Export function via sdca_asoc.h for use by SDCA-compliant drivers
- Refactor entity_pde_event() in sdca_asoc.c to use the helper

---
v13:
- no change

v12:
- use correct namespace while exporting the variable
- fix missing entity information while logging

v11:
- revert v10 changes
- API is renamed from sdca_asoc_pde_ensure_ps to
sdca_asoc_pde_poll_actual_ps

v10:
- write REQUESTED_PS before checking the target state.
- change the API name sdca_asoc_pde_ensure_ps to sdca_asoc_set_pde_poll_sync

v9:
- newly added interface

---
 include/sound/sdca_asoc.h  |   6 +++
 sound/soc/sdca/sdca_asoc.c | 106 ++++++++++++++++++++++++++-----------
 2 files changed, 82 insertions(+), 30 deletions(-)
include/sound/sdca_asoc.h +6 -0
index 46a61a52d..ca35d5a44 100644
@@ -13,6 +13,7 @@
 struct device;
 struct regmap;
 struct sdca_function_data;
+struct sdca_pde_delay;
 struct snd_ctl_elem_value;
 struct snd_kcontrol;
 struct snd_kcontrol_new;
@@ -99,4 +100,9 @@ int sdca_asoc_q78_put_volsw(struct snd_kcontrol *kcontrol,
 			    struct snd_ctl_elem_value *ucontrol);
 int sdca_asoc_q78_get_volsw(struct snd_kcontrol *kcontrol,
 			    struct snd_ctl_elem_value *ucontrol);
+int sdca_asoc_pde_poll_actual_ps(struct device *dev, struct regmap *regmap,
+				 int function_id, int entity_id,
+			    int from_ps, int to_ps,
+			    const struct sdca_pde_delay *pde_delays,
+			    int num_delays);
 #endif // __SDCA_ASOC_H__
sound/soc/sdca/sdca_asoc.c +76 -30

124 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 4 lines · Niranjan H Y

Implement sdca_asoc_pde_ensure_ps() helper function to poll for PDE
power state transitions. Per SDCA specification, after writing REQUESTED_PS, drivers must poll ACTUAL_PS until the target power state is reached.

You've not copied me on the rest of the series so I don't know what's going on with dependencies. When sending a patch series it is important to ensure that all the various maintainers understand what the relationship between the patches as the expecation is that there will be interdependencies. Either copy everyone on the whole series or at least copy them on the cover letter and explain what's going on. If there are no strong interdependencies then it's generally simplest to just send the patches separately to avoid any possible confusion.

#2 lore raw
Quoted 8 lines · Mark Brown

Subject: Re: [PATCH v13 1/4] ASoC: SDCA: Add PDE verification reusable helper

Quoted 4 lines · Niranjan H Y

Implement sdca_asoc_pde_ensure_ps() helper function to poll for PDE
power state transitions. Per SDCA specification, after writing REQUESTED_PS, drivers must poll ACTUAL_PS until the target power state is reached.

Quoted 8 lines

You've not copied me on the rest of the series so I don't know what's going on with dependencies. When sending a patch series it is important to ensure that all the various maintainers understand what the relationship between the patches as the expecation is that there will be interdependencies. Either copy everyone on the whole series or at least copy them on the cover letter and explain what's going on. If there are no strong interdependencies then it's generally simplest to just send the patches separately to avoid any possible confusion.

My apologies, I am yet to send the rest of the series. Accidentally sent this alone. Next time I will send all the patches at once.

Sorry for the inconvenience.

Regards
Niranjan