summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC conditionLibin Yang2020-05-292-15/+0
| | | | | | | | | | | | | As CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC is always enabled in sof-soundwire driver, let's remove the test of CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC in the code. Signed-off-by: Libin Yang <libin.yang@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200529193547.6077-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmiLibin Yang2020-05-291-10/+10
| | | | | | | | | | | | If the driver uses common hdmi, SND_SOC_SOF_HDA_AUDIO_CODEC is required to be enabled. Otherwise, the legacy hda codec driver will not be used. Signed-off-by: Libin Yang <libin.yang@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200529193547.6077-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: SOF: Intel: hda: fix generic hda codec supportKai Vehmanen2020-05-291-6/+45
| | | | | | | | | | | | | | | | | | | | Add support for using generic codec driver with SOF. Generic driver is used if: - snd_sof_intel_hda_common.hda_model="generic" is set, or - fallback if no other codec driver is found The implementation is aligned with snd-hda-intel driver, and fixes audio support for systems like Acer Swift 3 SF314-57G, on which this issue was originally reported. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Hui Wang <hui.wang@canonical.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> BugLink: https://github.com/thesofproject/linux/issues/1807 BugLink: https://bugs.launchpad.net/bugs/1877757 Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: SOF: Intel: Baytrail: fix 'defined but not used' warningsPierre-Louis Bossart2020-05-291-36/+36
| | | | | | | | | | | | | | | With the allmodconfig option, CONFIG_SND_SOC_SOF_BAYTRAIL is disabled due to mutual exclusion with the legacy driver. This generates 'defined by not used' warnings. suspend/resume/remove are only supported for Baytrail for now, so move the code under the CONFIG_SND_SOC_SOF_BAYTRAIL checks. Fixes: ddcccd543f5d ("ASoC: SOF: Intel: byt: Add PM callbacks") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200529150408.17236-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Subject: [PATCH v2] ASoC: soc-pcm: fix BE dai not hw_free and shutdown ↵朱灿灿2020-05-291-3/+3
| | | | | | | | | | | | | | | | | | | during mixer update FE state is SND_SOC_DPCM_STATE_PREPARE now, BE1 is used by FE. Later when new BE2 is added to FE by mixer update, it will call dpcm_run_update_startup() to update BE2's state, but unfortunately BE2 .prepare() meets error, it will disconnect all non started BE. This make BE1 dai skip .hw_free() and .shutdown(), and the BE1 users will never decrease to zero. Signed-off-by: zhucancan <zhucancan@vivo.com> Link: https://lore.kernel.org/r/ALMAWwB5CP9aAcKXCU5FzqqF.1.1590747164172.Hmail.zhucancan@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: reduce verbosity of error messages for sof-dai and sof-linkPierre-Louis Bossart2020-05-292-2/+10
| | | | | | | | | | | | | | | | | | | | | | Recent changes result in multiple dmesg traces such as: [ 14.410435] Audio Port: ASoC: error at snd_soc_link_startup on Audio Port: 1 [ 14.410446] sst-mfld-platform sst-mfld-platform: ASoC: error at snd_soc_dai_startup on media-cpu-dai: 1 These messages are not really errors, when dai and dai-link callbacks return the value of e.g. snd_pcm_hw_constraint_single() the result is "Positive if the value is changed, zero if it's not changed, or a negative error code" Add a simple test to skip the checks for positive returned values Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200529123613.13447-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC topology header parsing refinement" from Keyon Jie ↵Mark Brown2020-05-291-58/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <yang.jie@linux.intel.com>: This small series is to optimize the header logging during the topology parsing. This is verified work fine on both SOF and SST drivers. Change History: v3: - Remove using the separated soc_pass_load() function and merge it to the soc_tplg_load_header() body. - Add more Tested-by tags. v2: - Change the internal used array to be 'static' to fix the issue reported by: kbuild test robot <lkp@intel.com> - Add testing coverage including Intel SST driver also. v1: - Initial version. Keyon Jie (2): ASoC: topology: refine and log the header in the correct pass ASoC: topology: remove the redundant pass checks sound/soc/soc-topology.c | 96 ++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 58 deletions(-) -- 2.25.1
| * ASoC: topology: remove the redundant pass checksKeyon Jie2020-05-291-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we have check the 'pass' in the soc_elem_pass_load(), so no need to check it again in each specific elem_load function, at the same time, the tplg->pos will be reset to the next header base when the pass is mismatched, so the increasing of the tplg->pos in these cases made no sense. Here remove all of them. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Tested-by: Vamshi Kerishna Gopal <vamshi.krishna.gopal@intel.com> Tested-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200527022801.336264-3-yang.jie@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: topology: refine and log the header in the correct passKeyon Jie2020-05-291-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check (tplg->pass == le32_to_cpu(hdr->type)) makes no sense as it is comparing two different enums, refine the element loading functions, and log the information when the header is being parsed in the corresponding parsing pass. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Tested-by: Vamshi Kerishna Gopal <vamshi.krishna.gopal@intel.com> Tested-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200527022801.336264-2-yang.jie@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failedXiyu Yang2020-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fsl_asrc_dma_hw_params() invokes dma_request_channel() or fsl_asrc_get_dma_channel(), which returns a reference of the specified dma_chan object to "pair->dma_chan[dir]" with increased refcnt. The reference counting issue happens in one exception handling path of fsl_asrc_dma_hw_params(). When config DMA channel failed for Back-End, the function forgets to decrease the refcnt increased by dma_request_channel() or fsl_asrc_get_dma_channel(), causing a refcnt leak. Fix this issue by calling dma_release_channel() when config DMA channel failed. Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Link: https://lore.kernel.org/r/1590415966-52416-1-git-send-email-xiyuyang19@fudan.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt1015: Enable class-D silence and clock detectionsderek.fang2020-05-291-1/+1
| | | | | | | | | | | | | | | | Avoid noise under bypass boost mode. Signed-off-by: derek.fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1590750310-30085-1-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tlv320adcx140: Fix dt-binding-check issueDan Murphy2020-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix dt-binding-check issue ti,gpi-config:0:0: 4 is greater than the maximum of 1 ti,gpi-config:0:1: 5 is greater than the maximum of 1 ti,gpi-config:0:2: 6 is greater than the maximum of 1 ti,gpi-config:0:3: 7 is greater than the maximum of 1 Reported-by: Rob Herring <robh@kernel.org> Signed-off-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200528144711.18065-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: img-i2s-out: Fix runtime PM imbalance on errorDinghao Liu2020-05-291-2/+6
|/ | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20200529012230.5863-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: Removing unnecessary instance initializationRavulapati Vishnu vardhan rao2020-05-281-8/+0
| | | | | | | | | | In DMA pointer the initialzation of instance is of no use. In fact it will reinitialize the instance variable which is already opened and functional. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1590652337-21587-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sta32x: add missed function calls in error pathsChuhong Yuan2020-05-281-2/+9
| | | | | | | | | sta32x_probe() forgets to call undo functions when it fails, add the missed function calls to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Link: https://lore.kernel.org/r/20200528102004.911653-1-hslester96@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5682: split i2c driver into separate moduleArnd Bergmann2020-05-289-764/+847
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With SND_SOC_AMD_RV_RT5682_MACH using the i2c version of the driver, we can easily get a build failure when I2C is built-in but soundwire is not: WARNING: unmet direct dependencies detected for SND_SOC_RT5682 Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (I2C [=y] || SOUNDWIRE [=m]) && (SOUNDWIRE [=m] || !SOUNDWIRE [=m]) && (I2C [=y] || !I2C [=y]) Selected by [y]: - SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y] Selected by [m]: - SND_SOC_RT5682_SDW [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=m] && (I2C [=y] || !I2C [=y]) Rework the driver to have three separate modules, with the main driver just dealing with the common bits and the actual initialization as part of i2c and sdw specific modules. The conversion is fairly mechanical to keep it easy to review, i.e. it moves code around with the minimal required renaming and changes. Fixes: 6b8e4e7db3cd ("ASoC: amd: Add machine driver for Raven based platform") Fixes: fd443a20c2f0 ("ASoC: rt5682: fix I2C/Soundwire dependencies") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200528091851.2889754-1-arnd@arndb.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: nau8810: add I2C device and compatible IDSeven Lee2020-05-282-2/+7
| | | | | | | | The nau8810 driver can also compatible with nau8812 and nau8814. Signed-off-by: Seven Lee <wtli@nuvoton.com> Link: https://lore.kernel.org/r/20200528070510.29959-1-wtli@nuvoton.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ingenic: Unconditionally depend on devicetreePaul Cercueil2020-05-286-11/+8
| | | | | | | | | | | | | All boards with Ingenic SoCs probe with devicetree already, we have no use for a non-devicetree path. This solves some compilation warnings that were caused by unused variables in the case where CONFIG_OF was disabled. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200523125455.12392-1-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC: SOF: finalize Baytrail/CherryTrail support" from ↵Mark Brown2020-05-2713-47/+122
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This long-overdue patchset adds missing system suspend/resume support and hardens the IPC to solve module load/unload issues on specific devices such as Cyan Chromebook. With this series SOF is finally iso-feature with the legacy driver. Thanks to Ranjani and Keyon for the basic patches and Enric for testing. The last part needed for Baytrail/Cherrytrail is simplification of the driver/card names and turn-key UCM support (on-going work with Jaroslav). Keyon Jie (1): ASoC: SOF: Intel: BYT: harden IPC initialization and handling Pierre-Louis Bossart (3): ASoC: Intel: bytcr_rt5640/51: remove .ignore_suspend ASoC: Intel: byt/cht: add .pm_ops ASoC: SOF: Intel: BYT: mask BUSY or DONE interrupts in handler Ranjani Sridharan (4): ASoC: SOF: Intel: byt: Add PM callbacks ASoC: SOF: pm: handle resume on legacy Intel platforms ASoC: SOF: ipc: ignore DSP replies received when they are not expected ASoC: SOF: Intel: BYT: add .remove op sound/soc/intel/boards/bytcht_cx2072x.c | 3 + sound/soc/intel/boards/bytcht_da7213.c | 3 + sound/soc/intel/boards/bytcht_es8316.c | 3 + sound/soc/intel/boards/bytcr_rt5640.c | 7 +- sound/soc/intel/boards/bytcr_rt5651.c | 6 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 3 + sound/soc/intel/boards/cht_bsw_nau8824.c | 3 + sound/soc/intel/boards/cht_bsw_rt5645.c | 3 + sound/soc/intel/boards/cht_bsw_rt5672.c | 3 + sound/soc/sof/intel/byt.c | 116 ++++++++++++++----- sound/soc/sof/ipc.c | 9 +- sound/soc/sof/pm.c | 8 +- sound/soc/sof/sof-priv.h | 2 +- 13 files changed, 122 insertions(+), 47 deletions(-) base-commit: 0d71a5cf691a8226151ceeb79fb872925f053df5 -- 2.20.1
| * ASoC: SOF: Intel: BYT: harden IPC initialization and handlingKeyon Jie2020-05-271-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On probe and reset, we should not touch the SHIM_IMRD register since it is configured by firmware. The driver only configures SHIM_IMRX with the BUSY interrupt enabled by default and DONE interrupt disabled. When sending an IPC message, the DONE interrupt is enabled until the DSP response is provided. This sequence hardens the IPC communication and avoid interrupt-related issues when adding/removing modules or during system suspend-resume transitions. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200526203640.25980-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: Intel: BYT: mask BUSY or DONE interrupts in handlerPierre-Louis Bossart2020-05-271-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DSP may send the same interrupt multiple times before it's handled in the interrupt thread. Rather than masking it in the thread, mask it in the handler directly. This patch also removes useless checks that cannot happen, and masks that are set don't need to be re-tested. Suggested-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> BugLink: https://github.com/thesofproject/linux/issues/1492 Link: https://lore.kernel.org/r/20200526203640.25980-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: Intel: BYT: add .remove opRanjani Sridharan2020-05-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | Add .remove op that disables interrupts and reset the DSP for BYT and CHT platforms. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200526203640.25980-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: ipc: ignore DSP replies received when they are not expectedRanjani Sridharan2020-05-272-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | We currently ignore the reply messages from the DSP when they are not expected but call it out as an error. Change the error message to a debug message. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200526203640.25980-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: Intel: byt/cht: add .pm_opsPierre-Louis Bossart2020-05-279-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add required .pm_ops to support suspend/resume on baytrail/cherrytrail machines. This .pm_ops is conditionally-added to avoid impacting the legacy driver where power management is handled differently. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200526203640.25980-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: Intel: bytcr_rt5640/51: remove .ignore_suspendPierre-Louis Bossart2020-05-272-7/+0
| | | | | | | | | | | | | | | | | | | | | | Low-power playback was never enabled on Baytrail devices, remove what looks like copy/paste from other machine drivers which were never submitted upstream. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200526203640.25980-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: pm: handle resume on legacy Intel platformsRanjani Sridharan2020-05-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | Add new case when set_power_state() is not supported, e.g. for Intel Baytrail/Cherrytrail legacy platforms. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200526203640.25980-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: Intel: byt: Add PM callbacksRanjani Sridharan2020-05-271-0/+36
| | | | | | | | | | | | | | | | | | | | Add the PM callbacks for BYT/CHT platforms. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200526203640.25980-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: mmp-sspa: Fix return value check in asoc_mmp_sspa_probe()Wei Yongjun2020-05-271-4/+4
| | | | | | | | | | | | | | | | | | | | In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200527030210.124393-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tlv320adcx140: Fix warnings when using W=1Dan Murphy2020-05-271-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the warnings when using the W=1 compiler flag. sound/soc/codecs/tlv320adcx140.c: In function ‘adcx140_reset’: sound/soc/codecs/tlv320adcx140.c:570:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 570 | int ret = 0; | ^~~ This was set but only used in case where the reset GPIO is not defined. Have the function return the value of ret. sound/soc/codecs/tlv320adcx140.c: In function ‘adcx140_codec_probe’: sound/soc/codecs/tlv320adcx140.c:778:18: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 778 | if (bias_source < ADCX140_MIC_BIAS_VAL_VREF || | ^ sound/soc/codecs/tlv320adcx140.c:789:18: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 789 | if (vref_source < ADCX140_MIC_BIAS_VREF_275V || This condition will not occur since if the dt property is not set then the *_source variable is set to the default value. So there is no way that *_source can be less then 0. Which is what each #define is set to. The code just needs to make sure that the dt property is not out of the upper bounds. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200526175247.15309-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm8962: Fix runtime PM imbalance on errorDinghao Liu2020-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200527024625.9937-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: img-spdif-in: Fix runtime PM imbalance on errorDinghao Liu2020-05-271-1/+3
| | | | | | | | | | | | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20200527084326.4131-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tlv320adcx140: Add support for configuring GPI pinsDan Murphy2020-05-272-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Add support to configure the GPI pins to the specific configuration. The pins can be disabled or be configured as data input for any of the digital mic channels. In addition the GPI can be used a a general purpose input, a Master clock input or an ASI input for daisy chaining devices. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200526200917.10385-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | dt-bindings: sound: tlv320adcx140: Add GPI config propertyDan Murphy2020-05-271-0/+27
| | | | | | | | | | | | | | | | | | | | Add an array property that configures the General Purpose Input (GPI) register. The device has 4 GPI pins and each pin can be configured in 1 of 7 different ways. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200526200917.10385-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: img-spdif-out: Fix runtime PM imbalance on errorDinghao Liu2020-05-271-1/+3
|/ | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20200527084610.4790-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tas2552: Fix runtime PM imbalance in tas2552_component_probeDinghao Liu2020-05-261-0/+1
| | | | | | | | | | pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Link: https://lore.kernel.org/r/20200525071732.5887-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fix incomplete error-handling in img_i2s_in_probe.Qiushi Wu2020-05-261-0/+1
| | | | | | | | | | | Function "pm_runtime_get_sync()" is not handled by "pm_runtime_put()" if "PTR_ERR(rst) == -EPROBE_DEFER". Fix this issue by adding "pm_runtime_put()" into this error path. Fixes: f65bb92ca12e ("ASoC: img-i2s-in: Add runtime PM") Signed-off-by: Qiushi Wu <wu000273@umn.edu> Link: https://lore.kernel.org/r/20200525055011.31925-1-wu000273@umn.edu Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ti: Fix runtime PM imbalance in omap2_mcbsp_set_clks_srcDinghao Liu2020-05-261-5/+2
| | | | | | | | | | | When clk_set_parent() returns an error code, a pairing runtime PM usage counter increment is needed to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200525085848.4227-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fix semicolon.cocci warningskbuild test robot2020-05-261-1/+1
| | | | | | | | | | | | | | sound/soc/codecs/zl38060.c:298:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 52e8a94baf90 ("ASoC: Add initial ZL38060 driver") Signed-off-by: kbuild test robot <lkp@intel.com> CC: Sven Van Asbroeck <thesven73@gmail.com> Link: https://lore.kernel.org/r/20200525184351.GA37386@5cf39b9a5cc3 Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC: add soc-link" from Kuninori Morimoto ↵Mark Brown2020-05-257-131/+223
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <kuninori.morimoto.gx@renesas.com>: Hi Mark Current ALSA SoC is handling dai_link related operation, but it is implmemented directly without using function/macro, and at random place. This v4 patch-set creates new snd_soc_link_xxx() functions which handles dai_link related operation, and implmement these at new soc-link.c. v3 -> v4 - add Reviewed-by from Ranjani and Pierre-Louis - fix bisection error at [2/7] v2 -> v3 - add missing #include <sound/soc-link.h> in soc-link.c v1 -> v2 - #include <sound/soc-link.h> is added on each c source file instead of soc.h - not have extra error message after snd_soc_link_xxx(), because it already indicate it via snc_link_ret() - snd_soc_link_compr_xxx() doesn't have rtd parameter, because it can be created from cstream Link: https://lore.kernel.org/r/87lflk4yk3.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/874ksa59wc.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/877dx868op.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (7): ASoC: add soc-link.c ASoC: soc-link: move soc_rtd_xxx() ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx() ASoC: soc-link: add snd_soc_link_be_hw_params_fixup() ASoC: soc-link: add snd_soc_link_compr_startup() ASoC: soc-link: add snd_soc_link_compr_shutdown() ASoC: soc-link: add snd_soc_link_compr_set_params() include/sound/soc-link.h | 27 +++++++ sound/soc/Makefile | 2 +- sound/soc/soc-compress.c | 46 ++++-------- sound/soc/soc-core.c | 18 ++--- sound/soc/soc-dai.c | 9 ++- sound/soc/soc-link.c | 150 +++++++++++++++++++++++++++++++++++++++ sound/soc/soc-pcm.c | 86 ++++------------------ 7 files changed, 219 insertions(+), 119 deletions(-) create mode 100644 include/sound/soc-link.h create mode 100644 sound/soc/soc-link.c -- 2.17.1 Thank you for your help !! Best regards --- Kuninori Morimoto
| * ASoC: soc-link: add snd_soc_link_compr_set_params()Kuninori Morimoto2020-05-253-10/+20
| | | | | | | | | | | | | | | | | | | | | | dai_link related function should be implemented at soc-link.c. This patch adds snd_soc_link_compr_set_params(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87sgfo3k6q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: soc-link: add snd_soc_link_compr_shutdown()Kuninori Morimoto2020-05-253-4/+13
| | | | | | | | | | | | | | | | | | | | | | dai_link related function should be implemented at soc-link.c. This patch adds snd_soc_link_compr_shutdown(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87tv043k6u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: soc-link: add snd_soc_link_compr_startup()Kuninori Morimoto2020-05-253-17/+22
| | | | | | | | | | | | | | | | | | | | | | dai_link related function should be implemented at soc-link.c. This patch adds snd_soc_link_compr_startup(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87v9kk3k6y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: soc-link: add snd_soc_link_be_hw_params_fixup()Kuninori Morimoto2020-05-255-16/+26
| | | | | | | | | | | | | | | | | | | | | | dai_link related function should be implemented at soc-link.c. This patch adds snd_soc_link_be_hw_params_fixup(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87wo503k73.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: soc-link: remove unneeded parameter from snd_soc_link_xxx()Kuninori Morimoto2020-05-253-33/+29
| | | | | | | | | | | | | | | | | | | | | | "rtd" can be created from "substream". Let's cleanup snd_soc_link_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87y2pg3k78.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: soc-link: move soc_rtd_xxx()Kuninori Morimoto2020-05-253-75/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | dai_link related function should be implemented at soc-link.c. This patch moves soc-pcm soc_rtd_xxx() to soc-link as snd_soc_link_xxx() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87zh9w3k7k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: add soc-link.cKuninori Morimoto2020-05-254-9/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Current ALSA SoC has many dai_link->xxx() functions. But, it is implemented randomly at random place. This patch creats new soc-link.c and collect dai_link related operation into it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/871rn84ys5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "ASoC: SOF: extended manifest support for 5.8" from Kai ↵Mark Brown2020-05-253-4/+269
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vehmanen <kai.vehmanen@linux.intel.com>: Hello, extended firmware manifest is a method to retrieve capabilities directly from the firmware file instead of routing the information via the DSP and reading it back via IPC (latter mechanism still supported but will be deprecated). This feature was briefly merged to 5.8 with the series sent on 2020-Apr-15, but due to a regression hit with exporting uapi headers, the patches got dropped. Here's an update with the uapi header issue fixed, rebased to latest 'for-5.8' and a few minor fixes. This has been sitting in sof-dev for some weeks and no further issues have been found. We also added a check for the uapi-export case to SOF CI, so such errors would not slip through again in the future. Tooling support to create firmware files with an extended header is available in SOF firmware repository (see the rimage tool) and this part is already merged. Karol Trzcinski (5): ASoC: SOF: loader: Adjust validation condition for fw_offset ASoC: SOF: Introduce extended manifest ASoC: SOF: ext_manifest: parse firmware version ASoC: SOF: ext_manifest: parse windows ASoC: SOF: ext_manifest: parse compiler version include/sound/sof/ext_manifest.h | 95 +++++++++++++++++ sound/soc/sof/intel/hda-loader.c | 2 +- sound/soc/sof/loader.c | 176 ++++++++++++++++++++++++++++++- 3 files changed, 269 insertions(+), 4 deletions(-) create mode 100644 include/sound/sof/ext_manifest.h -- 2.26.2
| * | ASoC: SOF: ext_manifest: parse compiler versionKarol Trzcinski2020-05-252-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler version and description can be extracted from the extended manifest content. This information known at build time does not need to be provided in a mailbox. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200520165911.21696-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: ext_manifest: parse windowsKarol Trzcinski2020-05-252-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window description can be extracted from the extended manifest content. This information known at build time does not need to be provided in a mailbox. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200520165911.21696-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: ext_manifest: parse firmware versionKarol Trzcinski2020-05-252-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware version can be extracted from the extended manifest content. This information known at build time does not need to be provided in a mailbox. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200520165911.21696-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>