aboutsummaryrefslogtreecommitdiffstats
path: root/mm (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-19ASoC: Intel: cleanup runtime_pm initializationVinod Koul1-5/+5
For ACPI we missed to pm_runtime_enable() call which is required to tell PM core that runtime on this device is enabled now. Since this is common to both PCI and APCI move it out. Also for ACPI we do not require pm_runtime_allow() call, so remove that Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17ASoC: Intel: add missing ACPI device tableMengdong Lin1-0/+2
The ACPI device table will generate the driver module alias for Intel audio devices enumerated from ACPI. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14ASoC: Intel: mrfld- add ACPI moduleVinod Koul6-5/+391
Add the last ACPI module support which also uses core module like the PCI part 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>
2014-11-06ASoC: Intel: mrfld - remove non static definitionVinod Koul1-2/+0
sst_save_shim64() is defined as static in code but header is non static. Since this is not used other than file where defined remove non static definition Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06ASoC: Intel: mrfld - add shim save restoreVinod Koul1-0/+28
In ACPI platform we need to save few registers of Shim on suspend and restore them on resume, so add handlers to do this 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>
2014-11-06ASoC: Intel: mrfld - create separate module for pci partVinod Koul6-199/+243
Now the SST_IPC will support both ACPI and PCI, separate into core module and PCI module. This also move probe function into PCI module and exports the required symbols from core module 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>
2014-11-06ASoC: Intel: mrfld - remove unnecessary check for pointerVinod Koul1-1/+1
the 'platform' pointer in sst_map_modules_to_pipe() is deref in caller function so we need to check for it in this function Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04ASoC: Intel: Fix build with CONFIG_SLEEP enabled.Liam Girdwood1-4/+7
Fix the following build error when CONFIG_SLEEP is enabled and CONFIG_RUNTIME is disabled. The BDW ADSP sleep PM functionality depends on the runtime pm calls for context save/restore. All error/warnings: >> ERROR: "snd_soc_suspend" undefined! >> ERROR: "snd_soc_resume" undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04ASoC: Intel: Fix the driver data not set issueJie Yang1-1/+0
The priv_data is allocated again here wrongly, and it is not set to the driver data after assignment. This make the pdata->dev is NULL and oops occurs on the first call to hsw_volume_put. The resource has been allocated in driver probe callback hsw_pcm_dev_probe, so here just remove this sencond allocation is OK. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-03ASoC: Intel: Correct a macro for FW messageJie Yang1-1/+1
For the broadwell official released FW(Since 8.4.1.43), the macro SST_HSW_NO_CHANNELS is changed and fixed to 4, so here change it to 4. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-02ASoC: Intel: fix missing mutexSudip Mukherjee1-0/+1
on error in block prepare, we were returning the error code while still holding the mutex. We are releasing the mutex in this patch before return. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31ASoC: Intel: Add jack detection for BroadwellJie Yang1-3/+46
Add jack dectection and event reporting for Broadwell. It use combo jack on BDW platform, which including Mic Jack pin and Headphone jack pin. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31ASoC: Intel: more probe modularization for sstSubhransu S. Prusty1-72/+86
Move the PCI BAR and resource initialization to a separate routine 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>
2014-10-31ASoC: Intel: modularize driver probe and removeSubhransu S. Prusty1-71/+94
The driver probe which initializes driver and remove which cleans up can be shared with APCI as well, so move them to common init_context and cleanup_context routines which can be used by ACPI as well 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>
2014-10-31ASoC: Intel: move the driver context allocation to routineSubhransu S. Prusty1-5/+18
This will be used by ACPI code as well, so moving to common routine helps 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>
2014-10-31ASoC: Intel: move the lock and wq initialization to routineSubhransu S. Prusty1-5/+9
This will be used by ACPI code as well, so moving to common routine helps 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>
2014-10-31ASoC: Intel: move the driver wq init to a routineSubhransu S. Prusty1-15/+19
This will be used by ACPI code as well, so moving to common routine helps 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>
2014-10-31ASoC: Intel: mfld-pcm: Fix to Store device context in sst_dataSubhransu S. Prusty1-0/+1
Some debug prints use dev context in sst_data. Store the device context for the same. 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>
2014-10-31ASoC: Intel: sst - add compressed ops handlingVinod Koul1-0/+285
This patch add low level IPC handling for compressed stream operations 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>
2014-10-31ASoC: mfld-compress: implement .power callbackSubhransu S. Prusty2-1/+8
.power callback is required to invoked for compressed audio as well to turn on/off sst, so invoke them 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>
2014-10-31ASoC: Intel: use correct firmware nameFang, Yang A1-4/+1
The firmware name was used worngly, so fix it up Signed-off-by: Fang, Yang A <yang.a.fang@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>
2014-10-31ASoC: Intel: sst: load firmware using async callbackVinod Koul1-0/+15
We would like the DSP firmware to be available in driver as soon as possible. So use the async callback in driver to probe to load the firmware as soon as usermode is up 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>
2014-10-31ASoC: Intel: use lock when changing SST state.Mythri P K2-4/+2
SST state change should be done under sst_lock Signed-off-by: Mythri P K <mythri.p.k@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>
2014-10-31ASoC: Intel: sst: add runtime power management handlingVinod Koul1-0/+67
This patch adds the runtime pm handlers, the driver already has code for get/put for runtime pm and only these handlers being missing. 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>
2014-10-31ASoC: Intel: mrfld: Fix runtime pm calls in sst_open_pcm_streamSubhransu S. Prusty1-8/+4
It's already done in open/close. 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>
2014-10-30ASoC: Intel: Work around to fix HW D3 potential crash issueJie Yang2-18/+98
When using clock gatings to save power, there are some known issues: 1. core clock gating (DCLCGE) must be disabled during D0 and D3 entry and updating SRAM banks (VDRTCTL0). 2. DSP trunk clock gating (DTCGE) can cause FW crashes, disable it in D0. To align with the new W/A flow from FW team, we must set VDRTCTL0.D3PGD to 1 (D3 power gating disabled) at first startup and keep it all the time. ADSP will be in D0 on first boot by BIOS part of WA. Required delays must be preserved (waiting for HW to stabilize, after enabling CCG, changing SRAM PG, D3PG). D3->D0: 1. Disable core clock gating (VDRTCTL2.DCLCGE = 0) 2. Enable other CG apart from DTCG and DCLCG (VDRTCTL2. DCLCGE and DTCGE = 0) 3. Disable D3PG (VDRTCTL0.D3PGD = 1) 4. Power up necessary SRAM and wait at least for 18 clock cycles for every bank you have powered up 5. Set D0 state(PMCS.PS = 0), wait for HW 6. Restore MCLK (clkctl.smos, disabled in D3 entry point 4) 7. Stall and reset core, set CSR 8. Enable core clock gating (VDRTCTL2.DCLCGE = 1), delay 50 us 9. Unreset core 10.Load FW, configure PLL and other necessary things 11.Unstall core Changing SRAM PG during D0: 1. Disable core clock gating (VDRTCTL2.DCLCGE = 0) 2. Set PG mask 3. Wait at least for 18 clock cycles for every bank you have powered up 4. Enable core clock gating, delay 50 us D0->D3: 1. Disable core clock gating (DCLCGE = 0) 2. Stall and reset core 3. Power down entire SRAM and wait at least for 18 clock cycles for every bank (Enable SRAM PG (ISRAMPGE = 0x3FF, DSRAMPGE = 0xFFFFF, D3SRAMPGD = 0), remember about preserving VDRTCTL0.D3PGD = 1) 4. Shutdown PLL, disable MCLK(clkctl.smos = 0), Enable DTCG to save power 5. Set D3 state(PMCS.PS = 3), delay 50 us 6. Enable core clock gating, delay 50 us Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30ASoC: Intel: fix build with runtime PM disabled.Liam Girdwood2-9/+7
Fix the following errors: All error/warnings: >> sound/soc/intel/sst-haswell-pcm.c:1168:13: error: 'hsw_pcm_prepare' undeclared here (not in a function) .prepare = hsw_pcm_prepare, ^ >> sound/soc/intel/sst-haswell-pcm.c:1169:14: error: 'hsw_pcm_complete' undeclared here (not in a function) .complete = hsw_pcm_complete, ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30ASoC: Intel: Add debug output when boot fails.Liam Girdwood1-2/+6
Add the debug output from IPCD and IPCX when booting fails. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30ASoC: Intel: Fix block is enabled multiple times issueJie Yang1-1/+1
During FW parsing and loading, block_list_prepare() may be called for each raw data block copying and this may made the hsw_block_enable() called mutiple times, which increase block->users many times. The result of this is hsw_block_disable() can't power gated the related block when trying to free the blocks during suspend, and the power gating status also confused. Here check the block user status, only calling enable() for those blocks who has no user yet. Remember that this works correctlly on current case, where there are enough SRAM memory so different module won't share a memory block. For further usage, we may need restructure the struct sst_mem_block to save the module list who is using it. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: Add PM support to HSW/BDW PCM driverLiam Girdwood2-14/+260
Add PM and RTD3 support to the HSW/BDW PCM driver. The PCM driver will now save DSP context and then power off the DSP when it's not in use. DSP power and context is then restored when it's next used. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: Add PM support to HSW/BDW IPC driverLiam Girdwood2-5/+258
Add PM and RTD3 support to the HSW/BDW IPC driver. This patch saves and restores the DSP context, loads and unloads FW and drops any pending IPC messages after suspend. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: Add PM support to the HSW/BDW DSP core.Liam Girdwood1-39/+119
Add support for PM wake, sleep and stall calls to the core HSW/BDW driver. This includes reworking the reset and boot code and adding new calls for setting D3/D0 state. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: Add generic support for DSP wake, sleep and stallLiam Girdwood3-0/+30
Add generic functions to support DSP sleep, wake and stall. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: dw_pdata can be statickbuild test robot1-1/+1
sound/soc/intel/sst-firmware.c:172:29: sparse: symbol 'dw_pdata' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29ASoC: Intel: Add dependency on DesignWare DMA controllerMark Brown1-0/+1
We have calls into the controller so we need to ensure it is being built. Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28ASoC: Intel: Make ADSP memory block allocation more genericLiam Girdwood9-341/+1025
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type. ASoC: Intel: update scratch allocator to use generic block allocator Update the scratch allocator to use the generic block allocator and calculate total scratch buffer size. ASoC: Intel: Add call to calculate offsets internally within the DSP. A call to calculate internal DSP memory addresses used to allocate persistent and scartch buffers. ASoC: Intel: Add runtime module support. Add support for runtime module objects that can be created for every FW module that is parsed from the FW file. This gives a 1:N mapping between the FW module from file and the runtime instantiations of that module. We also need to make sure we remove every module and runtime module when we unload the FW. ASoC: Intel: Add DMA firmware loading support Add support for DMA to load firmware modules to the DSP memory blocks. Two DMA engines are supported, DesignWare and Intel MID. ASoC: Intel: Add runtime module lookup API call Add an API to allow quick lookup of runtime modules based on ID. ASoC: Intel: Provide streams with dynamic module information Remove the hard coded module paramaters and provide each module with dynamically generated buffer information for scratch and persistent buffers. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-27ASoC: Intel: mrfld: Define sst_res_info for acpiSubhransu S. Prusty1-0/+23
To query resources in ACPI systems we need to define a data structure. This would be set as platform_info for the devices. 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>
2014-10-27ASoC: Intel: mrfld - Define ipc_info structureSubhransu S. Prusty1-0/+5
This will be used to abstract the differances in ipc offsets for different chips. 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>
2014-10-27ASoC: Intel: mrfld: Replace pci_id with unique device idSubhransu S. Prusty3-9/+10
In order to support both ACPI and PCI devices we need to use a genric device id in driver, so change all pci_id instances to device_id 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>
2014-10-21ASoC: intel: use __iowrite32_copy for 32 bit copyVinod Koul1-6/+3
The sst-firmware was also using own method to do 32bit copy, turns out we have a kernel API so use that instead [For BYT] Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21ASoC: intel: explain why block not found isn't error alwaysVinod Koul1-0/+15
The IPC blocking can be error when we don't find block or a short message, explain that by adding a comment about this scenario Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21ASoC: intel: fix the kernldoc commentVinod Koul1-1/+1
copypaste error on function sst_get_num_channel caused the comment to be wrong, so fix it here Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21ASoC: intel: log an error on double freeVinod Koul1-0/+2
the stream context should be freed only once on stream cleanup. If we ever hit a chance that stream context is getting double freed, though not an cause of panic as memory allocator can deal with this, we should still log this to help in finding issues and debugging Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-21ASoC: intel: use __iowrite32_copy for 32 bit copyVinod Koul1-7/+5
The driver was using own method to do 32bit copy, turns out we have a kernel API so use that instead Tested-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>
2014-10-20ASoC: Intel: Add new dependency for Haswell machineRicardo Neri1-1/+2
I2C support for the RT5640 codec is provided through the Designware I2C platform adapter in this machine. Thus, the driver must be present. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: Intel: Add new dependency for Broadwell machineRicardo Neri1-1/+2
I2C support for the RT286 codec is provided through the Designware I2C platform adapter in this machine. Thus, the adapter driver must be present. Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: Intel: sst: Add makefile and kconfig changesVinod Koul3-0/+10
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>