- 25 Aug, 2022 12 commits
-
-
Kuninori Morimoto authored
commit b7898396 ("ASoC: soc-pcm: Fix and cleanup DPCM locking") added __soc_pcm_close() for non-lock version of soc_pcm_close(). But soc_pcm_close() is not using it. It is no problem, but confusable. static int __soc_pcm_close(...) { => return soc_pcm_clean(rtd, substream, 0); } static int soc_pcm_close(...) { ... snd_soc_dpcm_mutex_lock(rtd); => soc_pcm_clean(rtd, substream, 0); snd_soc_dpcm_mutex_unlock(rtd); return 0; } This patch use it. Fixes: b7898396 ("ASoC: soc-pcm: Fix and cleanup DPCM locking") Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87czctgg3w.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Martin Povišer <povik+lin@cutebit.org>: sending what should be the final touches on Apple MCA driver. It most likely goes without saying but please do not merge the DT additions into the ASoC tree.
-
Yang Yingliang authored
Use kmemdup_nul() helper instead of open-coding to simplify the code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220825123525.1845695-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Martin Povišer authored
Add binding schema for MCA I2S transceiver found on Apple M1 and other chips. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220824160715.95779-2-povik+lin@cutebit.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Martin Povišer authored
In DAI ops, accesses to the native cluster (of the DAI), and to data of clusters related to it by a DPCM frontend-backend link, should have been synchronized by the 'pcm_mutex' lock at ASoC level. What is not covered are the 'port_driver' accesses on foreign clusters to which the current cluster has no a priori relation, so fill in locking for that. (This should only matter in bizarre configurations of sharing one MCA peripheral between ASoC cards.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220824160715.95779-5-povik+lin@cutebit.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Martin Povišer authored
Add ASoC platform driver for the MCA peripheral found on Apple M1 and other chips. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220824160715.95779-4-povik+lin@cutebit.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Chunxu Li <chunxu.li@mediatek.com>: In these patches, we update SOF driver for mt8186
-
Tommaso Merciai authored
Add support for Noise Gate Threshold reg (ANTH reg 0x40 bit 4 to 7) References: - https://datasheets.maximintegrated.com/en/ds/MAX98089.pdf, p75 Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com> Link: https://lore.kernel.org/r/20220825101714.81580-1-tommaso.merciai@amarulasolutions.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Zhu Ning authored
The registers may be lost after suspend due to powerdown. regcache_sync solves this issue. Signed-off-by: Zhu Ning <zhuning@everest-semi.com> Link: https://lore.kernel.org/r/20220825014952.1038508-1-zhuning0077@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chunxu Li authored
Use generic sof_ipc_msg_data instead of specific implementation as they do the same things Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220825065411.31279-4-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chunxu Li authored
Use generic IPC stream and mailbox ops for mt8186 Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220825065411.31279-3-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chunxu Li authored
Add dsp ops callback to register AFE DL1/DL2/UL1/UL2 SOF dai's with ALSA Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220825065411.31279-2-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 24 Aug, 2022 4 commits
-
-
Mark Brown authored
Merge series from Chunxu Li <chunxu.li@mediatek.com>: Add SOF related field. 1. Add a property "mediatek,adsp", Only when adsp phandle could be retrieved, from DTS, the SOF related part of machine driver is executed. 2. Add a property "mediatek,dai-link" to support dai-links could be specified from DTS
-
chunxu.li authored
Add SOF related field. 1. Add a property "mediatek,adsp", Only when adsp phandle could be retrieved, from DTS, the SOF related part of machine driver is executed. 2. Add a property "mediatek,dai-link" to support dai-links could be specified from DTS Signed-off-by: chunxu.li <chunxu.li@mediatek.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220824122319.23918-3-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
chunxu.li authored
Add SOF related field. 1. Add a property "mediatek,adsp", Only when adsp phandle could be retrieved, from DTS, the SOF related part of machine driver is executed. 2. Add a property "mediatek,dai-link" to support dai-links could be specified from DTS Signed-off-by: chunxu.li <chunxu.li@mediatek.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220824122319.23918-2-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
After using 'res_node' returned by of_parse_phandle(), of_node_put() need be called to decrease the refcount. Fixes: fb5319af ("ASoC: SOF: imx: Add i.MX8ULP HW support") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220824013234.375738-2-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 23 Aug, 2022 16 commits
-
-
Nathan Chancellor authored
Clang warns: sound/soc/codecs/src4xxx.c:280:3: error: variable 'd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:298:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_11, d); ^ sound/soc/codecs/src4xxx.c:223:20: note: initialize the variable 'd' to silence this warning int val, pj, jd, d; ^ = 0 sound/soc/codecs/src4xxx.c:280:3: error: variable 'jd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:293:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_10, jd); ^~ sound/soc/codecs/src4xxx.c:223:17: note: initialize the variable 'jd' to silence this warning int val, pj, jd, d; ^ = 0 sound/soc/codecs/src4xxx.c:280:3: error: variable 'pj' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:288:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_0F, pj); ^~ sound/soc/codecs/src4xxx.c:223:13: note: initialize the variable 'pj' to silence this warning int val, pj, jd, d; ^ = 0 3 errors generated. The datasheet does not have any default values for these regmap values so pick some arbitrary values and print to the user that this is the case to silence the warnings. Link: https://github.com/ClangBuiltLinux/linux/issues/1691Reported-by: kernel test robot <lkp@intel.com> Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com> Suggested-by: Matt Flax <flatmax@flatmax.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Matt Flax <flatmax@flatmax.com> Link: https://lore.kernel.org/r/20220823151939.2493697-1-nathan@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
To make sure that we start from a clean state next time when the DSP is powered up after a firmware crash or boot failure we must skip the IMR booting attempt. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-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/20220823124359.24865-1-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Rob Herring authored
In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically). Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220823145649.3118479-8-robh@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Firmware image must start with an extended manifest. Add a check to make sure that the image does contain it. The magic number (the first u32 of a firmware image if manifest is present) for an IPC4 image must be 0x31454124 (ASCI "$AE1"). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220823124219.927-1-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Sparse warning: sound/soc/sof/imx/imx8ulp.c:416:24: error: symbol 'sof_imx8ulp_ops' was not declared. Should it be static? Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220823154027.762889-1-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shengjiu Wang authored
The bclk_ratio is set by .set_bclk_ratio API. bclk_ratio = slots * slot_width So if slots is not set by .set_tdm_slot, then it can be calculated by bclk_ratio. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1659681926-13493-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, The FSR (Firmware State Register) holds the ROM state information, it does not contain error information. The FSR itself is a bit more complicated as well as the state depends on the module currently in use. The error code from ROM or the status code from the firmware is located at the next register. Fix the handling of the FSR in order to provide usable and human readable (in most cases) report on the status and error. Regards, Peter --- Peter Ujfalusi (3): ASoC: SOF: Intel: hda: Correct the ROM/FW state reporting code ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions sound/soc/sof/intel/hda-loader.c | 10 +-- sound/soc/sof/intel/hda.c | 147 ++++++++++++++++++++++++++----- sound/soc/sof/intel/hda.h | 69 +++++++++++++-- 3 files changed, 194 insertions(+), 32 deletions(-) -- 2.37.0
-
Mark Brown authored
Merge series from Chunxu Li <chunxu.li@mediatek.com>: In these patches, we introduce function sof_of_machine_select for SOF
-
Chunxu Li authored
Add .of_machines field sof_mt8186_machs for mt8186 Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220805070449.6611-3-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chunxu Li authored
From current design in sof_machine_check and snd_sof_new_platform_drv, the SOF can only support ACPI type machine. 1. In sof_machine_check if there is no ACPI machine exist, the function will return -ENODEV directly, that's we don't expected if we do not base on ACPI machine. 2. In snd_sof_new_platform_drv the component driver need a driver name to do ignore_machine, currently the driver name is obtained from machine->drv_name, and the type of machine is snd_soc_acpi_mach. So we add a new function named sof_of_machine_select that we can pass sof_machine_check and obtain info required by snd_sof_new_platform_drv. Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220805070449.6611-2-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
All code have been switched to use the new FSR defines and macros for ROM/FW state tracking. The old definitions can be dropped now. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220712125734.30512-4-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Switch to use the newly added FSR (Firmware State Register) definitions for DSP state handling and targeting. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220712125734.30512-3-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shengjiu Wang authored
With disabling combine mode, the multiple successive FIFO registers or non successive FIFO registers of SAI module can work with the sdma multi fifo script. This patch is to configure the necessary information to the SDMA engine driver for support multi fifo script. 'words_per_fifo' is the channels for each dataline 'n_fifos_src' and 'n_fifos_dst' are the fifo number 'stride_fifos_src' and 'stride_fifos_dst' are the stride between enable FIFOs 'maxburst' is the multiply of datalines Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661218573-2154-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Daniel Baluta authored
dai_posn is set but never used. Initial intention was to use dai_posn to shorthen one code line but it looks fine without it too. Fixes: c1a731c7 ("ASoC: SOF: compress: Add support for computing timestamps") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20220822174937.254873-1-daniel.baluta@oss.nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
ye xingchen authored
Return the value from asoc_ssc_init() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220823075335.209072-1-ye.xingchen@zte.com.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
chunxu.li authored
The field 'topology_shortname' in 'snd_soc_card' is defined as char[32], Current card name will be truncated when SOF is enabled, so rename the sound card name. Signed-off-by: chunxu.li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220823090735.12176-1-chunxu.li@mediatek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 22 Aug, 2022 2 commits
-
-
Jonathan Cameron authored
struct iio_chan_spec is meant to be opaque to IIO consumer drivers which should only use the interfaces in linux/iio/consumer.h. Use the provided accessor function to find get the type of the channel instead of directly reading it form the structure. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Link: https://lore.kernel.org/r/20220821160914.2207116-1-jic23@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
soc_new_pcm() sets pcm->no_device_suspend, but it sets other pcm->xxx at the same function with different timing. pcm->no_device_suspend setup timing has no effect. This patch tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87bksdgflq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 19 Aug, 2022 6 commits
-
-
Mark Brown authored
Merge series from Chunxu Li <chunxu.li@mediatek.com>: In these patches, we add SOF support for mt8186 which have HiFi5 DSP inside.
-
Dan Carpenter authored
The list iterator can never be NULL. Delete the bogus NULL checks. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/Yv8ePUuBfzaRu6xV@kiliSigned-off-by: Mark Brown <broonie@kernel.org>
-
Martin Povišer authored
If a 'set_bclk_ratio' call is attempted on a DAI not implementing the method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can still be okay with the ratio, just does not care to register a handler. No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect the return value, but -ENOSUPP disables an error print from within the common soc_dai_ret return filter. With the new behavior a machine driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of which may care about the ratio, some of which may not. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220818165336.76403-1-povik+lin@cutebit.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Move platform_device_unregister() to a new label to make code more clean. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220819073758.1273160-3-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use dev_err_probe() to simplify code and print error code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Add missing platform_device_unregister() in error path in acp_pci_probe(). Fixes: c49f5e74 ("ASoC: amd: acp: Add error handling cases") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220819073758.1273160-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-