Loading sound/soc/codecs/cs35l56.c +16 −3 Original line number Diff line number Diff line Loading @@ -656,7 +656,7 @@ static void cs35l56_secure_patch(struct cs35l56_private *cs35l56) int ret; /* Use wm_adsp to load and apply the firmware patch and coefficient files */ ret = wm_adsp_power_up(&cs35l56->dsp); ret = wm_adsp_power_up(&cs35l56->dsp, true); if (ret) dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, ret); else Loading @@ -665,8 +665,17 @@ static void cs35l56_secure_patch(struct cs35l56_private *cs35l56) static void cs35l56_patch(struct cs35l56_private *cs35l56) { unsigned int firmware_missing; int ret; ret = regmap_read(cs35l56->base.regmap, CS35L56_PROTECTION_STATUS, &firmware_missing); if (ret) { dev_err(cs35l56->base.dev, "Failed to read PROTECTION_STATUS: %d\n", ret); return; } firmware_missing &= CS35L56_FIRMWARE_MISSING; /* * Disable SoundWire interrupts to prevent race with IRQ work. * Setting sdw_irq_no_unmask prevents the handler re-enabling Loading @@ -685,8 +694,12 @@ static void cs35l56_patch(struct cs35l56_private *cs35l56) if (ret) goto err; /* Use wm_adsp to load and apply the firmware patch and coefficient files */ ret = wm_adsp_power_up(&cs35l56->dsp); /* * Use wm_adsp to load and apply the firmware patch and coefficient files, * but only if firmware is missing. If firmware is already patched just * power-up wm_adsp without downloading firmware. */ ret = wm_adsp_power_up(&cs35l56->dsp, !!firmware_missing); if (ret) { dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, ret); goto err; Loading sound/soc/codecs/wm_adsp.c +9 −7 Original line number Diff line number Diff line Loading @@ -998,7 +998,7 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL_GPL(wm_adsp2_preloader_put); int wm_adsp_power_up(struct wm_adsp *dsp) int wm_adsp_power_up(struct wm_adsp *dsp, bool load_firmware) { int ret = 0; char *wmfw_filename = NULL; Loading @@ -1006,11 +1006,13 @@ int wm_adsp_power_up(struct wm_adsp *dsp) char *coeff_filename = NULL; const struct firmware *coeff_firmware = NULL; if (load_firmware) { ret = wm_adsp_request_firmware_files(dsp, &wmfw_firmware, &wmfw_filename, &coeff_firmware, &coeff_filename); if (ret) return ret; } ret = cs_dsp_power_up(&dsp->cs_dsp, wmfw_firmware, wmfw_filename, Loading @@ -1037,7 +1039,7 @@ static void wm_adsp_boot_work(struct work_struct *work) struct wm_adsp, boot_work); wm_adsp_power_up(dsp); wm_adsp_power_up(dsp, true); } int wm_adsp_early_event(struct snd_soc_dapm_widget *w, Loading sound/soc/codecs/wm_adsp.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w, int wm_adsp_early_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event); int wm_adsp_power_up(struct wm_adsp *dsp); int wm_adsp_power_up(struct wm_adsp *dsp, bool load_firmware); void wm_adsp_power_down(struct wm_adsp *dsp); irqreturn_t wm_adsp2_bus_error(int irq, void *data); Loading Loading
sound/soc/codecs/cs35l56.c +16 −3 Original line number Diff line number Diff line Loading @@ -656,7 +656,7 @@ static void cs35l56_secure_patch(struct cs35l56_private *cs35l56) int ret; /* Use wm_adsp to load and apply the firmware patch and coefficient files */ ret = wm_adsp_power_up(&cs35l56->dsp); ret = wm_adsp_power_up(&cs35l56->dsp, true); if (ret) dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, ret); else Loading @@ -665,8 +665,17 @@ static void cs35l56_secure_patch(struct cs35l56_private *cs35l56) static void cs35l56_patch(struct cs35l56_private *cs35l56) { unsigned int firmware_missing; int ret; ret = regmap_read(cs35l56->base.regmap, CS35L56_PROTECTION_STATUS, &firmware_missing); if (ret) { dev_err(cs35l56->base.dev, "Failed to read PROTECTION_STATUS: %d\n", ret); return; } firmware_missing &= CS35L56_FIRMWARE_MISSING; /* * Disable SoundWire interrupts to prevent race with IRQ work. * Setting sdw_irq_no_unmask prevents the handler re-enabling Loading @@ -685,8 +694,12 @@ static void cs35l56_patch(struct cs35l56_private *cs35l56) if (ret) goto err; /* Use wm_adsp to load and apply the firmware patch and coefficient files */ ret = wm_adsp_power_up(&cs35l56->dsp); /* * Use wm_adsp to load and apply the firmware patch and coefficient files, * but only if firmware is missing. If firmware is already patched just * power-up wm_adsp without downloading firmware. */ ret = wm_adsp_power_up(&cs35l56->dsp, !!firmware_missing); if (ret) { dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, ret); goto err; Loading
sound/soc/codecs/wm_adsp.c +9 −7 Original line number Diff line number Diff line Loading @@ -998,7 +998,7 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL_GPL(wm_adsp2_preloader_put); int wm_adsp_power_up(struct wm_adsp *dsp) int wm_adsp_power_up(struct wm_adsp *dsp, bool load_firmware) { int ret = 0; char *wmfw_filename = NULL; Loading @@ -1006,11 +1006,13 @@ int wm_adsp_power_up(struct wm_adsp *dsp) char *coeff_filename = NULL; const struct firmware *coeff_firmware = NULL; if (load_firmware) { ret = wm_adsp_request_firmware_files(dsp, &wmfw_firmware, &wmfw_filename, &coeff_firmware, &coeff_filename); if (ret) return ret; } ret = cs_dsp_power_up(&dsp->cs_dsp, wmfw_firmware, wmfw_filename, Loading @@ -1037,7 +1039,7 @@ static void wm_adsp_boot_work(struct work_struct *work) struct wm_adsp, boot_work); wm_adsp_power_up(dsp); wm_adsp_power_up(dsp, true); } int wm_adsp_early_event(struct snd_soc_dapm_widget *w, Loading
sound/soc/codecs/wm_adsp.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w, int wm_adsp_early_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event); int wm_adsp_power_up(struct wm_adsp *dsp); int wm_adsp_power_up(struct wm_adsp *dsp, bool load_firmware); void wm_adsp_power_down(struct wm_adsp *dsp); irqreturn_t wm_adsp2_bus_error(int irq, void *data); Loading