aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-messages.c
AgeCommit message (Collapse)Author
2018-04-12ASoC: Intel: Skylake: Disable clock gating during firmware and library downloadPardha Saradhi K
[ Upstream commit d5cc0a1fcbb5ddbef9fdd4c4a978da3254ddbf37 ] During firmware and library download, sometimes it is observed that firmware and library download is timed-out resulting into probe failure. This patch disables dynamic clock gating while firmware and library download. Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com> Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-10Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2017-11-08ASoC: Intel: Skylake: Add channel map in updown mixer module IPCGuneshwor Singh
DSP expects channel map to be sent in the IPC for updown mixer module. So add ch_map info in updown mixer module config. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-08ASoC: Intel: Skylake: Fix updown mixer module formatGuneshwor Singh
DSP expects length of the coefficient for updown mixer module to be 8. So fix the max coefficient length and since we are using default values for coefficient select which is zero, we need not explicitly initialize it. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-09ASoC: Intel: Skylake: Modify skl_dsp_set_dma_control API argumentsJaikrishna Nemallapudi
Set dma control ipc can be used to set the M/N divider, enable the clks. It takes different payload for different configuration. So modify the skl_dsp_set_dma_control API to take the size and node_id as argument. Signed-off-by: Jaikrishna Nemallapudi <jaikrishnax.nemallapudi@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-01ASoC: Intel: Skylake: Add IPC to configure the copier secondary pinsPradeep Tewani
Copier can support upto 4 output pins. However, only pin 0 is configured as a part of copier initialization. Configuring rest of pins require the separate IPC to be sent to fw. Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-25ASoC: Intel: Skylake: Parse and update module config structureRamesh Babu
A dsp path and the modules in the path can support various pcm configurations. The list of supported pcm configurations from topology manifest would be stored and later selected runtime based on the hw pcm params. For legacy, module data is filled in the 0th index of resource and interface table. To accommodate both models, change the relevant structures and populate them by parsing newly defined tokens. This change is backward compatible with the existing model where driver computes the resources required by each dsp module. Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23ASoC: Intel: Skylake: Fix uninitialized returnSubhransu S. Prusty
On failure to get dsp_ops, dsp_init returns error without assigning ret. ret is assigned in code path which will never be executed. Fix it. Fixes: f77d443c4c29 ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure" Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23ASoC: Intel: Skylake: Fix to free resources for dsp_init failureSubhransu S. Prusty
unmap mmio and free memory resources if dsp_init fails. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03ASoC: Intel: cnl: add dsp ops for cannonlakeGuneshwor Singh
Add cannonlake dsp support by adding its dsp_ops. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03ASoC: Intel: Skylake: Use num_core to allocate instead of macroGuneshwor Singh
For different platforms, number of dsp cores can vary. So instead of creating array of size SKL_DSP_CORES_MAX, use num_core in dsp_ops() of the respective platform to allocate core usage counts and states. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03ASoC: Intel: Skylake: Add num of cores in dsp opsDharageswari R
Number of dsp cores may differ for different platforms hence adding it in dsp ops. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17ASoC: Intel: Skylake: fix type in debug messageColin Ian King
Trivial fix to typo in debug message, dst_instacne should be dst_instance Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-10ASoC: Intel: Skylake: Fix default dma_buffer_sizeSubhransu S. Prusty
If the dma_buffer_size is not defined in topology, fix it to 2ms default value to make backward compatible. Fixes: f6e6ab1d16ec ("ASoC: Intel: Skylake: Fix dma buffer size calculation") Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-19ASoC: Intel: Skylake: Fix dma buffer size calculationRamesh Babu
DMA buffer size for gateway copier will be calculated based on: For host DMA copier: Input buffer size (ibs) for output direction (playback) Output buffer size (obs) for input direction (capture) For link DMA copier: IBS for input direction (capture) OBS for output direction (playback) Update the driver to use the above. Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: Intel: Skylake: Add mic-select module typeDharageswari R
mic-select module is a DSP module, which is used to select one or more input channels. This patch adds mic-select module type. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26ASoC: Intel: Skylake: Register dsp_fw_ops for kabylakeSubhransu S. Prusty
For audio kabylake is same as skylake except the module load approach. This patch registers different dsp_fw_ops for kabylake and next patch adds the module load support for kabylake. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-29ASoC: Intel: Skylake: Fix module state after unbind and deleteJeeja KP
When DSP module is unbound, the module state needs to be in INIT_DONE state instead of UNINT. Also the state needs to be set to UNINIT after module is deleted from DSP pipeline. So, set the module state to INIT_DONE after unbind and then UNINIT after module is deleted. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15ASoC: Intel: Skylake: Remove get dsp_ops in cleanup routineG Kranthi
dsp ops is already set in init, so use this in cleanup routine instead of again retrieving it. Also constify struct skl_dsp_ops. Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15ASoC: Intel: Skylake: Disable notifications at boot after DSP FW initG Kranthi
DSP firmware sends notification every 1ms, which is disabled in runtime suspend. But if a system has no runtime pm, we keep getting notification, so disable after FW init as well. Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15ASoC: Intel: Skylake: Fix to delete DSP pipe after stopping pipeJeeja KP
DSP pipe needs to stopped before deleting the pipe. Currently check is for pipe state > STARTED, which is incorrect. So changed to include pipe state STARTED to stop the pipe if it started. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Add Geminlake IDsVinod Koul
Geminilake is next gen SoC, so add the IDs for Geminilake. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-25ASoC: Intel: Skylake: Don't use dma I2S config structure in kernelGuruprasadX Pawse
I2S blob config structure can change between DSP copier module versions. We are not modifying these structures anyway and NHLT blobs specify them properly, so use the blob directly to send the dma_control ipc instead of using the predefined I2S blob config structure. Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09ASoC: Intel: Skylake: Flush pending D0i3 request on suspendJayachandran B
While going to suspend, if we have any pending D0i3 work scheduled, flush that and force the DSP to goto D0i3 mode before going to suspend. Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03ASoC: Intel: Skylake: Add support for LPModeVinod Koul
For D0i3, we need to tell DSP to run the pipelines in LP mode. This information is kept in topology and passed to driver as an attribute for pipe. So add a new tuple for lpmode and program the pipe based on value set. Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24ASoC: Intel: Skylake: Update to use instance ids generatedDharageswari R
Post bind parameters of KPB module contains the instance id's of neighbouring modules in the sink path Now that module instance ids are generated dynamically we need to update these parameters as well, so use the table created and update the ids Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24ASoC: Intel: Skylake: Use private instance id of modules in IPCDharageswari R
Use private id's of module instances that are generated during init_module for the IPC messages to DSP. These id's are freed up during delete pipeline. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-09Merge branch 'topic/hda-link-time' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-intel
2016-08-09ALSA: convert users to core bus_parse_capabilitiesVinod Koul
Now that we have the bus parse capabilities moved to core, we need to convert users. The SKL driver and HDA extended lib needs to converted in single patch, otherwise we regress on the functionality. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-08ASoC: Intel: Skylake: Add module processing domain supportSenthilnathan Veppur
A module can be scheduled in deferent processing domains in DSP. Topology specifies the module domain. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: Intel: Skylake: split fw and dsp initializationVinod Koul
The DSP instance creation also loads the firmware on DSPs. For library load the firmware names come from topology so can't be loaded at object creation. So split the firmware load and object creation. FW load is now called after topology init in platform probe. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: Intel: Skylake: modify skl_get_dsp_ops()Vinod Koul
To query the ops used for a platform, we use skl_get_dsp_ops() which return index and then we load the ops. Rather than this return the ops, this way it cna be used later to query the ops in rest of the driver. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11ASoC: Intel: add kablake device IDsVinod Koul
Kabylake is next generation Intel platform which has similar audio controller to Skylake, so add the ID and driver data in SKL driver. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-27ASoC: Intel: Skylake: Increase loglevel of debug messages.Vedang Patel
There is log spam while doing playback, record or reloading the audio firmware. print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency. For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver. Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-07ASoC: Intel: Skylake: Don't pause stopped pipeline while deletingDharageswari R
If pipeline is not STARTED, we do not need to pause pipeline while deleting. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-07ASoC: Intel: Skylake: Set the pipe state to paused when pausedJeeja KP
When pipe is stopped/Paused, set the pipe state to paused instead of created. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-07ASoC: Intel: Skylake: Reset DSP pipe when host/link DMA is resetJeeja KP
In case of XRUN recovery PCM prepare will be called. In this case Host/Link DMAs are reset and reconfigured, hence the corresponding FE/BE pipe needs to be reset in order to get to a clean state. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Skylake: Fix memory leak during init instanceMousumi Jana
param_data variable is allocated during set module format of init instance is not getting freed and hence can cause a memory leak. So free it up. Signed-off-by: Mousumi Jana <mousumix.jana@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-30ASoC: Intel: Bxtn: Add Broxton DSP supportJeeja KP
Broxton DSP is mostly similar to Skylake one but with subtle differences like no Code Load DMA and uses HDA DMA for code loading, DSP D0 and D3 sequences are different. These changes are comprehended by adding different DSP power up and down handlers, and new loader ops and also adding prepare and trigger which HDA DSP DMA requires Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Jayachandran B <jayachandran.b@intel.com> Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com> Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: Intel: Skylake: Move Skylake dsp ops & loader opsJeeja KP
The code loading for Skylake and other platforms is different, so add a dsp_ops and a loader_ops which can be defined for each platform. Move the dsp init, cleanup and loader ops (alloc and free dma) to these ops Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-08ASoC: Intel: Skylake: Add MCLK configurationDharageswari.R
The SoC has MCLK output which is typically required by codecs. The MCLK is controlled by DSP FW, so driver can configure that by sending DMA_CONTROL IPC. The configuration for MCLK is present in the endpoint blob. So if block has this configuration, send IPC to DSP for MCLK configuration. This is done by new function skl_dsp_set_dma_control() which is invoked by BE prepare. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-08ASoC: Intel: Skylake: Get node id using helperDharageswari.R
skl_setup_cpr_gateway_cfg() retrieves gateway settings which are required for copier module configuration. For upcoming DMA control IPC we need similar retrieval, so separate this piece into skl_get_node_id() helper which will be common for these functions Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-04ASoC: Intel: Skylake: Fix the module state check conditionJeeja KP
For binding modules we should check if source or destination module is in UNINT state. We canot bind even if one of them is in this state. So update the check from logical AND to logical OR and do not bind modules for this case Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-04ASoC: Intel: Skylake: Fix return of skl_get_queue_indexJeeja KP
In unbind modules, the skl_get_queue_index() can return error if the pin is dynamic and module is not bound yet. So instead of returning error this check should return success as modules is not yet bound. This will let the module be bound when connected pipes are enabled and will bind this as well. So change the return value to 0 Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-18ASoC: Intel: Skylake: Fix to set pipe state to invalid when deletingJeeja KP
When pipeline is deleted, set the pipeline state to invalid state. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08ASoC: Intel: Skylake: read params from DSP if module is onOmair M Abdullah
If a module is ON then we should read the module parameters from DSP rather than driver cached values Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08ASoC: Intel: Skylake: Add support for Mic Select moduleDharageswari R
Mic select is a DSP module which is used to select one or many inputs to form an output. This is useful to select data selectively from PDM input and hence the name. This module is of generic module type. This patch adds support to add and configure Mic select module in firmware topology. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-08ASoC: Intel: Skylake: Add memory pages to widget data.Jeeja KP
A module can require extra memory for processing, like audio algorithms. The memory for these modules needs to be represented in base module configuration and passed to DSP on init, so add the memory pages as a field in widget data Signed-off-by: Dharageswari.R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01ASoC: Intel: Skylake: Add helper routine to handle Algo parameterJeeja KP
Some DSP modules has user configurable parameters, which are required by some modules at module initialization. To configure the module algorithm parameter during initialization we add helpers here Signed-off-by: Divya Prakash <divya1.prakash@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01ASoC: Intel: Skylake: Add helper routines to handle module paramsJeeja KP
Some DSP modules have user configurable parameters. These parameters are required by modules in the following scenario - during initialization - after initialization using set parameter This patch adds helper routine to set module parameters using large config set IPC message and removes params to be passed as init module routine. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>