summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2018-04-27ASoC: mt6797: switch to SPDX license tagKai Chieh Chuang8-94/+24
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-27ASoC: mt6797: add structure define and clock control function for 6797Kai Chieh Chuang5-0/+1101
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-27ASoC: add mt6797-mt6351 driver and config optionKai Chieh Chuang4-0/+226
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-27ASoC: mt6351 switch to SPDX license tagKai Chieh Chuang1-6/+5
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-27ASoC: uniphier: remove boilerplate from lisence commentKatsuhiro Suzuki7-91/+0
This patch removes boilerplate of GPLv2, use only SPDX identifier as same as other recently ASoC DAI drivers. Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: fsl_ssi: Use u32 variable type when using regmap_read()Fabio Estevam1-2/+1
Convert the sisr and sisr2 variable types to u32 to avoid the following sparse warnings: sound/soc/fsl/fsl_ssi.c:391:42: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_ssi.c:391:42: expected unsigned int *val sound/soc/fsl/fsl_ssi.c:391:42: got restricted __be32 *<noident> sound/soc/fsl/fsl_ssi.c:393:17: warning: restricted __be32 degrades to integer sound/soc/fsl/fsl_ssi.c:393:15: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_ssi.c:393:15: expected restricted __be32 [usertype] sisr2 sound/soc/fsl/fsl_ssi.c:393:15: got unsigned int sound/soc/fsl/fsl_ssi.c:396:50: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_ssi.c:396:50: expected unsigned int [unsigned] val sound/soc/fsl/fsl_ssi.c:396:50: got restricted __be32 [usertype] sisr2 sound/soc/fsl/fsl_ssi.c:398:42: warning: incorrect type in argument 2 (different base types) sound/soc/fsl/fsl_ssi.c:398:42: expected unsigned int [unsigned] [usertype] sisr sound/soc/fsl/fsl_ssi.c:398:42: got restricted __be32 [addressable] [usertype] sisr In other places where regmap_read() is used a u32 variable is passed to store the register read value, so do the same here as well. regmap API already takes care of endianness, so the usage of u32 is safe. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: amd: rename audio_substream_data variableMukunda, Vijendar1-9/+9
In order to make audio_substream_data structure variable consistent throughout the code, changed the name from audio_config to rtd wherever applicable. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: mediatek: switch to SPDX license tagRyder Lee21-190/+22
Add SPDX identifiers to all remaining files in sound/soc/mediatek/ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: mediatek: add MT7622 AFE supportRyder Lee4-15/+48
This patch adds support for the MT7622 AFE which reuses MT2701 driver. We also introduce the 'struct mt2701_soc_variants' to differentiate between the SoC generations as there might be other (existing or future) chips that use the same binding and driver, then being a little more abstract could help in the long run. Cc: Jia Zeng <jia.zeng@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: mediatek: Add MTK_STREAM_NUM to mtk-base-afe.hRyder Lee4-71/+30
Add MTK_STREAM_NUM to common header and modify related stuff so that the other SoCs can reuse it. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: mediatek: simplify the control logic of MT2701 I2SRyder Lee3-100/+66
This patch adjusts the mt2701_afe_i2s_ops to simplify the control logic of the I2S path. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: add mt6351 codec driverKai Chieh Chuang4-0/+1617
This patch adds the MediaTek MT6351 codec driver. MT6351 communicate with SoC through MediaTek PMIC wrapper. MT6351 use MediaTek proprietary audio interface. Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: compress: Add helper functions for component open/freeCharles Keepax1-79/+62
There are 2 loops calling open and 4 loops calling free for all the components on a DAI link. Factor out these loops into helper functions to make the code a little clearer. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26ASoC: Remove platform code now everything is componentisedCharles Keepax5-607/+9
As all drivers have been moved over to the new generic component code remove the now unused platform specific code. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26Merge branch 'asoc-4.17' into asoc-4.18 for compress dependenciesMark Brown4-30/+40
2018-04-26ASoC: compress: Only call free for components which have been openedCharles Keepax1-24/+28
The core should only call free on a component if said component has already had open called on it. This is not presently the case and most compressed drivers in the kernel assume it will be. This causes null pointer dereferences in the drivers as they attempt clean up for stuff that was never put in place. This is fixed by aborting calling open callbacks once a failure is encountered and then during clean up only iterating through the component list to that point. This is a fairly quick fix to the issue, to allow backporting. There is more refactoring to follow to tidy the code up a little. Fixes: 9e7e3738ab0e ("ASoC: snd_soc_component_driver has snd_compr_ops") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-25ASoC: mediatek: use snd_soc_dai_get_drvdata() to get the private dataRyder Lee3-88/+46
Reduce the boilerplate code to retrieve the private data. No functional change intended. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-25ASoC: mt6797: add mt6797 platform driverKai Chieh Chuang1-0/+1241
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-24ASoC: wm_adsp: Account for name prefixes when toggling preloaderCharles Keepax1-4/+4
Use the correct functions to allow a name prefix assigned through codec_conf to be taken into consideration whilst enabling and disabling the preloader widget. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-23ASoC: sgtl5000: Switch to SPDX identifierFabio Estevam2-13/+6
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-23ASoC: sgtl5000: Fix the spelling of 'exceed'Fabio Estevam1-2/+2
Fix the spelling of 'exceed' in two comments. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: sh: Update menu title and platform dependencyGeert Uytterhoeven1-2/+2
Change the menu title to refer to "Renesas SoCs" instead of "SuperH", as both SuperH and ARM SoCs are supported. Since commit 9b5ba0df4ea4f940 ("ARM: shmobile: Introduce ARCH_RENESAS") is ARCH_RENESAS a more appropriate platform dependency for Renesas ARM SoCs than the legacy ARCH_SHMOBILE, hence use the former. Renesas SuperH SH-Mobile SoCs are still covered by the SUPERH dependency. This will allow to drop ARCH_SHMOBILE on ARM and ARM64 in the near future. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: sh: Drop SUPERH platform dependencyGeert Uytterhoeven1-1/+1
The SIU sound peripheral is used only on SuperH SH-Mobile platforms. As both SUPERH and ARCH_SHMOBILE are set for these platforms, the SUPERH dependency can be dropped. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: kbl_rt5663_rt5514_max98927: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: kbl_rt5663_max98927: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: kbl_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In kabylake_audio_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: cht_bsw_nau8824: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In snd_cht_mc_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: bytcr_rt5651: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In snd_byt_rt5651_mc_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: bytcht_es8316: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In snd_byt_cht_es8316_mc_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20ASoC: Intel: byt-max98090: Replace GFP_ATOMIC with GFP_KERNELVinod Koul1-1/+1
In byt_max98090_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-19ASoC: atmel: simplify getting .drvdataWolfram Sang1-4/+2
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-19ASoC: rt5668: fix incorrect 'and' operatorColin Ian King1-1/+1
Currently logical and is being used instead of bitwise and. Fix this. Detected by CoverityScan, CID#1468008 ("Logical vs bitwise operator") Fixes: d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-19ASoC: Intel: Disable SND_SOC_INTEL_BAYTRAIL when SND_SST_ATOM_HIFI2_PLATFORM ↵Hans de Goede1-1/+1
is enabled The sound/soc/intel/common/sst-acpi.c code only tries to load the "baytrail-pcm-audio" driver (and supporting board drivers) when SND_SST_ATOM_HIFI2_PLATFORM is not enabled, since otherwise these are handled by snd-soc-sst-atom-hifi2-platform.ko. Since these thus will never be used when SND_SST_ATOM_HIFI2_PLATFORM is enabled, building these drivers when it is enabled is useless. Add a Kconfig dependency to reflect this, so that SND_SOC_INTEL_BAYTRAIL cannot be enabled when SND_SST_ATOM_HIFI2_PLATFORM is also enabled. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-19ASoC: msm8916-wcd-analog: use threaded context for mbhc eventsSrinivas Kandagatla1-3/+6
As snd_soc_jack_report() can sleep, move handling of mbhc events to a thread context rather than in interrupt context. Fixes: de66b3455023 ('ASoC: codecs: msm8916-wcd-analog: add MBHC support') Reported-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-19ASoC: topology: Revert recent changes while boot errors are investigatedMark Brown2-96/+3
Krzysztof Kozlowski reported a NULL dereference in _instantiate_card() on Odroid XU3 and XU boards which he bisected to 45f8cb57da0d7 (ASoC: core: Allow topology to override machine driver FE DAI link config). Revert that commit for now, along with f11a5c27f928 (ASoC: core: Add name prefix for machines with topology rewrites) due to dependency issues, in order to keep things booting cleanly in -next. Reported-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-18ASoC: topology: Fix build errorsMark Brown4-43/+33
The two commits: 81e9b0a07889 ASoC: topology: Give more data to clients via callbacks 28aa6f7779f7 ASoC: topology: Add callback for DAPM route load/unload break the build so revert them. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-18ASoC: Remove depends on HAS_DMA in case of platform dependencyGeert Uytterhoeven4-9/+3
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their dependencies on HAS_DMA, to prevent compiling subsystems or drivers that cannot work anyway. This simplifies the dependencies, and allows to improve compile-testing. Note: - The various SND_SOC_LPASS_* symbols had to loose their dependencies on HAS_DMA, as they are selected by SND_SOC_STORM and/or SND_SOC_APQ8016_SBC. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: topology: Add support for compressed PCMsLiam Girdwood1-0/+3
Register a compressed PCM if topology defines one. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: topology: Add callback for DAPM route load/unloadLiam Girdwood1-0/+13
Add a callback fro clients for notification about DAPM route loading and unloading. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: topology: Give more data to clients via callbacksLiam Girdwood4-33/+30
Give topology clients more access to the topology data by passing index, pcm, link_config and dai_driver to clients. This allows clients to fully instantiate and track topology objects. The SOF driver is the first user of these new APIs and needs them to build component topology driver and FW objects. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: core: Add name prefix for machines with topology rewritesLiam Girdwood1-0/+8
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: core: Allow topology to override machine driver FE DAI link config.Liam Girdwood2-3/+88
Machine drivers statically define a number of DAI links that currently cannot be changed or removed by topology. This means PCMs and platform components cannot be changed by topology at runtime AND machine drivers are tightly coupled to topology. This patch allows topology to override the machine driver DAI link config in order to reuse machine drivers with different topologies and platform components. The patch supports :- 1) create new FE PCMs with a topology defined PCM ID. 2) destroy existing static FE PCMs 3) change the platform component driver. 4) assign any new HW params fixups. The patch requires no changes to the machine drivers, but does add some platform component flags that the platform component driver can assign before loading topologies. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: topology: Check widget kcontrols before derefLiam Girdwood1-2/+2
Validate the topology input before we dereference the pointer. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: nau8824: user configuration of key detectionJohn Hsu1-0/+9
The SAR ADC of key press detection varies depending on headset. We can't make a set of common threshold values for every case. Therefore, the driver provides configuration for user and they can set up values by UCM configuration. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: amd: fixed checkpatch pl warningsMukunda, Vijendar2-128/+153
fixed checkpatch pl warnings. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: topology: Fix bugs of freeing soc topologyYan Wang1-1/+1
In snd_soc_tplg_component_remove(), it should compare index and not dobj->index with SND_SOC_TPLG_INDEX_ALL for removing all topology objects. Signed-off-by: Yan Wang <yan.wang@linux.intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: Intel: Skylake: Reset stream to link mappingRakesh Ughreja1-0/+7
By default all the streams are mapped to all links after controller is reset which causes stream to be broadcast on all the links. This patch resets the stream-link mapping after controller reset. The stream is mapped later to the appropriate link as part of stream setup. Tested-by: Abhijeet Kumar <abhijeet.kumar@intel.com> Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: Intel: Skylake: Reset DSP Pipelines in preparePardha Saradhi K1-4/+20
An application can choose to call .prepare function any number of times. In such scenarios, there is a need to reset the DSP pipeline. Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com> Signed-off-by: Divya Prakash <divya1.prakash@intel.com> Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: Intel: Skylake: Unify the fw ops for SKL and KBLPradeep Tewani3-36/+3
SKL and KBL driver used separate set of fw ops for library loading. However, with the unification of fw binary, use the common set of fw ops for both Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com> Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-17ASoC: Intel: Skylake: Reset DSP pipe in skl_pcm_hw_freeDivya Prakash1-0/+12
Currently during destroy pipeline the gateway is disabled before DMA completion. This leads to improper draining of data and subsequently causing issues on HD-Audio DMA. Hence added a new pipe reset IPC in skl_pcm_hw_free in which the Gateway Enable(GEN bit) is reset to 0 after DMA completion in skl_pcm_trigger. Signed-off-by: Divya Prakash <divya1.prakash@intel.com> Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>