summary refs log tree commit diff
path: root/sound/soc
AgeCommit message (Collapse)Author
2021-09-16Merge series "ASoC: SOF: Clean up the probe support" from Peter Ujfalusi ↵Mark Brown
<peter.ujfalusi@linux.intel.com>: Hi, The probe debug feature of SOF can be used to extract streams of data from a given point of a pipeline for analysis. The support is implemented by using the ALSA/ASoC compress support for the capture stream, but the code can not be used by/for a normal compressed data stream. It is a debug feature. Merge the probe implementation in the core (compress.c/h and probe.c/h) into one file: sof-probes.c/h Rename the Intel HDA specific probe implementation from hda-compressc.c to hda-probes.c We also need to add IPC logging support for the probes messages and drop the unused references to SOF compress to have reasonably clean code. Regards, Peter --- Peter Ujfalusi (5): ASoC: SOF: ipc: Add probe message logging to ipc_log_header() ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference ASoC: SOF: probe: Merge and clean up the probe and compress files ASoC: SOF: Intel: Rename hda-compress.c to hda-probes.c ASoC: SOF: sof-probes: Correct the function names used for snd_soc_cdai_ops Ranjani Sridharan (1): ASoC: SOF: compress: move and export sof_probe_compr_ops sound/soc/sof/Makefile | 3 +- sound/soc/sof/compress.c | 147 --------- sound/soc/sof/compress.h | 32 -- sound/soc/sof/core.c | 2 +- sound/soc/sof/debug.c | 2 +- sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/hda-dai.c | 16 +- .../intel/{hda-compress.c => hda-probes.c} | 0 sound/soc/sof/ipc.c | 23 ++ sound/soc/sof/pcm.c | 6 +- sound/soc/sof/probe.h | 85 ------ sound/soc/sof/sof-priv.h | 5 - sound/soc/sof/{probe.c => sof-probes.c} | 280 +++++++++++------- sound/soc/sof/sof-probes.h | 38 +++ 14 files changed, 248 insertions(+), 393 deletions(-) delete mode 100644 sound/soc/sof/compress.c delete mode 100644 sound/soc/sof/compress.h rename sound/soc/sof/intel/{hda-compress.c => hda-probes.c} (100%) delete mode 100644 sound/soc/sof/probe.h rename sound/soc/sof/{probe.c => sof-probes.c} (52%) create mode 100644 sound/soc/sof/sof-probes.h -- 2.33.0
2021-09-16ASoC: au1x: Convert to modern terminology for DAI clockingMark Brown
As part of retiring the old macros defining the DAI clocking mode in the DAI format update the au1x drivers to use the new style macros. Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: atmel: Convert to new style DAI format definitionsMark Brown
Convert the Atmel drivers to use the new style defines for clocking in DAI formats. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Acked-by: Peter Rosin <peda@axentia.se>
2021-09-16misc: cs35l41: Remove unused pdn variableCharles Keepax
Remove pdn variable that was made redundant in an earlier patch. Fixes: c2f14cc2bcdd ("ASoC: cs35l41: Fix use of an uninitialised variable") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210916082346.12001-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: imx8m: add SAI1 infoViorel Suman
Add SAI1 instance to imx8m_dai array. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210916073725.359561-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: cs42l42: Minor fix all errors reported by checkpatch.pl scriptVitaly Rodionov
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210916110932.10293-1-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: core: Move probe work related code under a single if () branchPeter Ujfalusi
Relocate the INIT_WORK() at the same place where we schedule the work to make the code simpler and easier to follow. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210916124902.24248-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: sof-probes: Correct the function names used for snd_soc_cdai_opsPeter Ujfalusi
The snd_soc_cdai_ops have startup and shutdown callbacks defined unlike the component callbacks where open and free is used. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: Intel: Rename hda-compress.c to hda-probes.cPeter Ujfalusi
The hda-compress.c is implementing the SOF probe support for intel HDA platforms using compress API. To avoid the confusion, rename it to reflect this. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: probe: Merge and clean up the probe and compress filesPeter Ujfalusi
The probe debug functionality is implemented via compress support and it was spread across two set of files: probe.c/h compress.c/h Merge the two files into sof-probes.s/h and clean them up by removing unused struct definitions, functions. We can also move most of the functions static as they are only used internally. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: compress: move and export sof_probe_compr_opsRanjani Sridharan
sof_probe_compr_ops are not platform-specific. So move it to common compress code and export the symbol. The compilation of the common compress code is already dependent on the selection of CONFIG_SND_SOC_SOF_DEBUG_PROBES, so no need to check the Kconfig section for defining sof_probe_compr_ops again. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS referencePeter Ujfalusi
The SND_SOC_SOF_COMPRESS is not valid Kconfig option, remove it. At the same time remove the also the declaration of the non existent sof_compressed_ops. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-16ASoC: SOF: ipc: Add probe message logging to ipc_log_header()Peter Ujfalusi
Probe related messages are missing from the logging, for example the PROBE_INIT would show up as: ipc tx: 0xc0010000: unknown GLB command ipc tx succeeded: 0xc0010000: unknown GLB command Add code to handle the probe messages to have human readable output Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210916103211.1573-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: debug: No need to export the snd_sof_debugfs_io_item()Peter Ujfalusi
The snd_sof_debugfs_io_item() only used within debug.c, no need to export it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: loader: Use the generic ops for region debugfs handlingPeter Ujfalusi
Do not access the sdev->bar[] directly to make the code generic, use the new generic ops for handing the regions for debugfs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: Intel: Provide debugfs_add_region_item ops for corePeter Ujfalusi
Set the generic iomem callback for debugfs_add_region_item to avoid regression when the core switches to use the generic interface for the regions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: imx: Provide debugfs_add_region_item ops for corePeter Ujfalusi
Set the generic iomem callback for debugfs_add_region_item to avoid regression when the core switches to use the generic interface for the regions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: debug: Add generic API and ops for DSP regionsPeter Ujfalusi
Add new debugfs_add_region_item along with a generic wrapper snd_sof_debugfs_add_region_item() to abstract away the DSP regions related debugfs support. At the same commit add iomem based generic implementation for the new ops Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: core: Do not use 'bar' as parameter for block_read/writePeter Ujfalusi
The use of bar in the core poses limits on the portability of the code to other, non iomapped platforms. To make the API more generic, remove the use of 'bar' as parameter for the block copy API. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: loader: No need to export snd_sof_fw_parse_ext_data()Peter Ujfalusi
snd_sof_fw_parse_ext_data() is used only internally within loader.c and there is no need to export it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: imx: Do not initialize the snd_sof_dsp_ops.read64Peter Ujfalusi
The read64 operation is not used by IMX along with other IO functions. No need to set it for the ops. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210915122116.18317-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: ipc: Remove snd_sof_dsp_mailbox_init()Peter Ujfalusi
The snd_sof_dsp_mailbox_init() is called only from sof_get_windows() to set the sdev->dsp_box.offset/size and sdev->host_box.offset/size Instead of using a function, set the offsets and sizes like we do for the other boxes in sof_get_windows(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@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/20210915122116.18317-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: Intel: bdw: Set the mailbox offset directly in bdw_probePeter Ujfalusi
To align with other platforms, set only the sdev->dsp_box.offset in bdw_probe(). The mailbox offset must be set in order to be able to receive the firmware ready message. The offsets and sizes will be re-configured after the FW ready message based on the window information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@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/20210915122116.18317-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15Merge series "ASoC: SOF: Remove unused members from struct sof_dev_desc" ↵Mark Brown
from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, dma_engine, dma_size and resindex_dma_base is unused from sof_dev_desc, drop them. resindex_dma_base is initialized to -1 for Intel platforms, but it is not used. Regards, Peter --- Peter Ujfalusi (2): ASoC: SOF: intel: Do no initialize resindex_dma_base ASoC: SOF: Drop resindex_dma_base, dma_engine, dma_size from sof_dev_desc include/sound/sof.h | 5 ----- sound/soc/sof/intel/pci-apl.c | 2 -- sound/soc/sof/intel/pci-cnl.c | 3 --- sound/soc/sof/intel/pci-icl.c | 2 -- sound/soc/sof/intel/pci-tgl.c | 5 ----- sound/soc/sof/intel/pci-tng.c | 1 - 6 files changed, 18 deletions(-) -- 2.33.0
2021-09-15Merge series "ASoC: SOF: Intel: hda: Cleanups for local function uses" from ↵Mark Brown
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, Small cleanups regarding to HDA function locations and dropping of definitions of not implemented functions. Regards, Peter --- Peter Ujfalusi (3): ASoC: SOF: Intel: hda-dsp: Declare locally used functions as static ASoC: SOF: Intel: hda: Remove boot_firmware skl and iccmax_icl declarations ASoC: SOF: Intel: hda: Relocate inline definitions from hda.h to hda.c for sdw sound/soc/sof/intel/hda-dsp.c | 61 +++++++++++++++++------------------ sound/soc/sof/intel/hda.c | 33 ++++++++++++++++++- sound/soc/sof/intel/hda.h | 41 ----------------------- 3 files changed, 62 insertions(+), 73 deletions(-) -- 2.33.0
2021-09-15Merge series "Support ALC5682I-VS codec" from Brent Lu <brent.lu@intel.com>:Mark Brown
Support the ALC5682I-VS codec in Intel's rt5682 machine driver with three board configurations. Brent Lu (4): ASoC: Intel: sof_rt5682: support ALC5682I-VS codec ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015p board ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015 board ASoC: intel: sof_rt5682: support jsl_rt5682s_mx98360a board sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/sof_rt5682.c | 105 +++++++++++++++--- .../intel/common/soc-acpi-intel-jsl-match.c | 24 ++++ 3 files changed, 112 insertions(+), 18 deletions(-) -- 2.25.1
2021-09-15ASoC: cs35l41: Fix a bunch of trivial code formating/style issuesCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: cs35l41: Fixup the error messagesCharles Keepax
It is not idiomatic for ASoC to print the function name in the error messages, however it is expected to show the return code. Update the error messages to follow these conventions. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: cs35l41: Don't overwrite returned error codeCharles Keepax
In multiple places the driver overwrites the error code returned with a static error code, this is not helpful for debugging. Update to pass the error codes straight through. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: cs35l41: Combine adjacent register writesCharles Keepax
cs35l41 is often connected over I2C which is a very slow bus, as such timings can be greatly improved combining writes where acceptable. Update several points where the driver does multiple register writes when a single one would suffice. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: cs35l41: Use regmap_read_poll_timeout to wait for OTP bootCharles Keepax
Just clean up the code a little by using the helper rather than open coding waiting for OTP_BOOT_DONE. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: cs35l41: Fix use of an uninitialised variableCharles Keepax
The loop checking PDN_DONE doesn't check the return value from regmap_read, nor does it initialise val. This means if regmap_read fails val will be checked for the PDN_DONE bit whilst being uninitialised. Fix this up by switching to regmap_read_poll_timeout which tidies up the code and avoids the uninitialised variable. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210914141349.30218-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: mediatek: mt6359: Fix unexpected error in bind/unbind flowTrevor Wu
mt6359-sound is a MFD driver. Because its regmap is retrieved from its parent, it shouldn't be freed in mt6359-sound driver. snd_soc_component_exit_regmap() will do regmap_exit(), this results in unexpected results if sound card unregister flow is invoked when users try to bind/unbind audio codec. Remove the usage of snd_soc_component_exit_regmap(). Instead, set component->regmap = NULL in the component remove function. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210915034659.25044-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: loader: load_firmware callback is mandatory, treat it like thatPeter Ujfalusi
Since the load_firmware callback in snd_sof_dsp_ops is mandatory and it is tested during probe. Move the snd_sof_load_firmware() wrapper to ops.h as inline and drop the check of sof_ops(sdev)->load_firmware Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210914125356.19828-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: mediatek: mt8195: make array adda_dai_list static constColin Ian King
Don't populate the array adda_dai_list on the stack but instead it static const. Also makes the object code smaller by 33 bytes: Before: text data bss dec hex filename 28271 11640 0 39911 9be7 mt8195/mt8195-dai-adda.o After: text data bss dec hex filename 28142 11736 0 39878 9bc6 mt8195/mt8195-dai-adda.o (gcc version 11.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210915105027.10805-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: mediatek: mt8195: Add missing of_node_put()Bixuan Cui
The platform_node is returned by of_parse_phandle() should have of_node_put() before return. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com> Link: https://lore.kernel.org/r/20210911081246.33867-1-cuibixuan@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: Intel: hda: Relocate inline definitions from hda.h to hda.c for sdwPeter Ujfalusi
Move the only locally needed inline functions to hda.c when CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE is not enabled to make the header file less cluttered with information no needed to be there. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210915071805.5704-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: Intel: hda: Remove boot_firmware skl and iccmax_icl declarationsPeter Ujfalusi
hda_dsp_cl_boot_firmware_iccmax_icl and hda_dsp_cl_boot_firmware_skl is no longer backed with an implementation, remove them from the hda.h Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210915071805.5704-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: Intel: hda-dsp: Declare locally used functions as staticPeter Ujfalusi
The following functions can be made static as they are only used locally: hda_dsp_core_reset_enter hda_dsp_core_reset_leave hda_dsp_core_stall_reset hda_dsp_core_power_up hda_dsp_core_power_down hda_dsp_core_is_enabled The hda_dsp_ipc_int_disable is also only used within hda-dsp.c, but for symmetry for hda_dsp_ipc_int_enable (used by hda-loader.c) leave it as it is. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210915071805.5704-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: SOF: intel: Do no initialize resindex_dma_basePeter Ujfalusi
.resindex_dma_base is not used by the code and in all instances it is set to -1. To make it possible to remove it from the sof_dev_desc struct, first remove all references from the intel drivers (initialization). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210915065541.1178-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_mx98360a boardBrent Lu
This patch adds driver data for two MAX98360A speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_mx98360a since the capability of two ALC5682 variants is the same. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210914101847.778688-5-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015 boardBrent Lu
This patch adds driver data for two ALC1015Q-CG speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_rt1015 since the capability of two ALC5682 variants is the same. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210914101847.778688-4-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015p boardBrent Lu
This patch adds driver data for two ALC1015Q-VB speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_rt1015p since the capability of two ALC5682 variants is the same. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210914101847.778688-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: Intel: sof_rt5682: support ALC5682I-VS codecBrent Lu
Add a new quirk SOF_RT5682S_HEADPHONE_CODEC_PRESENT to support ALC5682I-VS headphone codec which driver is a new one, rt5682s, with new macros and functions. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210914101847.778688-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13Merge series "Patches to update for rockchip pdm" from Sugar Zhang ↵Mark Brown
<sugar.zhang@rock-chips.com>: These patches fixup or update for rockchip pdm. Changes in v4: - Acked by Rob Herring Changes in v3: - Fix property 'path-map' suggested by Rob Herring. Changes in v2: - Fix yamllint errors. Sugar Zhang (7): ASoC: rockchip: Add support for rv1126 pdm ASoC: dt-bindings: rockchip: Add binding for rv1126 pdm ASoC: rockchip: pdm: Add support for rk3568 pdm ASoC: dt-bindings: rockchip: Add binding for rk3568 pdm ASoC: rockchip: pdm: Add support for path map ASoC: dt-bindings: rockchip: pdm: Document property 'rockchip,path-map' ASoC: dt-bindings: rockchip: Convert pdm bindings to yaml .../devicetree/bindings/sound/rockchip,pdm.txt | 46 -------- .../devicetree/bindings/sound/rockchip,pdm.yaml | 120 +++++++++++++++++++++ sound/soc/rockchip/rockchip_pdm.c | 112 +++++++++++++++++-- sound/soc/rockchip/rockchip_pdm.h | 6 ++ 4 files changed, 232 insertions(+), 52 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.txt create mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.yaml -- 2.7.4
2021-09-13Merge series "Cirrus Logic CS35L41 Amplifier" from David Rhodes ↵Mark Brown
<drhodes@opensource.cirrus.com>: ASoC driver and devicetree documentation for a new Cirrus Logic amplifier CS35L41 v7 changes: Remove property 'classh-bst-max-limit' David Rhodes (2): ASoC: cs35l41: CS35L41 Boosted Smart Amplifier ASoC: cs35l41: Add bindings for CS35L41 .../devicetree/bindings/sound/cs35l41.yaml | 151 ++ include/sound/cs35l41.h | 34 + sound/soc/codecs/Kconfig | 12 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/cs35l41-i2c.c | 114 ++ sound/soc/codecs/cs35l41-spi.c | 143 ++ sound/soc/codecs/cs35l41-tables.c | 597 +++++++ sound/soc/codecs/cs35l41.c | 1545 +++++++++++++++++ sound/soc/codecs/cs35l41.h | 775 +++++++++ 9 files changed, 3375 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cs35l41.yaml create mode 100644 include/sound/cs35l41.h create mode 100644 sound/soc/codecs/cs35l41-i2c.c create mode 100644 sound/soc/codecs/cs35l41-spi.c create mode 100644 sound/soc/codecs/cs35l41-tables.c create mode 100644 sound/soc/codecs/cs35l41.c create mode 100644 sound/soc/codecs/cs35l41.h -- 2.25.1
2021-09-13ASoC: pcm5102a: increase rate from 192k to 384kgearhead
the pcm5102a is capable of 384k, but the current code limits it to 192k. This commit extends to 384k Signed-off-by: gearhead <ys3al35l@gmail.com> Link: https://lore.kernel.org/r/20210907210130.116769-1-ys3al35l@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13ASoC: rt1011: add i2s reference control for rt1011Jack Yu
Add i2s reference control for rt1011 amp. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20210906101208.11585-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13ASoC: SOF: Handle control change notification from firmwarePeter Ujfalusi
If the value/data associated with a control changes in SOF it will send a notification (SOF_IPC_GLB_COMP_MSG with SOF_IPC_COMP_GET_VALUE/DATA). We have support for binary volatile control type, but we might have features where enum/switch/volume changes. Re-implementing everything as volatile as well would be not much of a gain for several reasons: - volatile controls would do an IPC all the time, regardless if there is a need or not. - We still don't have notification which forces userspace to continuously poll. When such notification arrives we use snd_ctl_notify_one() to signal userspace about the change. The kernel is prepared for two types of notification: - the notification carries the new data for the control (num_elems != 0) The new value/data is copied to the control's local data - blank message about a change The new flag for the scontrol (comp_data_dirty) is set and when next time user space reads the value via the kcontrol's get callback we will refresh the control's local data from the firmware. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Tested-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Link: https://lore.kernel.org/r/20210903114018.2962-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-13ASoC: mt8195: remove unnecessary CONFIG_PMTrevor Wu
The unnecessary conditional inclusion caused the following warning. >> sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:3260:32: warning: unused >> variable 'mt8195_afe_pm_ops' [-Wunused-const-variable] static const struct dev_pm_ops mt8195_afe_pm_ops = { ^ 1 warning generated. Because runtime_pm already handles the case without CONFIG_PM, we can remove CONFIG_PM condition. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210902071440.6087-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>