summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'asoc-4.17' into asoc-4.18 for compress dependenciesMark Brown2018-04-264-30/+40
|\
| * ASoC: compress: Only call free for components which have been openedCharles Keepax2018-04-261-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>
| * ASoC: msm8916-wcd-analog: use threaded context for mbhc eventsSrinivas Kandagatla2018-04-191-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>
| * ASoC: topology: Check widget kcontrols before derefLiam Girdwood2018-04-171-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>
| * ASoC: topology: Fix bugs of freeing soc topologyYan Wang2018-04-171-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>
| * ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk staticWei Yongjun2018-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes the following sparse warning: sound/soc/amd/acp-da7219-max98357a.c:46:12: warning: symbol 'da7219_dai_clk' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: rt5514: Add the missing register in the readable tableoder_chiou@realtek.com2018-04-161-0/+3
| | | | | | | | | | | | | | The patch adds the missing register in the readable table. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: mediatek: use snd_soc_dai_get_drvdata() to get the private dataRyder Lee2018-04-253-88/+46Star
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: mt6797: add mt6797 platform driverKai Chieh Chuang2018-04-251-0/+1241
| | | | | | | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm_adsp: Account for name prefixes when toggling preloaderCharles Keepax2018-04-241-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>
* | ASoC: sgtl5000: Switch to SPDX identifierFabio Estevam2018-04-232-13/+6Star
| | | | | | | | | | | | | | | | 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>
* | ASoC: sgtl5000: Fix the spelling of 'exceed'Fabio Estevam2018-04-231-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>
* | ASoC: sh: Update menu title and platform dependencyGeert Uytterhoeven2018-04-201-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>
* | ASoC: sh: Drop SUPERH platform dependencyGeert Uytterhoeven2018-04-201-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>
* | ASoC: Intel: kbl_rt5663_rt5514_max98927: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: kbl_rt5663_max98927: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: kbl_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: cht_bsw_nau8824: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: bytcr_rt5651: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: bytcht_es8316: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: Intel: byt-max98090: Replace GFP_ATOMIC with GFP_KERNELVinod Koul2018-04-201-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>
* | ASoC: atmel: simplify getting .drvdataWolfram Sang2018-04-191-4/+2Star
| | | | | | | | | | | | | | | | 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>
* | ASoC: rt5668: fix incorrect 'and' operatorColin Ian King2018-04-191-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>
* | ASoC: Intel: Disable SND_SOC_INTEL_BAYTRAIL when SND_SST_ATOM_HIFI2_PLATFORM ↵Hans de Goede2018-04-191-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>
* | ASoC: topology: Revert recent changes while boot errors are investigatedMark Brown2018-04-192-96/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: topology: Fix build errorsMark Brown2018-04-184-43/+33Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Remove depends on HAS_DMA in case of platform dependencyGeert Uytterhoeven2018-04-184-9/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: topology: Add support for compressed PCMsLiam Girdwood2018-04-171-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>
* | ASoC: topology: Add callback for DAPM route load/unloadLiam Girdwood2018-04-171-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>
* | ASoC: topology: Give more data to clients via callbacksLiam Girdwood2018-04-174-33/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: core: Add name prefix for machines with topology rewritesLiam Girdwood2018-04-171-0/+8
| | | | | | | | | | Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: core: Allow topology to override machine driver FE DAI link config.Liam Girdwood2018-04-172-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>
* | ASoC: nau8824: user configuration of key detectionJohn Hsu2018-04-171-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>
* | ASoC: amd: fixed checkpatch pl warningsMukunda, Vijendar2018-04-172-128/+153
| | | | | | | | | | | | | | fixed checkpatch pl warnings. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Intel: Skylake: Reset stream to link mappingRakesh Ughreja2018-04-171-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>
* | ASoC: Intel: Skylake: Reset DSP Pipelines in preparePardha Saradhi K2018-04-171-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>
* | ASoC: Intel: Skylake: Unify the fw ops for SKL and KBLPradeep Tewani2018-04-173-36/+3Star
| | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Intel: Skylake: Reset DSP pipe in skl_pcm_hw_freeDivya Prakash2018-04-171-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>
* | ASoC: rt1305: fix platform_no_drv_owner.cocci warningsFengguang Wu2018-04-171-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/codecs/rt1305.c:1174:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier driver") CC: Shuming Fan <shumingf@realtek.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt1305: fix ACPI_PTR compile errorShuming Fan2018-04-171-0/+1
| | | | | | | | | | | | | | | | This patch added <linux/acpi.h> header Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Shuming Fan <shumingf@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: Modify clock gating parameter parsing to switchKirill Marinushkin2018-04-161-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the coding style of this piece of code. Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Pan Xiuli <xiuli.pan@linux.intel.com> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Cc: linux-kernel@vger.kernel.org Cc: alsa-devel@alsa-project.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5668: add rt5668B codec driverBard Liao2018-04-164-0/+3965
| | | | | | | | | | | | | | This is the initial codec driver for rt5668b. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt1305: Add RT1305/RT1306 amplifier driverShuming Fan2018-04-164-0/+1475
| | | | | | | | | | | | | | This is the initial amplifier driver for rt1305/rt1306. Signed-off-by: Shuming Fan <shumingf@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk staticWei Yongjun2018-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes the following sparse warning: sound/soc/amd/acp-da7219-max98357a.c:46:12: warning: symbol 'da7219_dai_clk' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: Add missing clock gating parameter when parsing hw_configsKirill Marinushkin2018-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clock gating parameter is a part of `dai_fmt`. It is supported by `alsa-lib` when creating a topology binary file, but ignored by kernel when loading this topology file. After applying this commit, the clock gating parameter is not ignored any more. This solution is backwards compatible. The existing behaviour is not broken, because by default the parameter value is 0 and is ignored. snd_soc_tplg_hw_config.clock_gated = 0 => no effect snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT For example, the following config, based on alsa-lib/src/conf/topology/broadwell/broadwell.conf, is now supported: ~~~~ SectionHWConfig."CodecHWConfig" { id "1" format "I2S" # physical audio format. pm_gate_clocks "true" # clock can be gated } SectionLink."Codec" { # used for binding to the physical link id "0" hw_configs [ "CodecHWConfig" ] default_hw_conf_id "1" } ~~~~ Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Mark Brown <broonie@kernel.org> Cc: Pan Xiuli <xiuli.pan@linux.intel.com> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Cc: linux-kernel@vger.kernel.org Cc: alsa-devel@alsa-project.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: Fix bclk and fsync inversion in set_link_hw_format()Kirill Marinushkin2018-04-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values of bclk and fsync are inverted WRT the codec. But the existing solution already works for Broadwell, see the alsa-lib config: `alsa-lib/src/conf/topology/broadwell/broadwell.conf` This commit provides the backwards-compatible solution to fix this misuse. Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Pan Xiuli <xiuli.pan@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Mark Brown <broonie@kernel.org> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Cc: linux-kernel@vger.kernel.org Cc: alsa-devel@alsa-project.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: fsl_esai: Add freq check in set_dai_sysclk()Nicolin Chen2018-04-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | The freq parameter indicates the physical frequency of an actual input clock or a desired frequency of an output clock for HCKT/R. It should never be passed 0. This might cause Division-by-zero. So this patch adds a check to fix it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: adau17x1: Do not reload dsp-fw if samplerate has not changedDanny Smith2018-04-161-0/+9
| | | | | | | | | | | | | | | | | | | | Reloading fw causes an audiable popping sound, we can avoid this by not reloading if the samplerate is the same as before. Signed-off-by: Danny Smith <dannys@axis.com> Signed-off-by: Robert Rosengren <robert.rosengren@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge branch 'asoc-4.17' into asoc-4.18 to get adau17x1 changes soMark Brown2018-04-168-26/+72
|\| | | | | | | further patches can be applied.
| * ASoC: adau17x1: Handling of DSP_RUN register during fw setupDanny Smith2018-04-132-7/+22
| | | | | | | | | | | | | | | | | | | | | | DSP_RUN needs to be disabled during firmware write otherwise we can end up with undefined behavior if writing to a dsp which is already running firmware. Signed-off-by: Danny Smith <dannys@axis.com> Signed-off-by: Robert Rosengren <robert.rosengren@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>