Commit d0a3a6ad authored by Simon Trimmer's avatar Simon Trimmer Committed by Mark Brown

ASoC: wm_adsp: Expose the DSP power down actions as wm_adsp_power_down()

To support self-booting DSPs that operate outside of a conventional DAPM
event life cycle expose a companion function to wm_adsp_power_up() so
that the correct state of the DSP firmware and controls can be recorded.
Signed-off-by: default avatarSimon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230808164702.21272-5-rf@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f5eb9503
...@@ -1025,6 +1025,12 @@ int wm_adsp_power_up(struct wm_adsp *dsp) ...@@ -1025,6 +1025,12 @@ int wm_adsp_power_up(struct wm_adsp *dsp)
} }
EXPORT_SYMBOL_GPL(wm_adsp_power_up); EXPORT_SYMBOL_GPL(wm_adsp_power_up);
void wm_adsp_power_down(struct wm_adsp *dsp)
{
cs_dsp_power_down(&dsp->cs_dsp);
}
EXPORT_SYMBOL_GPL(wm_adsp_power_down);
static void wm_adsp_boot_work(struct work_struct *work) static void wm_adsp_boot_work(struct work_struct *work)
{ {
struct wm_adsp *dsp = container_of(work, struct wm_adsp *dsp = container_of(work,
...@@ -1046,7 +1052,7 @@ int wm_adsp_early_event(struct snd_soc_dapm_widget *w, ...@@ -1046,7 +1052,7 @@ int wm_adsp_early_event(struct snd_soc_dapm_widget *w,
queue_work(system_unbound_wq, &dsp->boot_work); queue_work(system_unbound_wq, &dsp->boot_work);
break; break;
case SND_SOC_DAPM_PRE_PMD: case SND_SOC_DAPM_PRE_PMD:
cs_dsp_power_down(&dsp->cs_dsp); wm_adsp_power_down(dsp);
break; break;
default: default:
break; break;
......
...@@ -92,6 +92,7 @@ int wm_adsp_early_event(struct snd_soc_dapm_widget *w, ...@@ -92,6 +92,7 @@ int wm_adsp_early_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event); struct snd_kcontrol *kcontrol, int event);
int wm_adsp_power_up(struct wm_adsp *dsp); int wm_adsp_power_up(struct wm_adsp *dsp);
void wm_adsp_power_down(struct wm_adsp *dsp);
irqreturn_t wm_adsp2_bus_error(int irq, void *data); irqreturn_t wm_adsp2_bus_error(int irq, void *data);
irqreturn_t wm_halo_bus_error(int irq, void *data); irqreturn_t wm_halo_bus_error(int irq, void *data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment