aboutsummaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2022-02-28ASoC: amd: pcm-dma: Use platform_get_irq() to get the interruptMeng Tang4-23/+10
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220227050928.32270-1-tangmeng@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28ASoC: tscs454: Use modern ASoC DAI format terminologyMark Brown1-14/+14
As part of moving to remove the old style defines for the bus clocks update the tscs454 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220223002751.1574345-2-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28ASoC: tscs42xx: Use modern ASoC DAI format terminologyMark Brown1-3/+3
As part of moving to remove the old style defines for the bus clocks update the tscs42xx driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220223002751.1574345-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28ASoC: lm49453: Use modern ASoC DAI format terminologyMark Brown1-5/+5
As part of moving to remove the old style defines for the bus clocks update the lm49453 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220222225135.3726158-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: add pm runtime support for Qualcomm codecsMark Brown6-101/+526
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: This patchset adds support for runtime pm on tx/rx/wsa/wcd lpass macro, wsa881x and wcd938x codecs that are wired up on SoundWire bus. During pm testing it was also found that soundwire clks enabled by lpass macros are not enabling all the required clocks correctly, so last 3 patches corrects them. Tested this on SM8250 MTP along SoundWire In band Headset Button wakeup interrupts.
2022-02-25ASoC: codecs: wcd-mbhc: add runtime pm supportSrinivas Kandagatla1-0/+26
under low power state a SoundWire Wake IRQ could trigger MBHC interrupts so make sure that codec is not in suspended state when this happens. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-17-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: wcd938x: add simple clk stop supportSrinivas Kandagatla1-0/+1
mark WCD938x as clock stop capable. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-16-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: tx-macro: add runtime pm supportSrinivas Kandagatla1-0/+61
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-14-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: rx-macro: add runtime pm supportSrinivas Kandagatla1-0/+62
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-13-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: wsa-macro: add runtime pm supportSrinivas Kandagatla1-0/+61
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-12-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: va-macro: add runtime pm supportSrinivas Kandagatla1-0/+41
Add pm runtime support to VA Macro. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-11-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: rx-macro: setup soundwire clks correctlySrinivas Kandagatla1-1/+9
For SoundWire Frame sync to be generated correctly we need both MCLK and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on, however after adding pm runtime support its possible that NPl clock could be turned off even when SoundWire controller is active. Fix this by enabling mclk and npl clk when SoundWire clks are enabled. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: tx-macro: setup soundwire clks correctlySrinivas Kandagatla1-1/+9
For SoundWire Frame sync to be generated correctly we need both MCLK and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on, however after adding pm runtime support its possible that NPl clock could be turned off even when SoundWire controller is active. Fix this by enabling mclk and npl clk when SoundWire clks are enabled. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: wsa-macro: setup soundwire clks correctlySrinivas Kandagatla1-1/+9
For SoundWire Frame sync to be generated correctly we need both MCLK and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on, however after adding pm runtime support its possible that NPl clock could be turned off even when SoundWire controller is active. Fix this by enabling mclk and npl clk when SoundWire clks are enabled. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: wsa-macro: move to individual clks from bulkSrinivas Kandagatla1-22/+66
Using bulk clocks and referencing them individually using array index is not great for readers. So move them to individual clocks handling and also remove some unnecessary error handling in the code. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: tx-macro: move to individual clks from bulkSrinivas Kandagatla1-22/+65
Using bulk clocks and referencing them individually using array index is not great for readers. So move them to individual clocks handling and also remove some unnecessary error handling in the code. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: rx-macro: move to individual clks from bulkSrinivas Kandagatla1-21/+64
Using bulk clocks and referencing them individually using array index is not great for readers. So move them to individual clocks handling and also remove some unnecessary error handling in the code. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: tx-macro: move clk provider to managed variantsSrinivas Kandagatla1-10/+7
move clk provider registration to managed api variants, this should help with some code tidyup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: rx-macro: move clk provider to managed variantsSrinivas Kandagatla1-10/+11
move clk provider registration to managed api variants, this should help with some code tidyup. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: codecs: va-macro: move to individual clks from bulkSrinivas Kandagatla1-22/+43
Using bulk clocks and referencing them individually using array index is not great for readers. So move them to individual clocks handling and also remove some unnecessary error handling in the code. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220224111718.6264-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: qcom: lpass-platform: Update warning print to control excess loggingSrinivasa Rao Mandadapu1-1/+2
Update dev_warn to dev_warn_ratelimit to control excess xrun logging in lpass platform driver. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Link: https://lore.kernel.org/r/1645792943-24845-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: acp: check the return value of devm_kzalloc() in ↵Jia-Ju Bai1-0/+2
acp_legacy_dai_links_create() The function devm_kzalloc() in acp_legacy_dai_links_create() can fail, so its return value should be checked. Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards") Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20220225131645.27556-1-baijiaju1990@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: rt5663: check the return value of devm_kzalloc() in rt5663_parse_dp()Jia-Ju Bai1-0/+2
The function devm_kzalloc() in rt5663_parse_dp() can fail, so its return value should be checked. Fixes: 457c25efc592 ("ASoC: rt5663: Add the function of impedance sensing") Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Link: https://lore.kernel.org/r/20220225131030.27248-1-baijiaju1990@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: SOF: sof-priv: Drop duplicate sof_compressed_ops declarationPeter Ujfalusi1-5/+0
Other commit added the declaration of the sof_compressed_ops, drop the instance which added it as Platform specific ops, which the sof_compressed_ops is not. 76cdd90b27b4e ("ASoC: SOF: pcm: Add compress_ops for SOF platform component driver") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220225120034.11028-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-25ASoC: amd: Use platform_get_irq_byname() to get the interruptMeng Tang1-5/+2
platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq_byname(). Signed-off-by: Meng Tang <tangmeng@uniontech.com> Link: https://lore.kernel.org/r/20220225112358.19403-1-tangmeng@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24Add support for audio on SC7280 based targetsMark Brown8-80/+1823
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>: This patch set is to add support for Audio over wcd codec, digital mics, through digital codecs and without ADSP. Changes Since V15: -- Bisect patches to avoid build failure in other architectures. -- Remove redundant variables lpass variant structure. Changes Since V14: -- Split common wrapper function to separate wrapper for each handle in platform driver. -- Update cdc dma buffer handling with memremap with ioremap. -- Remove redundant error prints. -- Update irq flag. Changes Since V13: -- Change bulk cdc clock voting to individual clock voting. -- Remove redundant code, conditional check and prints. -- Fix typo errors. Changes Since V12: -- Fix arguments type mismatch. Changes Since V11: -- Fix kernel robot issue on arguments type mismatch. Changes Since V10: -- Split bulk clock voting to individual clock voting as per use case in cdc-dma driver. -- Add missing codec dma clocks. -- Update rxtx lpm buffer size. Changes Since V9: -- Change individual clock voting to bulk clock voting of lpass-sc7280 platform driver. -- Remove redundant clocks in lpass variant structure. -- Add mclk for MI2S based headset path. -- Remove unused lpass variant structure members in lpass header. Changes Since V8: -- Fix errors in sc7280 lpass cpu dt-bindings. -- Move to quicinc domain email id's. Changes Since V7: -- Fix indentation errors. -- Bisect patches to avoid interdependency. Changes Since V6: -- Split cdc dma regmap config macros. -- Add write dma reg fields for i2s path. -- Add helper function to distinguish rxtx and va dma ports. -- Optimizing clock and reg name in cpu dt-bindings. -- Update buffer management for cdc dma path. -- Remove Kconfig fields of machine driver. Changes Since V5: -- Include MI2S primary node to snd_soc_dai_driver in lpass-sc7280 platform driver. -- Move dependency patch list to corresponding patch. -- Add support for missing cdc-dma ports. -- Change if/else conditional statements to switch cases. -- Add missing error handlings. -- Typo errors fix. Changes Since V4: -- Remove unused variable in lpass-sc7280 platform driver. Changes Since V3: -- Remove redundant power domain controls. As power domains can be configured from dtsi. Changes Since V2: -- Split lpass sc7280 cpu driver patch and create regmap config patch. -- Create patches based on latest kernel tip. -- Add helper function to get dma control and lpaif handle. -- Remove unused variables. Changes Since V1: -- Typo errors fix -- CPU driver readable/writable apis optimization. -- Add Missing config patch -- Add Common api for repeated dmactl initialization. Srinivasa Rao Mandadapu (9): ASoC: qcom: Move lpass_pcm_data structure to lpass header ASoC: qcom: lpass: Add dma fields for codec dma lpass interface ASoC: qcom: Add helper function to get dma control and lpaif handle ASoC: qcom: Add register definition for codec rddma and wrdma ASoC: qcom: Add regmap config support for codec dma driver ASoC: qcom: Add support for codec dma driver ASoC: qcom: Add lpass CPU driver for codec dma control ASoC: dt-bindings: Add SC7280 lpass cpu bindings ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 75 ++- sound/soc/qcom/Kconfig | 11 + sound/soc/qcom/Makefile | 4 + sound/soc/qcom/lpass-cdc-dma.c | 301 ++++++++++ sound/soc/qcom/lpass-cpu.c | 253 ++++++++- sound/soc/qcom/lpass-lpaif-reg.h | 127 ++++- sound/soc/qcom/lpass-platform.c | 628 ++++++++++++++++++--- sound/soc/qcom/lpass-sc7280.c | 438 ++++++++++++++ sound/soc/qcom/lpass.h | 141 +++++ 9 files changed, 1890 insertions(+), 88 deletions(-) create mode 100644 sound/soc/qcom/lpass-cdc-dma.c create mode 100644 sound/soc/qcom/lpass-sc7280.c -- 2.7.4
2022-02-24ASoC: SOF: Declare sof_compress_ops in sof-priv.hPeter Ujfalusi1-0/+5
Fix the following sparse error: sound/soc/sof/compress.c:310:25: error: symbol 'sof_compressed_ops' was not declared. Should it be static? Do not enable set the pd->compress_ops yet as it is not a valid assumption that real compress support really works when CONFIG_SND_SOC_SOF_COMPRESS is set as the HDA Probes support also selects it, but compressed audio is not supported (yet) on Intel platforms. Fixes: 6324cf901e14c ("ASoC: SOF: compr: Add compress ops implementation") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220224172324.17976-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: lpass-sc7280: Add platform driver for lpass audioSrinivasa Rao Mandadapu3-0/+447
Add platform driver for configuring sc7280 lpass core I2S and DMA configuration to support playback & capture to external codecs connected over secondary MI2S interface and soundwire interface. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-10-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Add lpass CPU driver for codec dma controlSrinivasa Rao Mandadapu4-0/+308
Add lpass cpu driver to support audio over codec dma for ADSP bypass usecase. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-8-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Add support for codec dma driverSrinivasa Rao Mandadapu1-17/+475
Upadate lpass cpu and platform driver to support audio over codec dma in ADSP bypass use case. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1645716828-15305-7-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Add regmap config support for codec dma driverSrinivasa Rao Mandadapu1-1/+252
Update regmap configuration for supporting headset playback and capture and DMIC capture using codec dma interface Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-6-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Add register definition for codec rddma and wrdmaSrinivasa Rao Mandadapu2-6/+142
Add register definitions for codec read dma and write dma lpass interface. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-5-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Add helper function to get dma control and lpaif handleSrinivasa Rao Mandadapu1-51/+80
Add support function to get dma control and lpaif handle to avoid repeated code in platform driver Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-4-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: lpass: Add dma fields for codec dma lpass interfaceSrinivasa Rao Mandadapu1-0/+114
Add lpass interface memebers to support audio path over codec dma. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-3-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: qcom: Move lpass_pcm_data structure to lpass headerSrinivasa Rao Mandadapu2-5/+5
Declare lpass_pcm_data structure in lpass header file instead of platform source file to make common use of it by other drivers Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1645716828-15305-2-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: amd: acp: Add DMIC machine driver opsAjit Kumar Pandey1-0/+27
Add dmic ops and startup callback to add snd_pcm_hw_constraint for pdm related device node. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-4-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: amd: acp-legacy: Add legacy card support for new machinesAjit Kumar Pandey2-0/+47
We have newer renoir platforms with different codecs combinations. Add struct in legacy machine driver and add to list of supported renoir machine to support sound card registration on platform with rt5682s as primary headset codec and max98360 and rt1019 as speaker amp codec. This also fixes error reported by kernel robot: "error: 'EN_SPKR_GPIO_DW' undeclared here" Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-3-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: amd: acp: Change card name for Guybrush MachineAjit Kumar Pandey2-3/+3
Change sound card name for guybrush machine with rt5682 as primary codec and rt1019 amp to align with names given in UCM config. Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Link: https://lore.kernel.org/r/20220222124213.721224-2-AjitKumar.Pandey@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-24ASoC: SOF: pcm: Add compress_ops for SOF platform component driverDaniel Baluta2-0/+9
Now that sof_compressed_ops initial implementation was merged we can enable it in SOF platform component driver. This partially reverts commit 8a720724589e ("ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference") Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20220223153849.84471-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-23ASoC: sc7280: Really depends on SOUNDWIREMark Brown1-1/+1
The sc7280 driver really does depend on SOUNDWIRE since it calls various sdw_ functions (eg, sdw_enable_stream(), sdw_prepare_stream()) which do not have stubs when that is disabled so we can't build with COMPILE_TEST. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220223011913.2753938-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-21ASoC: mediatek: mt8195: enable apll tunerTrevor Wu3-4/+292
Normally, the clock source of audio module is either 26M or APLL1/APLL2, but APLL1/APLL2 are not the multiple of 26M. In the patch, APLL1 and APLL2 tuners are enabled to handle sample rate mismatch when the data path crosses two different clock domains. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20220221055716.18580-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-21ASoC: SOF: Intel: Add topology overwrite for FelwinterAjye Huang1-0/+8
The Felwinter uses four max98360a amplifiers on corresponding CH0~CH3. There are four amps on the board connecting to headphone to SSP0 port, amp to SSP1,and the DAI format would be DSP_A,8-slots, 32 bit slot-width. CH0: L(Woofer), CH1:R(Woofer), CH2:L(Tweeter), CH3:R(Tweeter) Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Curtis Malainey <cujomalainey@chromium.org> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220218082741.1707209-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-18ASoC: Intel: sof_es8336: add quirk for Huawei D15 2021Mauro Carvalho Chehab1-0/+8
Huawei D15 uses SSP_CODEC(0). Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Link: https://lore.kernel.org/r/d560a1c76edb633c37acf04a9a82518b6233a719.1640351150.git.mchehab@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-17ASoC: SOF: Replace zero-length array with flexible-array memberStephen Kitt1-1/+1
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members"[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Link: https://github.com/KSPP/linux/issues/180 Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Stephen Kitt <steve@sk2.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20220217132755.1786130-1-steve@sk2.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-16ASoC: SOF: core: unregister clients and machine drivers in .shutdownPierre-Louis Bossart1-0/+9
On a platform shutdown, the expectation for most drivers is that userspace tasks will release all resources. When those sequences do not complete, it can be the case that PCM devices exposed by ALSA cards are used *after* the DSP shutdown completes, leading to a platform hang. When the clients and machine drivers provide an _unregister callback, let's invoke it in the shutdown sequence. Signed-off-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> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220216133241.3990281-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-16ASoC: codec: wcd938x: Update CTIA/OMTP switch controlSrinivasa Rao Mandadapu1-22/+11
Convert gpio api's to gpio descriptor api's in CTIA/OMTP switch control. Remove redundant NULL checks in swap_gnd_mic function. Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset") Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Link: https://lore.kernel.org/r/1645017892-12522-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-15ASoC: soc-core: skip zero num_dai component in searching dai nameShengjiu Wang1-1/+1
In the case like dmaengine which's not a dai but as a component, the num_dai is zero, dmaengine component has the same component_of_node as cpu dai, when cpu dai component is not ready, but dmaengine component is ready, try to get cpu dai name, the snd_soc_get_dai_name() return -EINVAL, not -EPROBE_DEFER, that cause below error: asoc-simple-card <card name>: parse error -22 asoc-simple-card: probe of <card name> failed with error -22 The sound card failed to probe. So this patch fixes the issue above by skipping the zero num_dai component in searching dai name. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1644491952-7457-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-15ASoC: tegra20: spdif: make const array rates staticColin Ian King1-1/+1
Don't populate the read-only const array rates on the stack but instead it static. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220214213223.65780-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14ASoC: SOF: Makefile: Fix randconfig sof-client build when SND_SOC_SOF=yPeter Ujfalusi1-1/+3
Intel's kernel test robot found the following randconfig combination: SND_SOC_SOF=y SND_SOC_SOF_CLIENT=m In this the sof-client object is not going to be built into the snd-sof.o and we will have undefined references to the sof-client functions. Fixes: 6955d9512d0e ("ASoC: SOF: Introduce IPC SOF client support") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peter Ujfalusi <Peter Ujfalusi <peter.ujfalusi@linux.intel.com>> Link: https://lore.kernel.org/r/20220214071330.22151-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-14ASoC: Add Euro Headset support for wcd938x codecMark Brown1-0/+38
Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>: This patch set is to add switch control for selecting CTIA/OMTP Headset