aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-23ASoC: wcd9335: fix order of Slimbus unprepare/disableKrzysztof Kozlowski1-1/+1
Slimbus streams are first prepared and then enabled, so the cleanup path should reverse it. The unprepare sets stream->num_ports to 0 and frees the stream->ports. Calling disable after unprepare was not really effective (channels was not deactivated) and could lead to further issues due to making transfers on unprepared stream. Fixes: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Cc: <stable@vger.kernel.org> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220921145354.1683791-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-22ALSA: hda/hdmi: Use only dynamic PCM device allocationJaroslav Kysela2-6/+0
Per discussion on the alsa-devel mailing list [1], the legacy PIN to PCM device mapping is obsolete nowadays. The maximum number of the simultaneously usable PCM devices is equal to the HDMI codec converters. Remove the extra PCM devices (beyond the detected converters) and force the use of the dynamic PCM device allocation. The legacy code is removed. I believe that all HDMI codecs have the jack sensing feature. Move the check to the codec probe function and print a warning, if a codec without this feature is detected. [1] https://lore.kernel.org/alsa-devel/2f37e0b2-1e82-8c0b-2bbd-1e5038d6ecc6@perex.cz/ Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220922084017.25925-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-22Merge branch 'for-linus' into for-nextTakashi Iwai5-22/+77
2022-09-22ASoC: es8316: fix register sync error in suspend/resume testsPierre-Louis Bossart1-0/+2
The SOF CI tests report failures with the following error thrown kernel: es8316 i2c-ESSX8336:00: Unable to sync registers 0x0-0x1. -121 ES8336 only supports I2C read/write one byte a time, so we do need to set the .use_single_read and .use_single_write flags to avoid this sync issue. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: FRED OH <fred.oh@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220922095912.27010-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-21ASoC: ts3a227e: add parameters to control debounce timesAstrid Rost1-6/+55
Add devicetree parameters to control the insert, release and press debounce times. Signed-off-by: Astrid Rost <astrid.rost@axis.com> Link: https://lore.kernel.org/r/20220921081834.22009-4-astrid.rost@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-20ASoC: rt5682s: simplify the return of rt5682s_probe()Yang Yingliang1-6/+1
After commit bfc5e8b860ad ("ASoC: rt5682s: Reduce coupling of Micbias and Vref2 settings"), the return of rt5682s_probe() can be simplified. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220920151413.3455255-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-20ASoC: codecs: tfa989x: fix register access commentsAlexander Martinz1-2/+2
Fix comments regarding register access based on review feedback[1]. [1]: https://lore.kernel.org/all/YppQ7BiqlBDMNsuc@gerhold.net/ Signed-off-by: Alexander Martinz <amartinz@shiftphones.com> Link: https://lore.kernel.org/r/20220920115014.952062-1-amartinz@shiftphones.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-20Support for CS42L83 on Apple machinesMark Brown6-126/+526
Merge series from Martin Povišer <povik+lin@cutebit.org>: there's a CS42L83 headphone jack codec found in Apple computers (in the recent 'Apple Silicon' ones as well as in earlier models, one example [1]). The part isn't publicly documented, but it appears almost identical to CS42L42, for which we have a driver in kernel. This series adapts the CS42L42 driver to the new part, and makes one change in anticipation of a machine driver for the Apple computers. Patch 1 adds new compatible to the cs42l42 schema. Patches 2 to 7 are taken from Richard's recent series [2] adding soundwire support to cs42l42. They are useful refactorings to build on in the later patches, and also this way our work doesn't diverge. (I fixed missing free_irq path in cs42l42_init, did s/Soundwire/SoundWire/ in changelogs, rebased.) Patch 8 exports some regmap-related symbols from cs42l42.c so they can be used to create cs42l83 regmap in cs42l83-i2c.c later. Patch 9 is the cs42l83 support proper. Patch 10 implements 'set_bclk_ratio' on the cs42l42 core. This will be called by the upcoming ASoC machine driver for 'Apple Silicon' Macs. (We have touched on this change to be made in earlier discussion, see [3] and replies.) Patch 11 brings cs42l42-i2c.c in sync with cs42l83-i2c.c on dev_err_probe() usage.
2022-09-19ASoC: tas2770: Reinit regcache on resetMartin Povišer1-0/+3
On probe of the ASoC component, the device is reset but the regcache is retained. This means the regcache gets out of sync if the codec is rebound to a sound card for a second time. Fix it by reinitializing the regcache to defaults after the device is reset. Fixes: b0bcbe615756 ("ASoC: tas2770: Fix calling reset in probe") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220919173453.84292-1-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: nau8824: Fix semaphore is released unexpectedlySJLIN02-3/+15
On resuming, we anticipate that the jack is detected before playback or capture. Therefore, we use semaphore to control the jack detection done without any bothering. During booting, the driver launches jack detection and releases the semaphore. However, it doesn't perceive the maniputation of semaphore is not like resuming procedure. This makes the semaphore's count value become to 2. There is more than one thread can enter into the critical section. This may get unexpected situation and make some chaos. Signed-off-by: SJLIN0 <SJLIN0@nuvoton.com> Signed-off-by: Wallace Lin <savagecin@gmail.com> Link: https://lore.kernel.org/r/20220915012800.825196-1-SJLIN0@nuvoton.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Switch to dev_err_probe() helperMartin Povišer1-5/+3
Replace dev_err() with dev_err_probe() in the probe path for consistency with cs42l83-i2c.c. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-12-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Implement 'set_bclk_ratio'Martin Povišer2-1/+17
The driver wants to know the bit rate on the serial bus and takes that to be the value set by 'set_sysclk'. The 'set_bclk_ratio' op is a better fit for figuring out the clocking parameters of the serial bus, so implement that and give it precedence over the prior methods. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-11-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l83: Extend CS42L42 support to new partMartin Povišer6-4/+258
The CS42L83 part is a headphone jack codec found in recent Apple machines. It is a publicly undocumented part but as far as can be told it is identical to CS42L42 except for two points: * The chip ID is different. * Of those registers for which we have a default value in the existing CS42L42 kernel driver, one register (MCLK_CTL) differs in its reset value on CS42L83. To address those two points (and only those), add to the CS42L42 driver a separate CS42L83 front. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-10-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Export regmap elements to core namespaceMartin Povišer2-3/+10
Export the regmap callbacks for indicating readable/volatile registers, also the range structure, to the CS42L42 core namespace. This is in advance of reusing these bits in a CS42L83 driver frontend. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-9-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Split I2C identity into separate moduleRichard Fitzgerald5-93/+152
Split the I2C bus driver definition and probe()/remove() into a separate module so that a SoundWire build of CS42L42 support does not have a spurious dependency on I2C. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-8-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Pass component and dai defs into common probeRichard Fitzgerald1-6/+6
Pass pointers to snd_soc_component_driver and snd_soc_dai_driver objects into cs42l42_common_probe(). This is in preparation for adding SoundWire support. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-7-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Split cs42l42_resume into two functionsRichard Fitzgerald1-1/+21
On SoundWire the system resume cannot restore registers until the host controller has re-enumerated the peripheral. This patch splits cs42l42_resume() into two functions, one to power up and the other to restore registers, ready for adding SoundWire support. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-6-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Split probe() and remove() into stagesRichard Fitzgerald2-42/+87
To prepare for adding SoundWire the probe must be split into three parts: 1) The bus-specific probe 2) Common bus-agnostic probe steps 3) Initialization of the peripheral registers Step (3) must be separate because on SoundWire devices the probe must enable power supplies and release reset so that the peripheral can be enumerated by the bus, but it isn't possible to access registers until enumeration has completed. The call to devm_snd_soc_register_component() must be done at stage (2) so that it can EPROBE_DEFER if necessary. In SoundWire systems stage (3) is not a probe event so a deferral at this stage would not result in re-probing dependencies. A new init_done flag indicates that the chip has been identified and initialized. This is used to prevent cs42l42_remove(), cs42l42_suspend(), cs42l42_restore() and cs42l42_irq_thread() from attempting register accesses if the chip was not successfully initialized. Although this cannot happen on I2C, because the entire probe would fail, it is possible on SoundWire if probe succeeds but the cs42l42 is never enumerated. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-5-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Use cs42l42->dev instead of &i2c_client->devRichard Fitzgerald1-15/+17
In preparation for splitting cs42l42_i2c_probe() into multiple functions replace use of &i2c_client->dev with cs42l42->dev. This reduces diff clutter in the patch that splits the function. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-4-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config()Richard Fitzgerald2-17/+16
Clean up the handling of bitclock frequency by keeping all the logic in cs42l42_pcm_hw_params(), which then simply passes the frequency as an argument to cs42l42_pll_config(). The previous code had become clunky as a legacy of earlier versions of the clock handling. The logic was split across cs42l42_pcm_hw_params() and cs42l42_pll_config(), with the params-derived bclk stashed in struct cs42l42_private only to pass it to cs42l42_pll_config(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-3-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: rt5682s: Reduce coupling of PLLB settingDerek Fang1-43/+73
Some parts of rt5682s CCF function are implemented by 'PLLB' dapm widget. The coupling risk exists, so this patch fixes it. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20220913025658.5005-3-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: rt5682s: Reduce coupling of I2S1 settingDerek Fang1-38/+66
Some parts of rt5682s CCF function are implemented by 'I2S1' dapm widget. The coupling risk exists, so this patch fixes it. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20220913025658.5005-2-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: rt5682s: Reduce coupling of Micbias and Vref2 settingsDerek Fang2-28/+28
Some parts of rt5682s CCF function are implemented by 'MICBIAS' and 'Vref2' dapm widgets. There is a risk of causing not expected behavior if we mix using dapm and CCF operations in machine specific code. This patch reduces the coupling. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20220913025658.5005-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: max98390: Fix dsm calibration readingPeter Ujfalusi1-40/+39
With the change introduced by 6ac246105b4f, the calibration can only be done after the codec probe (but questionable if it is working since 203A_AMP_EN is 0) or when the codec is powered up for audio use, in other cases "AMP is not ready to run calibration" is printed. This changes how this worked before the patch: the codec was force powered on for the duration of the calibration readout, then shut down. So, if a calibration was asked when the codec was active, it would have powered it down? To correct the calibration logic: check if the codec is powered on and if it is not then enable it, do the readout and put it back to disabled. Do this while keeping the dapm locked to avoid interfering with normal operation via DAPM. Fixes: 6ac246105b4f ("ASoC: max98390: Remove unnecessary amp on/off conrtol") Reported-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220916111349.4433-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-16Merge tag 'v6.0-rc5' into i2c/for-mergewindowWolfram Sang9-176/+223
Linux 6.0-rc5
2022-09-15ASoC/qcom/arm64: Qualcomm ADSP DTS and binding fixesMark Brown5-119/+163
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Hi, Dependencies/merging ==================== 1. The DTS patches are independent. 2. The binding patches should come together, because of context changes. Could be one of: Qualcomm SoC, ASoC or DT tree. Changes since v3 ================ 1. Patch 9-10: re-order, so first apr.yaml is corrected and then we convert to DT schema. This makes patchset fully bisectable in expense of changing the same lines twice. 2. Patch 11: New patch. Changes since v2 ================ 1. Patch 9: rename and extend commit msg. 2. Add Rb tags. Changes since v1 ================ 1. Patch 9: New patch. 2. Patch 10: Correct also sound/qcom,q6apm-dai.yaml (Rob). 2. Patch 13: New patch. 3. Add Rb/Tb tags. Best regards, Krzysztof Krzysztof Kozlowski (15): arm64: dts: qcom: sdm630: align APR services node names with dtschema arm64: dts: qcom: sdm845: align APR services node names with dtschema arm64: dts: qcom: sm8250: align APR services node names with dtschema arm64: dts: qcom: msm8996: fix APR services nodes arm64: dts: qcom: sdm845: align dai node names with dtschema arm64: dts: qcom: msm8996: align dai node names with dtschema arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema arm64: dts: qcom: sm8250: use generic name for LPASS clock controller dt-bindings: soc: qcom: apr: correct service children ASoC: dt-bindings: qcom,q6asm: convert to dtschema ASoC: dt-bindings: qcom,q6adm: convert to dtschema ASoC: dt-bindings: qcom,q6dsp-lpass-ports: cleanup example ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: cleanup example ASoC: dt-bindings: qcom,q6apm-dai: adjust indentation in example dt-bindings: soc: qcom: apr: add missing properties .../bindings/soc/qcom/qcom,apr.yaml | 112 ++++++++++++++++-- .../bindings/sound/qcom,q6adm-routing.yaml | 52 ++++++++ .../devicetree/bindings/sound/qcom,q6adm.txt | 39 ------ .../bindings/sound/qcom,q6apm-dai.yaml | 21 ++-- .../bindings/sound/qcom,q6asm-dais.yaml | 112 ++++++++++++++++++ .../devicetree/bindings/sound/qcom,q6asm.txt | 70 ----------- .../sound/qcom,q6dsp-lpass-clocks.yaml | 36 +++--- .../sound/qcom,q6dsp-lpass-ports.yaml | 64 +++++----- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +- 16 files changed, 346 insertions(+), 208 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt -- 2.34.1
2022-09-14ASoC: cs42l42: Switch to use dev_err_probe() helperYang Yingliang1-5/+3
dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220914133355.3779364-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-14ASoC: tas2562: Propagate the error in tas2562_dac_event()Fabio Estevam1-2/+2
Since commit 2848d34c3ba1 ("ASoC: tas2562: Fix mute/unmute") the following build warning is seen: sound/soc/codecs/tas2562.c:442:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Fix the warning by returning the 'ret' variable. Fixes: 2848d34c3ba1 ("ASoC: tas2562: Fix mute/unmute") Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220913231706.516849-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-13ASoC: nau8825: Add ADCOUT IO drive strength controlDavid Lin2-0/+9
Add a property to control the driving of ADCOUT. Signed-off-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20220913120641.792502-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-13ASoC: ak4458: Add ak4458_reset in device probe and removeShengjiu Wang1-0/+4
This patch fixup this warning when CONFIG_PM not defined linux/sound/soc/codecs/ak4458.c:631:13: error: 'ak4458_reset' defined but\ not used [-Werror=unused-function] 631 | static void ak4458_reset(struct ak4458_priv *ak4458, bool active) | ^~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: e9e7df88996d64 ("ASoC: ak4458: Remove component probe() and remove()") Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663057594-29141-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-13Merge branch 'for-linus' into for-nextTakashi Iwai5-119/+163
2022-09-12ASoC: rt5640: Fix the issue of the abnormal JD2 statusOder Chiou2-19/+59
The patch fixes the issue of the abnormal JD2 status. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Reported-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/20220912072931.1856-1-oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: hdmi-codec.c: use devm_kzalloc() for DMA dataKuninori Morimoto1-9/+1
hdmi-codec.c is using kzalloc(), but we can replace it to devm_kzalloc() and then, we can remove .remove callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/874jxhmjgw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: ak4458: Remove component probe() and remove()Shengjiu Wang1-46/+7
Most function in ak4458_probe() and ak4458_remove() are duplicate with dai ops, so remove them and move dsd_path setting to dai ops. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/1662622316-23426-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: sti-sas: Remove the unneeded result variableye xingchen1-8/+2
Return the value regmap_write() and sti_sas_init_sas_registers() 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/20220908010304.342760-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-08ASoC: max98390: Remove unnecessary amp on/off conrtolSteve Lee1-7/+10
The Amp is already control in userspace before trigger calibrate function. Remove unnecessary control in calibrate function and add condition to check calibration is ready. Signed-off-by: Steve Lee <steve.lee.analog@gmail.com> Link: https://lore.kernel.org/r/20220908060359.13606-1-steve.lee.analog@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05Untested TAS2562 power setting fixesMark Brown1-61/+29
Merge series from Martin Povišer <povik+lin@cutebit.org>: The tas2562 driver does the same thing with the setting of PWR_CTRL field as the tas2764/tas2770 drivers were doing. Link: https://lore.kernel.org/alsa-devel/20220808141246.5749-1-povik+lin@cutebit.org/T/#t Link: https://lore.kernel.org/alsa-devel/20220825140241.53963-1-povik+lin@cutebit.org/T/#t These are blindly written patches without testing since I don't have the hardware. (I even tried TI's formal sample request program but was refused there. CCing @ti.com addresses I found on other series recently submitted.)
2022-09-05ASoC: wm_adsp: Handle optional legacy supportCristian Ciocaltea1-1/+3
The tracing capabilities for the speaker protection fw enabled via commit c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") are not be available on all platforms, such as the Valve's Steam Deck which is based on the Halo Core DSP. As a consequence, whenever the firmware is loaded, a rather misleading 'Failed to parse legacy: -19' error message is written to the kernel ring buffer: [ 288.977412] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware version: 3 [ 288.978002] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: cs35l41-dsp1-spk-prot.wmfw: Fri 02 Apr 2021 21:03:50 W. Europe Daylight Time [ 289.094065] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Firmware: 400a4 vendor: 0x2 v0.33.0, 2 algorithms [ 289.095073] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 0: ID cd v29.53.0 XM@94 YM@e [ 289.095665] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: 1: ID f20b v0.0.1 XM@170 YM@0 [ 289.096275] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Protection: C:\Users\ocanavan\Desktop\cirrusTune_july2021.bin [ 291.172383] steamdeck kernel: cs35l41 spi-VLV1776:01: DSP1: Failed to parse legacy: -19 Update wm_adsp_buffer_init() to print a more descriptive info message when wm_adsp_buffer_parse_legacy() returns -ENODEV. Fixes: c55b3e46cb99 ("ASoC: wm_adsp: Add trace caps to speaker protection FW") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220825220530.1205141-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: tas2562: Fix mute/unmuteMartin Povišer1-26/+29
Because the PWR_CTRL field is modeled as the power state of the DAC widget, and at the same time it is used to implement mute/unmute, we need some additional book-keeping to have the right end result no matter the sequence of calls. Without this fix, one permanently mutes an ongoing stream by toggling the associated speaker pin control. (This mirrors commit 1e5907bcb3a3 ("ASoC: tas2770: Fix handling of mute/unmute") which was a fix to the tas2770 driver.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220825142226.80929-3-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-05ASoC: tas2562: Drop conflicting set_bias_level power settingMartin Povišer1-35/+0
The driver is setting the PWR_CTRL field in both the set_bias_level callback and on DAPM events of the DAC widget (and also in the mute_stream method). Drop the set_bias_level callback altogether as the power setting it does is in conflict with the other code paths. (This mirrors commit c8a6ae3fe1c8 ("ASoC: tas2770: Drop conflicting set_bias_level power setting") which was a fix to the tas2770 driver.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220825142226.80929-2-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01ASoC: codecs: rk817: drop I2C dependenciesKrzysztof Kozlowski1-2/+1
The RK817 codec uses regmap API and not directly regmap I2C. It is the parent MFD who uses and selects regmap I2C. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220901101458.365354-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-01ASoC: codecs: wcd934x: add Slimbus dependencyKrzysztof Kozlowski1-0/+1
The WCD934X codec is a Slimbus driver, so it must depend on SLIMBUS, also for compile tests: ERROR: modpost: "slim_stream_prepare" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! Reported-by: kernel test robot <lkp@intel.com> Fixes: 5b7f4e5de61b ("ASoC: codecs: allow compile testing without MFD drivers") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220901101458.365354-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: codecs: minor cppcheck cleanupsMark Brown3-8/+2
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Small number of cleanups that were either missed in previous versions or detected by new cppcheck version.
2022-08-31ASoC: max98396: Make data monitor features configurableDaniel Mack2-0/+116
Allow the data monitor features to be enabled explicitly, and enable control over their details. Signed-off-by: Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20220826085927.2336224-2-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: wcd9335: remove always-true conditionPierre-Louis Bossart1-3/+1
cppcheck warning: sound/soc/codecs/wcd9335.c:1824:22: style: Condition 'tx_port==13' is always true [knownConditionTrueFalse] } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition 'tx_port==12' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition 'tx_port>=14' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1824:22: note: Condition 'tx_port==13' is always true } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1845:22: style: Condition 'tx_port==13' is always true [knownConditionTrueFalse] } else if (tx_port == 13) { ^ sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition 'tx_port==12' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition 'tx_port>=14' is not redundant if ((tx_port == 12) || (tx_port >= 14)) { ^ sound/soc/codecs/wcd9335.c:1845:22: note: Condition 'tx_port==13' is always true } else if (tx_port == 13) { ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Link: https://lore.kernel.org/r/20220822184239.169757-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: wcd-mbhc-v2: remove always-true conditionPierre-Louis Bossart1-1/+1
cppcheck warning: 'cross_conn<0' is always true [knownConditionTrueFalse] } else if (cross_conn < 0) /* Error */ ^ '!cross_conn' is not redundant } else if (!cross_conn) { /* no cross connection */ ^ is always true } else if (cross_conn < 0) /* Error */ ^ sound/soc/codecs/wcd-mbhc-v2.c:1192:26: style: Condition sound/soc/codecs/wcd-mbhc-v2.c:1188:15: note: Assuming that condition sound/soc/codecs/wcd-mbhc-v2.c:1192:26: note: Condition 'cross_conn<0' Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Link: https://lore.kernel.org/r/20220822184239.169757-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: hdmi-codec: remove unused definitionsPierre-Louis Bossart1-4/+0
cppcheck warning: sound/soc/codecs/hdmi-codec.c:24:16: style: struct member 'hdmi_codec_channel_ma`p_table::map' is never used. [unusedStructMember] unsigned char map; /* ALSA API channel map position */ ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Link: https://lore.kernel.org/r/20220822184239.169757-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-30ASoC: codecs: rk817: fix missing I2C dependency in compile testKrzysztof Kozlowski1-1/+1
SND_SOC_RK817 uses I2C regmap so compile testing without parent MFD_RK808, requires I2C: WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [n]: I2C [=n] Selected by [y]: - SND_SOC_RK817 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (MFD_RK808 [=n] || COMPILE_TEST [=y]) Reported-by: kernel test robot <lkp@intel.com> Fixes: 5b7f4e5de61b ("ASoC: codecs: allow compile testing without MFD drivers") Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220830075855.278046-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-29TAS2764 fixes/extensionsMark Brown2-52/+152
Merge series from Martin Povišer <povik+lin@cutebit.org>: First three patches are fixes analogical to those recently done to the TAS2770 driver. Link: https://lore.kernel.org/asahi/20220808141246.5749-1-povik+lin@cutebit.org/T/#t The latter two add IRQ handler to log faults and expose a new control.
2022-08-29ASoC: codecs: max98088: remove redundant ret variableJinpeng Cui1-3/+1
Return value from devm_snd_soc_register_component() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn> Link: https://lore.kernel.org/r/20220829091319.266068-1-cui.jinpeng2@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>