summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown2016-12-121-2/+57
|\
| * ASoC: Intel: Skylake: Flush pending D0i3 request on suspendJayachandran B2016-11-091-0/+10
| | | | | | | | | | | | | | | | | | 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>
| * ASoC: Intel: Skylake: remove pci device enabling calls on suspendJayachandran B2016-11-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We were invoking pci_disable_device() while going to suspend-to-idle and pci_enable_device() while coming back to active state. Turns out that we do not need these calls as we only need system to be wake capable when in suspend-to-idle state. The wake capability is already done by enable_irq_wake() calls, so remove these unwanted calls in driver. 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>
| * ASoC: Intel: Skylake: Add support for programming D0i3CPardha Saradhi K2016-11-031-0/+47
| | | | | | | | | | | | | | | | | | | | | | To set the controller in D0i3 mode, the driver needs to set D0i3C register after DSP is quiesced. Since the D0iX entry/exit is done by IPC, add this as callback so that it can be invoked from IPC module. Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com> 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>
* | Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown2016-11-041-3/+5
|\ \ | |/ |/|
| * ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failureSodhi, VunnyX2016-10-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | HDMI codec is required to be powered up before controller initialization for successful enumeration of codec. If the probe fails it needs to be powered off to balance the power state of HDMI codec. This fix balances the reference count in the error path before turning off the codec. Reported-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: Intel: Skylake: Always acquire runtime pm ref on unloadLukas Wunner2016-10-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | skl_probe() releases a runtime pm ref unconditionally wheras skl_remove() acquires one only if the device is wakeup capable. Thus if the device is not wakeup capable, unloading and reloading the module will result in the refcount being decreased below 0. Fix it. Fixes: d8c2dab8381d ("ASoC: Intel: Add Skylake HDA audio driver") Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2016-09-111-1/+3
|\ \ | |/ | | | | Back-merge from for-linus just to make the further development easier.
| * ASoC: Intel: Skylake: Fix error return code in skl_probe()Wei Yongjun2016-08-121-1/+3
| | | | | | | | | | | | | | | | | | | | Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Fixes: 87b2bdf02278 ("ASoC: Intel: Skylake: Initialize NHLT table") Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-By: Vinod Koul <vinod.kou@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ALSA: convert users to core bus_parse_capabilitiesVinod Koul2016-08-091-3/+3
|/ | | | | | | | | | | 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>
* ASoC: Intel: Skylake: Delete an unnecessary check before the function call ↵Markus Elfring2016-07-241-2/+1
| | | | | | | | | | | | "release_firmware" The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Kbl: add kabylake additional machine entriesVinod Koul2016-07-141-0/+2
| | | | | | | Like SKL, we have two more machines for KBL, so add these IDs Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_max98357aVinod Koul2016-07-141-1/+1
| | | | | | | | | The platform device id table expects names to be less that 20chars, so truncate the name in skl id table and skl_nau88l25_max98357a machine. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_ssm4567Vinod Koul2016-07-141-1/+1
| | | | | | | | | The platform device id table expects names to be less that 20chars, so truncate the name in skl id table and skl_nau88l25_ssm4567 machine. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: add kablake device IDsVinod Koul2016-07-111-0/+8
| | | | | | | | | 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>
* ASoC: Intel: Skylake: Update comment styleVinod Koul2016-06-221-1/+1
| | | | | | | Noticed a style inconsistency in a comment, so update that Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Disable async suspendVinod Koul2016-06-221-0/+2
| | | | | | | | | We do not support async suspend due to dependency with rest of card and require suspend/resume be executed synchronously, mark the device accordingly. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Enable firmware reload in suspendJayachandran B2016-06-141-0/+1
| | | | | | | | | | | | | | Broxton DSP needs retains code loaded during runtime_pm cycles. But it looses that on suspend cycle, so on resume we need to download the firmware again. This is done by adding a new flag and based on flag status, we download the firmware. Signed-off-by: Jayachandran B <jayachandran.b@intel.com> 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>
* ASoC: Intel: Skylake: Clean up of driver resources in suspendDharageswari R2016-06-071-0/+1
| | | | | | | | | | On suspend firmware is re-initialized so resources are reset inside firmware. Driver should also clear the firmware counters at this time. 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>
* ASoC: Intel: Skylake: Disable SRAM Retention before D3Dharageswari R2016-06-071-0/+3
| | | | | | | | | | SW needs to set the PGCTL.LSRMD = 1 to disable LPSRAM retention feature,otherwise it may lead to SRAM ECC Errors. 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>
* ASoC: Intel: Add Broxton-P Dialog+Maxim machine driver entrySathyanarayana Nujella2016-06-011-0/+1
| | | | | | | | This patch adds bxt_da7219_max98357a_i2s machine driver entry into machine table Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Add api to retrieve dmic array info from nhltYong Zhi2016-05-301-2/+10
| | | | | | | | | | Skylake can be configured with either both 2 and 4 channel DMIC array, or 2 channel DMIC array only, this patch provides an API to retrieve the DMIC info from nhlt. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: add link managementVinod Koul2016-05-131-0/+34
| | | | | | | | | | | | | | Use shiny new link APIs to manage the links. Also remove old link configuration logic from driver. We need to keep link and cmd dma to off during active suspend to allow system to enter low power state and turn it on if the link and cmd dma was on before active suspend in active resume. 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>
* ASoC: Intel: Skylake: Fix memory leak in nhlt initJeeja KP2016-05-051-1/+4
| | | | | | | | | | | | During skl_nhlt_init(), acpi obj pointer is allocated and never freed and remap address is not unmapped. To fix this we should release the ACPI obj and also unmap the nhlt address during cleanup of driver. 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>
* ASoC: Intel: Skylake: Fix to turn OFF codec power when entering S3Subhransu S. Prusty2016-04-021-2/+13
| | | | | | 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>
* ASoC: Intel: Skylake: remove call to pci_dev_putVinod Koul2016-03-161-1/+0
| | | | | | | | | | The PCI bus takes pci_dev_get() and pci_dev_put() is also there. So no need for drivers to invoke these. In SKL driver we were calling pci_dev_put() only which is not right, so remove this 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>
* ASoC: Intel: Skylake: Call i915 exit lastVinod Koul2016-03-161-3/+2
| | | | | | | | | | | The Skylake driver uses i915 component APIs to talk to display. On remove we should free up by invoking snd_hdac_i915_exit() but that should be last thing in remove routine, so move it to last in skl_free() 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>
* ASoC: Intel: Skylake: Unmap the address lastVinod Koul2016-03-161-3/+4
| | | | | | | | | | | | In Skylake destructor we unmap the hardware address and then free links and streams. The stream free accesses hardware to write to registers and predictably causes oops. So change the order and unmap last in destructor. 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>
* ASoC: Intel: Skylake: free codec objects on removalVinod Koul2016-03-161-0/+4
| | | | | | | | | | On driver removal we should ask the core to remove the device objects as well, so invoke snd_hdac_ext_bus_device_remove() in remove. 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>
* ASoC: Intel: Bxtn: Add Broxton PCI IDSenthilnathan Veppur2016-03-121-0/+7
| | | | | | | | | Broxton is an Intel SoC which sports a DSP and system is quite like Skylake. So add this ID in Skylake driver 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>
* ASoC: Intel: Skylake: Add i915 enabling in skl probeVinod Koul2016-02-201-0/+51
| | | | | | | | | | | | | | The SKL also supports HDMI output so in probe we need to enable the HDMI using common i915 APIs to ensure it gets probed on the bus After S3 during the controller resequencing the codec domain need to be kept ON for successful reconfiguration of Codec. Once configured it will be turned OFF in codec driver. 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>
* ASoC: Intel: Skylake: Generate topology name for NHLT table headerVinod Koul2016-02-201-0/+4
| | | | | | | | | | | | | NHLT table [1] header has fields like oem_id, oem_table_id and oem_revision. Use that to load a unique topology binary specific to that platform NHLT Table is documented at: [1]: https://01.org/blogs/2016/intel-smart-sound-technology-audio-dsp Signed-off-by: Yang A Fang <yang.a.fang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Skylake: Add shutdown callbackJeeja KP2016-02-081-0/+26
| | | | | | | | | | | While going to shutdown, we need to bring HW to clean state. This is done by cleaning up stream descriptor registers. This cleanup is already done by decoupling of stream and stopping the chip, so invoke these from shutdown handler. 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>
* Merge branch 'fix/intel' of ↵Mark Brown2016-02-081-2/+0
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
| * ASoC: Intel: Skylake: Remove autosuspend delayVinod Koul2016-02-041-2/+0
| | | | | | | | | | | | | | | | | | | | The driver used autosuspend delay to delay going to D3. But per HW recommendation we should go to D3 soon, so remove the delay from driver 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>
* | ASoC: Intel: Skylake: enable interrupt as wake source in active suspendJeeja KP2016-01-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | In active suspend, any HDA interrupt should wake the system. When device enters active suspend, we need to enable HDA controller interrupt as wake source. Similarly disable HDA controller interrupt as wake source when exiting active suspend. 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>
* | ASoC: Intel: Skylake: manage link power in active suspendVinod Koul2016-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | When device enters active suspend, we should turn off the links as they are not in use. Similarly we need to bring back links when we exit active suspend. Signed-off-by: Jayachandran B <jayachandran.b@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>
* | ASoC: Intel: Skylake: fix reset controller sequencingJayachandran B2016-01-101-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | MISCBDCGE is a new register for Misc Backbone clock gate control which is useful to control while resetting the link and ensuring controller is in required state so add API to control it HW recommends that we reset with CGCTL.MISCBDCGE disabled, so add that while doing init chip and reset sequence. 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>
* | Merge branch 'fix/intel' of ↵Mark Brown2016-01-051-0/+4
|\ \ | |/ |/| | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
| * ASoC: Intel: Skylake: Fix the memory leakVinod Koul2016-01-051-0/+4
| | | | | | | | | | | | | | | | This provide the fix for firmware memory by freeing the pointer in driver remove where it is safe to do so Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Intel: Add Nuvoton+Maxim machine driver entryRohit Ainapure2015-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | Add the NAU88L25 + MAX98357A machine driver entry into the machine table Signed-off-by: Rohit Ainapure <rohit.m.ainapure@intel.com> Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Intel: Skylake: Add support for active suspendJeeja KP2015-12-081-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Some of the usecases can be marked as 'ignore_suspend' by machine. For these on suspend we should keep audio controller ON by saving the state and not suspending the device For this we need to maintain a counter for these streams and be active on suspend when such a stream is opened. 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>
* | ASoC: Intel: Skylake: Remove redundant init in resumeJeeja KP2015-11-181-4/+0
| | | | | | | | | | | | | | | | | | Since we call _skl_resume which also initializes the chip we no need to call these explicitly, so remove the duplication 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>
* | ASoC: Intel: Skylake: Don't enable WAKEENABLE on suspendJeeja KP2015-11-181-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For HDA codecs WAKEENABLE bit is to programmed if codec event change has to wake the system when suspended. In skylake I2S systems which are currently supported we have only HDMI codec, which doesn't use this capability to detect a HDMI connect/ disconnect event. HDMI HDA codec uses display interface to detect connect/disconnect event. This patch removes the WAKEBIT enabling during device D0/D3 as this seems to cause spurious wakes on the system 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>
* | ASoC: Intel: Skylake: add adi + nau8825 machine driver entryFang, Yang A2015-11-181-0/+2
| | | | | | | | | | | | | | | | | | This patch adds skl_nau8825_ssn4567_i2s machine driver into machine table Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Intel: Skylake: Use the fw name from ACPI mach tableVinod Koul2015-11-161-0/+1
| | | | | | | | | | | | | | | | | | The firmware name is hard coded which doesnt allow to load different platforms for various platforms so get this name from available machine table and pass it to dsp context for loading Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Intel: Skylake: Fix skl machine driver creationVinod Koul2015-11-161-2/+53
| | | | | | | | | | | | | | | | | | | | | | Now that we have common match code in place, update the SKL driver to use the common match routines for driver entry creation for UEFI BIOS systems Signed-off-by: Jeeja KP <jeeja.kp@intel.com> 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>
* | ASoC: Intel: Skylake: Fix PM behaviourJeeja KP2015-11-161-25/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver runtime behaviour is fine but in suspend, we missed setting the DSP to suspend and also missed resuming DSP on resume. Fix this by having common SKL suspend and resume routines which power up/down links, suspend/resume DSP and other common routines, and call these routines from both runtime as well as system PM handlers Signed-off-by: Jayachandran B <jayachandran.b@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>
* | ASoC: Intel: Skylake: Fix to ignore codec_mask check in probeJeeja KP2015-11-161-2/+1
|/ | | | | | | | | | | We have both I2S and hda codec support in the driver. codec_mask check is relevant only for hda codec and some boards may have only I2S Codec, so removed probe error in case no hda codec is found and update the log to info as it may not be error. 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>
* ASoC: Intel: Skylake: power down all link in suspendJeeja KP2015-10-091-0/+3
| | | | | | | | | | This ensures that the link is not requesting any clock and the PLL can turn off. The link is powered when controller is brought out of reset. 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>
OpenPOWER on IntegriCloud