summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel
AgeCommit message (Collapse)Author
2014-12-08Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/intel', ↵Mark Brown
'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/lm49453' into asoc-next
2014-11-28ASoC: Intel: Move capture PCM pin to PCM0 for Broadwell/HaswellJie Yang
Move capture PCM pin from PCM4 to PCM0 for Broadwell/Haswell. This will allow us to integrate with pulseaudio better for usually default device is set to 0. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-28ASoC: Intel: Correct the xmax volumeJie Yang
The xmax volume should be corrected to ARRAY_SIZE(volume_map)-1, otherwise, the xmax value will be mapped to 0 wrongly. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-27ASoC: Intel: Remove useless loopback volume control for BroadwellJie Yang
On Broadwell, the ADSP FW don't support loopback record volume tuning, so here remove this control. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-25ASoC: Intel: Fix stream volume set no effect issue on BroadwellJie Yang
The volume setting control for capture stream doesn't take effect on intel Broadwell platform. Root cause it at 2 points: 1. set stream volume with channel=2 is wrongly bapassed; 2. the saved stream volume should be restored after stream is commit. Here correct these 2 items to fix the stream volume set issue. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21ASoC: Intel: chv_platform_data can be statickbuild test robot
sound/soc/intel/sst/sst_acpi.c:135:26: sparse: symbol 'chv_platform_data' 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-11-21ASoC: Intel: add support for Cherrytrail and Braswell in SST driverMengdong Lin
This patch add ACPI device ID and platform data for two Cherryview-based platforms, Cherrytrail and Braswell. Also reuse mfld driver ops in sst driver. 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-21ASoC: Intel: Add Cherrytrail & Braswell machine driver cht_bsw_rt5672Mengdong Lin
Add machine driver for two Intel Cherryview-based platforms, Cherrytrail and Braswell, with RT5672 codec. 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-21ASoC: Intel: byt_rvp_platform_data can be statickbuild test robot
sound/soc/intel/sst/sst_acpi.c:124:26: sparse: symbol 'byt_rvp_platform_data' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19ASoC: Intel: add BYTCR machine driver with RT5640Subhransu S. Prusty
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-19ASoC: Intel: cleanup runtime_pm initializationVinod Koul
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 Lin
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 Koul
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 Koul
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 Koul
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 Koul
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 Koul
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 Girdwood
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 Yang
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 Yang
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 Mukherjee
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 Yang
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. Prusty
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. Prusty
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. Prusty
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. Prusty
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. Prusty
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. Prusty
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 Koul
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. Prusty
.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 A
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 Koul
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 K
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 Koul
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. Prusty
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 Yang
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 Girdwood
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 Girdwood
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 Yang
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 Girdwood
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 Girdwood
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 Girdwood
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 Girdwood
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 robot
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 Brown
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 Girdwood
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: Replace pci_id with unique device idSubhransu S. Prusty
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 Koul
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 Koul
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 Koul
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>