summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel
AgeCommit message (Collapse)Author
2016-08-12ASoC: Intel: Skylake: Fix error return code in skl_probe()Wei Yongjun
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>
2016-08-01ASoC: Intel: Skylake: Check list empty while getting module infoVinod Koul
Module list can be NULL so check if the list is empty before accessing the list. 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-07-24Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2016-07-24ASoC: Intel: Skylake: Delete an unnecessary check before the function call ↵Markus Elfring
"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>
2016-07-24ASoC: Intel: Skylake: Fix NULL Pointer exception in dynamic_debug.Vedang Patel
The following bug was reported by sometime back: https://lkml.org/lkml/2016/6/29/795 This commit fixes this bug by setting value for the prefix string. Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: Intel: Fix conflicting pcm dev drvdata on haswellBen Zhang
soc-core sets the snd_soc_pcm_runtime->dev drvdata to snd_soc_pcm_runtime in soc_post_component_init, and access it in places like codec_reg_show. hsw_pcm_open overwrites the drvdata to point to hsw_pcm_data, confusing soc-core, and causing crashes when cat /sys/devices/pci0000:00/INT3438:00/.../System PCM/codec_reg This patch removes the set in hsw_pcm_open since it's no longer used. commit 7ff9d6714a5c ("ASoC: Intel: Split hsw_pcm_data for playback and capture") already removed all calls to snd_soc_pcm_get_drvdata(rtd). Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: Intel: board: add kabylake nau88l25_ssm4567 machine idVinod Koul
Like SKL we have skl_nau88l25_ssm4567 machine for KBL, so add the ID for this machine too. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: Intel: board: add kabylake nau88l25_max98357a machine idVinod Koul
Like SKL we have skl_nau88l25_max98357a machine for KBL, so add the ID for this machine too. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14ASoC: Intel: Kbl: add kabylake additional machine entriesVinod Koul
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>
2016-07-14ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_max98357aVinod Koul
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>
2016-07-14ASoC: Intel: Skylake: reduce machine name for skl_nau88l25_ssm4567Vinod Koul
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>
2016-07-14ASoC: Intel: Skylake: Fix fw reload failureSenthilnathan Veppur
FW reload had two issues: - We need to disable the core 0 on when fw fails - Before loading firmware mark boot flag as false This patch fixes these two 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-07-11ASoC: Intel: board: add kabylake machine idVinod Koul
Kabylake platform is similar to Skylake. So, add machine id. Since same machine driver supports both, add these in id table. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> 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-07-11ASoC: Intel: atom: fix missing breaks that would cause the wrong operation ↵Alan Cox
to execute Now we correctly error an attempt to execute an unsupported operation. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11ASoC: Intel: Skylake: Initialize module list for BroxtonVinod Koul
The module list was not initialized for Broxton DSP code, so initialize it. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-11ASoC: intel: Fix sst-dsp dependency on dw stuffTakashi Iwai
The recent commit [a92ea59b74e2: ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in] introduced more strict kconfig dependency (depends on DW_DMAC_CORE=y) for avoiding the build failures due to dependency messes in intel-sst. This makes, however, it impossible to use this driver with the modularized systems, i.e. typically on Linux distros. The problem addressed in the commit above is that sst_dsp_new() and sst_dsp_free() includes the firmware init / finish that call dw_*() functions. Thus building it as built-in with DW_DMAC_CORE module results in the missing symbols. However, these sst_dsp functions are basically called only from the drivers that depend on DW_DMAC_CORE already. That is, once when these functions are split out, the rest can be independent from dw stuff. This patch attempts to solve the issue by the following: - Split sst-dsp stuff into two modules: snd-soc-sst-dsp and snd-soc-sst-firmware. - Move sst_dsp_new() and sst_dsp_free() to the latter module so that the former module can be independent from DW_DMAC_CORE. - Add a new kconfig SND_SOC_INTEL_SST_FIRMWARE to select the latter module by machine drivers. One only remaining pitfall is that each machine driver has to select SND_SOC_INTEL_SST_FIRMWARE carefully depending on DW_DMAC_CORE. This can't be done cleanly due to the restriction of the current kbuild. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=988117 Fixes: a92ea59b74e2 ('ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in') Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08ASoC: Intel: atom: statify cht_quirkVinod Koul
Sparse rightly warns: sound/soc/intel/atom/sst/sst_acpi.c:353:22: warning: symbol 'cht_quirk' was not declared. Should it be static? So statify this Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08ASoC: Intel: cht: fix uninit variable warningVinod Koul
Kbuild bot reports that we might use dai_index uninitialized. sound/soc/intel/boards/cht_bsw_rt5645.c:391:37: warning: 'dai_index' may be used uninitialized in this function [-Wmaybe-uninitialized] Since it is theoretically possible, set it while initializing. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08ASoC: Intel: Skylake: Fix to use the actual size for TLV controlDharageswari R
DSP expects the actual length of parameters that is set through TLV to be passed in large config set, so pass the actual size received in tlv_control_set() instead of max size. 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-07-08ASoC: Intel: Add surface3 entry in CHT-RT5645 machineVinod Koul
Surface3 device is a CHT machine, so add entry for it. Also update the HID from BIOS. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98001 Signed-off-by: Sachin Mokashi <sachinx.mokashi@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-08ASoC: Intel: Atom: Add quirk for Surface 3Vinod Koul
Surface 3 is CHT based device which shows up with RT5645 codec. But the BIOS reports ACPI ID as 5640! To solve this, add a DMI overide for cht-5640 machine. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98001 Signed-off-by: Sachin Mokashi <sachinx.mokashi@intel.com> 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-27ASoC: Intel: common: increase the loglevel of "FW Poll Status".Vedang Patel
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-24ASoC: Intel: atom: fix missing breaks that would cause the wrong operation ↵Alan Cox
to execute Now we correctly error an attempt to execute an unsupported operation. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22ASoC: Intel: Skylake: Support multi-core in BroxtonJayachandran B
Add multicore DSP support in Broxton DSP operations. 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-06-22ASoC: Intel: Skylake: Support multi-core in SkylakeJayachandran B
Add multicore DSP support in Skylake DSP operations. 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-06-22ASoC: Intel: Skylake: Add DSP muti-core infrastructureJayachandran B
The DSP can have more than one cores. In that case the secondary core has to be managed by the driver. This patch adds the changes to driver infrastructure to support multiple core. A new object skl_dsp_cores is introduced to support multiple core. Helpers skl_dsp_get_core() skl_dsp_put_core() help to managed the cores. Many of the power_up/down and DSP APIs take additional argument of core_id. The primary core, 0 is always powered up first and then on demand second core. 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-06-22ASoC: Intel: Skylake: Update comment styleVinod Koul
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>
2016-06-22ASoC: Intel: Skylake: Add pm ops for broxton-rt298 machineVinod Koul
Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22ASoC: Intel: Skylake: Disable async suspendVinod Koul
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>
2016-06-22ASoC: Intel: Revert "ASoC: Intel: Add support for PM ops in bxt-rt298"Vinod Koul
This reverts commit 3513798ca4bc ("ASoC: Intel: Add support for PM ops in bxt-rt298") as the right way to fix this is to disable async suspend Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22ASoC: Intel: Kconfig: formatting updateVinod Koul
Kconfig help texts were missing periods as suggested by Randy. Also fix the alignment on a block of help text to be consistent with rest. Suggested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22ASoC: Intel: Kconfig: fix build when ACPI is not enabledVinod Koul
Randy reported following error when ACPI is not enabled: warning: (SND_SOC_INTEL_BYTCR_RT5640_MACH && SND_SOC_INTEL_BYTCR_RT5651_MACH && SND_SOC_INTEL_CHT_BSW_RT5672_MACH && SND_SOC_INTEL_CHT_BSW_RT5645_MACH && SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) selects SND_SST_IPC_ACPI +which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && ACPI) causing these build errors: In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:40:0: ../include/acpi/acpi_bus.h:65:20: error: conflicting types for 'acpi_evaluate_dsm' union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, In file included from ../sound/soc/intel/atom/sst/sst_acpi.c:31:0: ../include/linux/acpi.h:676:34: note: previous definition of 'acpi_evaluate_dsm' was here static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, CONFIG_SND_SST_IPC_ACPI was already dependent upon ACPI, but that was not solving it. So move the depends up to machine drivers and remove from CONFIG_SND_SST_IPC_ACPI. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14ASoC: Intel: Skylake: Check for module list being NULLVinod Koul
While clearing loaded module count, we should check first to see if module list is NULL or not. Some distributions can ship with no modules and thus list can be empty. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14ASoC: Intel: Add support for PM ops in bxt-rt298Jeeja KP
We need card to be early suspended and late resumed, so use prepare and complete for card suspend and resume. Signed-off-by: Jeeja KP <jeeja.kp@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>
2016-06-14ASoC: Intel: Skylake: Update DSP stall bitsJayachandran B
The stall bits needs to comprehend the number of DSP cores running, so update the stall and unstall register writes to comprehend SKL_DSP_CORES_MASK values as well. Signed-off-by: Jayachandran B <jayachandran.b@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-06-14ASoC: Intel: Skylake: Update FW purge for BroxtonSenthilnathan Veppur
Broxton needs to send Purge firmware IPC to DSP before downloading the firmware. The DMA id needs to be updated for that. While at it also update Broxton boot sequence to send purge request after power up and before yanking off reset. 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-06-14ASoC: Intel: Skylake: Enable firmware reload in suspendJayachandran B
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>
2016-06-14ASoC: Intel: Update ignore suspend for bxt-rt298Senthilnathan Veppur
Capture from DMIC requires that we ignore the suspend, so mark these as ignore_suspend in bxt-rt298 machine. 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-06-14ASoC: Intel: Add FE rate & channel constraints for bxt-rt298Senthilnathan Veppur
We support stereo 48Khz audio, so add these as constraints for this card 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-06-14ASoC: Intel: Add DMIC 4 channel support for bxt machineSenthilnathan Veppur
Like Skylake, we can support 4 channel for DMIC, so add hw_params and constraints in the bxt-rt298 machine While at it, also add codec1 pipe for speaker playback. 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-06-07ASoC: Intel: Skylake: Report position in pointer queryJeeja KP
Don't update the runtime_delay in pointer query, delay need to reported as part of soc driver ops delay function. The delay value overwritten by ASoC core so this is dummy code and hence removing it. 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: Copy the pipe parameter by pipe typeJeeja KP
For pass through pipe, Host and Link DMA id's are valid, instead of overwriting the params set the host and link based on pipe type. 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 DSP pipe typeJeeja KP
DSP pipe type can be a pass through or it can be processing pipe. In case of pass through pipe, it is a single pipeline with both host and link copier in the same pipeline. Identify the DSP pipe type if it pass through or not. Pass through pipe is identified by checking if it has both host and link copier in the same pipeline. 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: Create Pipe to widget list in soc probeJeeja KP
We need to Identify the DSP pipe type and based on it being a pass thru pipeline or not, we need to copy the pipeline params. Pipe to widget mapping was earlier done in pre PMD widget handler, but since the pipe type would now be required in hw_params for bypass pipelines we need to move this to be done during the ASoC probe of the platform component. 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: Clean up of driver resources in suspendDharageswari R
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>
2016-06-07ASoC: Intel: Skylake: Avoid freeing up of unallocated memory/mcpsDharageswari R
When DSP pipe/module is not initialized successfully, memory/mcps is not allocated. So check the pipe/module state to avoid freeing up of unallocated memory/mcps. And allocate resources when pipe/ module is initialized successfully. 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: Disable SRAM Retention before D3Dharageswari R
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>
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>