[alsa-devel] [PATCH v2 5/9] ASoC: Intel: Skylake: Add topology core init and handlers
Liam Girdwood
liam.r.girdwood at linux.intel.com
Fri Sep 18 11:55:57 CEST 2015
On Mon, 2015-08-17 at 22:56 +0530, Vinod Koul wrote:
> From: Jeeja KP <jeeja.kp at intel.com>
>
> The SKL driver does not code DSP topology in driver. It uses the
> newly added ASoC topology core to parse the topology information
> (controls, widgets and map) from topology binary.
> Each topology element passed private data which contains
> information that driver used to identify the module instance
> within firmware and send IPCs for that module to DSP firmware
> along with parameters.
> This patch adds init routine to invoke topology load and callback
> for topology creation.
>
> Signed-off-by: Jeeja KP <jeeja.kp at intel.com>
> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty at intel.com>
> Signed-off-by: Vinod Koul <vinod.koul at intel.com>
> ---
> +
> +/*
> + * SKL topology init routine
> + */
> +int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
> +{
> + int ret;
> + const struct firmware *fw;
> + struct hdac_bus *bus = ebus_to_hbus(ebus);
> + struct skl *skl = ebus_to_skl(ebus);
> +
> + ret = request_firmware(&fw, "dfw_sst.bin", bus->dev);
> + if (ret < 0) {
> + dev_err(bus->dev, "config firmware request failed with %d\n", ret);
It would be good to say what file name we are failing with here.
> + return ret;
> + }
> +
> + /*
> + * The complete tplg for SKL is loaded as index 0, we don't use
> + * any other index
> + */
> + ret = snd_soc_tplg_component_load(&platform->component, &skl_tplg_ops, fw, 0);
> + if (ret < 0) {
> + dev_err(bus->dev, "tplg component load failed%d\n", ret);
> + return -EINVAL;
> + }
> +
> + skl->resource.max_mcps = SKL_MAX_MCPS;
> + skl->resource.max_mem = SKL_FW_MAX_MEM;
> +
> + return 0;
> +}
> diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h
> index a50689825bca..b258c90d89f1 100644
> --- a/sound/soc/intel/skylake/skl-tplg-interface.h
> +++ b/sound/soc/intel/skylake/skl-tplg-interface.h
> @@ -19,6 +19,27 @@
> #ifndef __HDA_TPLG_INTERFACE_H__
> #define __HDA_TPLG_INTERFACE_H__
>
> +/* Default types range from 0~12. type can range from 0 to 0xff
> + * SST types start at higher to avoid any overlapping in future */
> +#define SOC_CONTROL_TYPE_HDA_SST_ALGO_PARAMS 200
> +#define SOC_CONTROL_TYPE_HDA_SST_MUX 201
> +#define SOC_CONTROL_TYPE_HDA_SST_MIX 201
> +#define SOC_CONTROL_TYPE_HDA_SST_BYTE 203
These are lower than 0xff
Liam
More information about the Alsa-devel
mailing list