summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-07ASoC: SOF: Intel: hda-dai: Add setup_hext_stream/reset_hext_stream DMA opsRanjani Sridharan
Define and use the setup_hext_stream/reset_hext_stream DMA ops during link hw_params and cleanup. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Define and set the HDA DAI widget DMA opsRanjani Sridharan
Define and set the get_hext_stream, assign_hext_stream and release_hext_stream DMA ops for HDA DAIs. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Introduce DAI widget opsRanjani Sridharan
Introduce a new ops structure for HDA DAI widget DMA ops and add a new field to struct snd_sof_dai that will be used to set the ops pointer for DAI widgets. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Use the dai argument in ipc4_hda_dai_triggerRanjani Sridharan
No need to define a new variable and look it up again. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Pass the CPU dai pointerRanjani Sridharan
Pass the CPU DAI pointer from the ASoC core to hda_link_dma_hw_params() and ipc3_hda_dai_trigger(). This will avoid looking up the CPU DAI pointer multiple times. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Modify the signature of hda_link_dma_cleanup()Ranjani Sridharan
Remove the trigger_suspend_stop argument from hda_link_dma_cleanup() and move the call to snd_hdac_ext_stream_clear() into snd_hdac_ext_stream_clear(). This is a preparatory step to unify the trigger ops for IPC3 and IPC4. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: remove struct hda_pipe_paramsRanjani Sridharan
Remove the struct definition and use the params argument directly. Also, use the hlink pointer to set the stream ID instead of looking it up again. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Remove hda_link_dma_params()Ranjani Sridharan
No code change. Just code move from hda_link_dma_params() to hda_link_dma_hw_params(). Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-07ASoC: SOF: Intel: hda-dai: Remove BE DAI DRV ops for SSP DAI'sRanjani Sridharan
Now that the DAI_CONFIG IPC is sent after widget setup and before widget free, there is no need for the BE DAI DRV ops that do the same thing. So remove them. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-06Add CS35L41 shared boost featureMark Brown
Merge series from Lucas Tanure <lucas.tanure@collabora.com>: Valve's Steam Deck uses CS35L41 in shared boost mode, where both speakers share the boost circuit. Add this support in the shared lib, but for now, shared boost is not supported in HDA systems as would require BIOS changes. Based on David Rhodes shared boost patches. Also, fix boost config overwriting in IRQ found in the review and do a small refactor of the code.
2023-03-06ASoC: soc-core.c: remove useless dev_dbg()Kuninori Morimoto
soc-core.c is using dev_dbg(), but some of them are useless. It indicates many dev_dbg() at snd_soc_runtime_get_dai_fmt(), but all of them are just noise, almost no meanings. dev_dbg() on soc_probe_link_dais() indicates dai link and its loop order, but it is just noise, no information. dev_dbg() on snd_soc_register_dai() is duplicated. This patch cleanup these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ttyy64cy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-06Refactor Vangogh acp5x machine driverMark Brown
Merge series from Lucas Tanure <lucas.tanure@collabora.com>: Provide small fixes and refactor the code for easier insertion of a new platform using the same acp5x machine driver.
2023-03-06Add "mclk" support for maxim,max9867Mark Brown
Merge series from richard.leitner@linux.dev: This series adds support for the clocks properties in the maxim,max9867 bindings. Furthermore the binding definitions are converted from txt to yaml. The clock property is needed to define the mclk for one of our boards which uses the the i.MX8MP SAI MCLK as clock for the maxim,max9867.
2023-03-06Add support for the TAS5733Mark Brown
Merge series from Kamel Bouhara <kamel.bouhara@bootlin.com>: This small series extends the tas571x driver to support the TAS5733 audio power amplifier.
2023-03-06ASoC: microchip: some cleanups for AT91 sound driversMark Brown
Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>: This series does some cleanups for Microchip AT91 sound drivers. Along with it I took the chance and updated MAINTAINERS file.
2023-03-06RZ/G2L SSI: Update interrupt numbersMark Brown
Merge series from Prabhakar <prabhakar.csengg@gmail.com>: Hi All, This patch series aims to fix interrupt numbers for SSI channels and updates the DT binding and the driver accordingly. Note, this patch series applies on top of [0]. [0] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20230131223529.11905-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ Cheers, Prabhakar Lad Prabhakar (4): ASoC: dt-bindings: renesas,rz-ssi: Update interrupts and interrupt-names properties ASoC: sh: rz-ssi: Update interrupt handling for half duplex channels arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels .../bindings/sound/renesas,rz-ssi.yaml | 21 ++++--- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 19 +++--- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 19 +++--- sound/soc/sh/rz-ssi.c | 63 +++++++++++++------ 4 files changed, 70 insertions(+), 52 deletions(-) -- 2.25.1
2023-03-06SoC: SOF: Intel: hda/mtl: Improve and enable DMI L1Mark Brown
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The first patch will improve the managing of DMI L1 by tracking it's enabled/disabled state to avoid unconditional changes to it's state. The remaining two patch will enable the DMI L1 for MTL platforms (ACE 1.0)
2023-03-06Add the PowerQUICC audio support using the QMCMark Brown
Merge series from Herve Codina <herve.codina@bootlin.com>: This series adds support for audio using the QMC controller available in some Freescale PowerQUICC SoCs. This series contains three parts in order to show the different blocks hierarchy and their usage in this support. The first one is related to TSA (Time Slot Assigner). The TSA handles the data present at the pin level (TDM with up to 64 time slots) and dispatchs them to one or more serial controller (SCC). The second is related to QMC (QUICC Multichannel Controller). The QMC handles the data at the serial controller (SCC) level and splits again the data to creates some virtual channels. The last one is related to the audio component (QMC audio). It is the glue between the QMC controller and the ASoC component. It handles one or more QMC virtual channels and creates one DAI per QMC virtual channels handled.
2023-03-05ASoC: dt-bindings: qcom,wcd9335: Convert to dtschemaKrzysztof Kozlowski
Convert the Qualcomm WCD9335 audio codec binding to DT schema. Changes against original binding: 1. Drop "mclk2" from clocks as neither Linux driver nor DTS uses it. 2. Do not require vdd-micbias-supply as several DTS do not provide it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230220095643.64898-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: qcom,wcd934x: Reference dai-commonKrzysztof Kozlowski
Reference common DAI properties to get sound-dai-cells description and allow name-prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230220095643.64898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: jack: allow multiple interrupt per gpioSvyatoslav Ryhel
This feature is required for coupled hp-mic quirk used by some Nvidia Tegra 3 based devices work properly. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://lore.kernel.org/r/20230221183211.21964-3-clamor95@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 supportKuninori Morimoto
There are no compatible for "reg/reg-names" and "clock-name" between previous R-Car series and R-Car Gen4. "reg/reg-names" needs 3 categorize (for Gen1, for Gen2/Gen3, for Gen4), therefore, use 3 if-then to avoid nested if-then-else. Move "clock-name" detail properties to under allOf to use if-then-else for Gen4 or others. Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87r0v1t02h.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87y1p7bpma.wl-kuninori.morimoto.gx@renesas.com/#r Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/87sffa8g99.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: SOF: ipc4-topology: Replace fake flexible arrays with flexible-array ↵Gustavo A. R. Silva
member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. Use the DECLARE_FLEX_ARRAY() helper macro to transform zero-length arrays in unions with flexible-array members. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: sound/soc/sof/ipc4-control.c:176:77: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:78:29: warning: array subscript 0 is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:80:33: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:95:53: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:96:53: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:93:53: warning: array subscript 0 is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:140:58: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:141:29: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:142:29: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-topology.c:1475:36: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-topology.c:1476:36: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/258 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/Y/gyIg1qZduhigPi@work Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: nau8821: Implement DRC controlsSeven Lee
This patch is support dynamic range compression controls. Signed-off-by: Seven Lee <wtli@nuvoton.com> Signed-off-by: Seven Lee <scott6986@gmail.com> Link: https://lore.kernel.org/r/20230217092523.357142-1-wtli@nuvoton.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: qcom: common: add kcontrol to jack pinsSrinivas Kandagatla
Add Kcontrol to jack pins so that device switch in ucm can be done correctly. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230302104616.26318-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: wlf,wm8524: Convert to json-schemaChancel Liu
Convert the Wolfson WM8524 24-bit 192KHz Stereo DAC device tree binding documentation to json-schema. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230227091938.1671416-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: wlf,wm8960: Convert to dtschemaKrzysztof Kozlowski
Convert the Wolfson WM8960 audio codecs bindings to DT schema. Changes against original binding: 1. Document clocks and clock-names - already present in DTS and used by Linux driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230217150627.779764-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: Intel: avs: Use struct_size for struct avs_modcfg_ext sizeJacob Keller
The struct avs_modcfg_ext structure has a flexible array member for the pin_fmts array, and the size should be calculated using struct_size to prevent the potential for overflow with the allocation. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230303180457.2457069-1-jacob.e.keller@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05MAINTAINERS: update Microchip AT91 sound entries with documentation filesClaudiu Beznea
Add documentation files to Microchip AT91 sound entries. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-9-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05MAINTAINERS: add myself as maintainer for Microchip AT91 sound driversClaudiu Beznea
Codrin is not with Microchip anymore. As I worked lately with Microchip AT91 sound drivers add myself as maintainer for these. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-8-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-pdmc: avoid casting to/from void pointerClaudiu Beznea
Do not cast to and from void pointer. There is no need for this. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-7-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-pdmc: return directly retClaudiu Beznea
Return directly ret instead of having different branches for error and OK paths. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-pdmc: use FIELD_PREP() where possibleClaudiu Beznea
Use FIELD_PREP() macro where possible instead of driver local defined macros. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-spdiftx: update debug messageClaudiu Beznea
Previous debug message states that there was a failure and tx was not disabled. Which is not true as the TX in this function could also be enabled. Thus improve a bit the debug message by s/disable/start\/stop/. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-spdiftx: use regmap_update_bits()Claudiu Beznea
Use regmap_update_bits() instead of regmap_read(), running variable, regmap_write(). There is no need for extra variables and checks around it as regmap_update_bits() already does this. With this code becomes simpler. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: mchp-spdiftx: use FIELD_PREP() where possibleClaudiu Beznea
Use directly FIELD_PREP() marco where possible. There is no need for the extra wrappers. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: maxim,max9867: add "mclk" supportBenjamin Bara
Add basic support for the codecs' mclk. Enable it on SND_SOC_BIAS_ON, disable it on SND_SOC_BIAS_OFF. Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com> Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Link: https://lore.kernel.org/r/20230302-max9867-v2-3-fd2036d5e825@skidata.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: maxim,max9867: add clocks propertyRichard Leitner
Add clocks property to require a "mclk" definition for the maxim,max9867 codec. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Link: https://lore.kernel.org/r/20230302-max9867-v2-2-fd2036d5e825@skidata.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: dt-bindings: maxim,max9867: convert txt bindings to yamlRichard Leitner
Convert from max9867.txt to maxim,max9867.yaml and add missing '#sound-dai-cells' property. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230302-max9867-v2-1-fd2036d5e825@skidata.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: SOF: Intel: MTL: Enable DMI L1Ranjani Sridharan
DMI L1 should be enabled unconditionally after FW boot is complete. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@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> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230220075804.4829-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: SOF: Intel: hda: Restrict DMI L1 disable workaroundRanjani Sridharan
The workaround to disable DMI L1 should be restricted to only the CAVS IP's. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@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> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230220075804.4829-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: SOF: Intel: hda: Do not re-enable L1 if disabled before suspendRanjani Sridharan
We have a workaround in place to address a known issue with host DMA running into xruns when capture streams are running. But when resuming from Sx, we unconditionally re-enable DMI L1 without taking the workaround into account and this could lead to xruns when a suspended capture stream is restarted. To fix this rename the flag l1_support_enabled to l1_disabled in struct sof_intel_hda_dev to save the L1 disabled status which can be set/cleared when we get/put a stream and use the flag to determine if DMI L1 should enabled or not during the post_fw_run op. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230220075804.4829-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: Add components prefix in structs and function namesLucas Tanure
Add prefixes 8821/35l41 in structs and function names so future platforms can be added and reference the correct sound card. Also include acp5x prefix to cs35l41_conf. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-10-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: Centralize strings definitionLucas Tanure
Replace occurrences of strings by their definition, avoiding bugs where the string changed, but not all places have been modified. While at it rename defines to use NAU8821 codec name instead of NUVOTON and align with the other defines. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-9-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: Move nau8821 and CPU side code up for future platformLucas Tanure
Move nau8821 and CPU side code up in the source so future platforms can be added. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-8-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: Check Bit Clock rate before snd_soc_dai_set_pllLucas Tanure
Check bit clock is valid before setting it with snd_soc_dai_set_pll Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-7-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: use for_each_rtd_components instead of forLucas Tanure
To iterate over components use for_each_rtd_components And compare to component name, so asoc_rtd_to_codec and the dai code can be removed Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-6-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: remove unnecessarily included headersLucas Tanure
Remove unused includes and replace <linux/input.h> by <linux/input-event-codes.h> Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-5-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: use sizeof of variable instead of struct typeLucas Tanure
Use sizeof(*machine) instead of sizeof(struct acp5x_platform_info) There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-4-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-05ASoC: amd: vangogh: Small code refactorLucas Tanure
Small refactor of the code: - sort includes in alphabetical order - sort variables declarations by line length - remove unnecessary "struct snd_soc_card *card" lines - insert blank lines before return - break/unbreak some lines for better read - align defines Signed-off-by: Lucas Tanure <lucas.tanure@collabora.com> Link: https://lore.kernel.org/r/20230217110850.1045250-3-lucas.tanure@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>