[alsa-devel] [PATCH v2 1/2] ASoC: Intel: bxtn: Store the FW/Library context at boot

Liam Girdwood liam.r.girdwood at linux.intel.com
Thu Jan 12 09:11:21 CET 2017


On Thu, 2017-01-12 at 09:54 +0530, jeeja.kp at intel.com wrote:
> From: Jeeja KP <jeeja.kp at intel.com>
> 
> Store the DSP firmware/library at boot, so that for S3 to S0 transition
> use the stored ctx for downloading the firmware to DSP memory.
> 
> Signed-off-by: Jeeja KP <jeeja.kp at intel.com>
> ---
>  sound/soc/intel/skylake/bxt-sst.c | 55 +++++++++++++++++++++++++--------------
>  1 file changed, 36 insertions(+), 19 deletions(-)
> 
> diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c
> index 15a063a..7762d5a 100644
> --- a/sound/soc/intel/skylake/bxt-sst.c
> +++ b/sound/soc/intel/skylake/bxt-sst.c
> @@ -50,33 +50,47 @@ static unsigned int bxt_get_errorcode(struct sst_dsp *ctx)
>  	 return sst_dsp_shim_read(ctx, BXT_ADSP_ERROR_CODE);
>  }
>  
> +static void sst_bxt_release_library(struct skl_lib_info *linfo, int lib_count)
> +{
> +	int i;
> +
> +	for (i = 1; i < lib_count; i++) {

It probably makes sense to replace 1 with a macro here to indicate the
first non base FW ID number. This can be done in other places too to
make the  code more readable for library management.

Liam




More information about the Alsa-devel mailing list