summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoc: simple-mux: add idle-state supportHendrik v. Raven2024-11-141-1/+38
| | | | | | | | | | | | So far the mux changes it state immediately, even when not in use. Allow overriding this behaviour by specifying an optional idle-state. This state is used whenever the mux is powered down, only switching to the selected state on power up. If unspecified it defaults to as-is, maintaining the previous behaviour. Signed-off-by: Hendrik v. Raven <h.v.raven@merzmedtech.de> Link: https://patch.msgid.link/20241114-simple-mux-idle-state-v2-1-a30cb37d2be2@merzmedtech.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chipShenghao Ding2024-11-041-0/+1
| | | | | | | | Add new driver version to support tas2563 & tas2781 qfn chip Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20241104100055.48-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: wcd937x: relax the AUX PDM watchdogAlexey Klimov2024-10-292-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system with wcd937x, rxmacro and Qualcomm audio DSP, which is pretty common set of devices on Qualcomm platforms, and due to the order of how DAPM widgets are powered on (they are sorted), there is a small time window when wcd937x chip is online and expects the flow of incoming data but rxmacro is not yet online. When wcd937x is programmed to receive data via AUX port then its AUX PDM watchdog is enabled in wcd937x_codec_enable_aux_pa(). If due to some reasons the rxmacro and soundwire machinery are delayed to start streaming data, then there is a chance for this AUX PDM watchdog to reset the wcd937x codec. Such event is not logged as a message and only wcd937x IRQ counter is increased however there could be a lot of other reasons for that IRQ. There is a similar opportunity for such delay during DAPM widgets power down sequence. If wcd937x codec reset happens on the start of the playback, then there will be no sound and if such reset happens at the end of a playback then it may generate additional clicks and pops noises. On qrb4210 RB2 board without any debugging bits the wcd937x resets are sometimes observed at the end of a playback though not always. With some debugging messages or with some tracing enabled the AUX PDM watchdog resets the wcd937x codec at the start of a playback and there is no sound output at all. In this patch: - TIMEOUT_SEL bit in PDM_WD_CTL2 register is set to increase the watchdog reset delay to 100ms which eliminates the AUX PDM watchdog IRQs on qrb4210 RB2 board completely and decreases the number of unwanted clicks noises; - HOLD_OFF bit postpones triggering such watchdog IRQ till wcd937x codec reset which usually happens at the end of a playback. This allows to actually output some sound in case of debugging. Cc: Adam Skladowski <a39.skl@gmail.com> Cc: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Cc: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20241022033132.787416-3-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: wcd937x: add missing LO Switch controlAlexey Klimov2024-10-291-0/+2
| | | | | | | | | | | | | | | | | The wcd937x supports also AUX input but the control that sets correct soundwire port for this is missing. This control is required for audio playback, for instance, on qrb4210 RB2 board as well as on other SoCs. Reported-by: Adam Skladowski <a39.skl@gmail.com> Reported-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Suggested-by: Adam Skladowski <a39.skl@gmail.com> Suggested-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20241022033132.787416-2-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: Fix some error handling paths in cs42l51_probe()Christophe JAILLET2024-10-281-2/+5
| | | | | | | | | | | | | | | | | If devm_gpiod_get_optional() fails, we need to disable previously enabled regulators, as done in the other error handling path of the function. Also, gpiod_set_value_cansleep(, 1) needs to be called to undo a potential gpiod_set_value_cansleep(, 0). If the "reset" gpio is not defined, this additional call is just a no-op. This behavior is the same as the one already in the .remove() function. Fixes: 11b9cd748e31 ("ASoC: cs42l51: add reset management") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/a5e5f4b9fb03f46abd2c93ed94b5c395972ce0d1.1729975570.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: rt5640: Always disable IRQs from rt5640_cancel_work()Hans de Goede2024-10-251-12/+15
| | | | | | | | | | | | | | | | | | | | | Disable IRQs from rt5640_cancel_work(), this fixes a crash caused by the IRQ never getting freed when the driver is unbound from the i2c_client with jack-detection active: [ 193.138780] rt5640 i2c-rt5640: ASoC: unknown pin LDO2 [ 193.138830] rt5640 i2c-rt5640: ASoC: unknown pin MICBIAS1 [ 193.671218] BUG: kernel NULL pointer dereference, address: 0000000000000078 [ 193.671239] #PF: supervisor read access in kernel mode [ 193.671248] #PF: error_code(0x0000) - not-present page ... [ 193.671531] ? asm_exc_page_fault+0x22/0x30 [ 193.671551] ? rt5640_jack_inserted+0x10/0x80 [snd_soc_rt5640] [ 193.671574] rt5640_detect_headset+0x93/0x130 [snd_soc_rt5640] [ 193.671596] rt5640_jack_work+0x93/0x355 [snd_soc_rt5640] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patch.msgid.link/20241024215612.92147-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt722-sdca: increase clk_stop_timeout to fix clock stop issueJack Yu2024-10-211-1/+1
| | | | | | | | clk_stop_timeout should be increased to 900ms to fix clock stop issue. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/cd26275d9fc54374a18dc016755cb72d@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: lpass-rx-macro: fix RXn(rx,n) macro for DSM_CTL and SEC7 regsAlexey Klimov2024-10-181-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out some registers of pre-2.5 version of rxmacro codecs are not located at the expected offsets but 0xc further away in memory. So far the detected registers are CDC_RX_RX2_RX_PATH_SEC7 and CDC_RX_RX2_RX_PATH_DSM_CTL. CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) macro incorrectly generates the address 0x540 for RX2 but it should be 0x54C and it also overwrites CDC_RX_RX2_RX_PATH_SEC7 which is located at 0x540. The same goes for CDC_RX_RXn_RX_PATH_SEC7(rx, n). Fix this by introducing additional rxn_reg_stride2 offset. For 2.5 version and above this offset will be equal to 0. With such change the corresponding RXn() macros will generate the same values for 2.5 codec version for all RX paths and the same old values for pre-2.5 version for RX0 and RX1. However for the latter case with RX2 path it will also add rxn_reg_stride2 on top. While at this, also remove specific if-check for INTERP_AUX from rx_macro_digital_mute() and rx_macro_enable_interp_clk(). These if-check was used to handle such special offset for AUX interpolator but since CDC_RX_RXn_RX_PATH_SEC7(rx, n) and CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) macros will generate the correst addresses of dsm register, they are no longer needed. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patch.msgid.link/20241016221049.1145101-1-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Change my e-mail to gmailKirill Marinushkin2024-10-174-7/+7
| | | | | | | | | | | | | | | Change my contact e-mail in pcm3060 driver and MAINTAINERS Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Cc: Kirill Marinushkin <kmarinushkin@birdec.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: linux-kernel@vger.kernel.org Cc: linux-sound@vger.kernel.org Link: https://patch.msgid.link/20241016215810.1544222-1-k.marinushkin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: max98388: Fix missing increment of variable slot_foundColin Ian King2024-10-111-0/+1
| | | | | | | | | | | | | | The variable slot_found is being initialized to zero and inside a for-loop is being checked if it's reached MAX_NUM_CH, however, this is currently impossible since slot_found is never changed. In a previous loop a similar coding pattern is used and slot_found is being incremented. It appears the increment of slot_found is missing from the loop, so fix the code by adding in the increment. Fixes: 6a8e1d46f062 ("ASoC: max98388: add amplifier driver") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20241010182032.776280-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: Fix error handling in aw_dev_get_dsp_status functionZhu Jun2024-10-101-1/+1
| | | | | | | | | Added proper error handling for register value check that return -EPERM when register value does not meet expected condition Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241009073938.7472-1-zhujun2@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'sound-6.12-rc2' of ↵Linus Torvalds2024-10-043-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Slightly high amount of changes in this round, partly because of my vacation in the last weeks. But all changes are small and nothing looks worrisome. The biggest LOCs is MAINTAINERS updates, and there is a core change for card-ID string creation for non-ASCII inputs. Others are rather device-specific, such as new quirks and device IDs for ASoC, usual HD-audio and USB-audio quirks and fixes, as well as regression fixes in HD-audio HDMI audio and Conexant codec" * tag 'sound-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (39 commits) ALSA: hda/conexant: Fix conflicting quirk for System76 Pangolin ALSA: line6: add hw monitor volume control to POD HD500X ALSA: gus: Fix some error handling paths related to get_bpos() usage ALSA: hda: Add missing parameter description for snd_hdac_stream_timecounter_init() ALSA: usb-audio: Add native DSD support for Luxman D-08u ALSA: core: add isascii() check to card ID generator MAINTAINERS: ALSA: use linux-sound@vger.kernel.org list Revert "ALSA: hda: Conditionally use snooping for AMD HDMI" ASoC: intel: sof_sdw: Add check devm_kasprintf() returned value ASoC: imx-card: Set card.owner to avoid a warning calltrace if SND=m ASoC: dt-bindings: davinci-mcasp: Fix interrupts property ASoC: qcom: sm8250: add qrb4210-rb2-sndcard compatible string ASoC: dt-bindings: qcom,sm8250: add qrb4210-rb2-sndcard ALSA: hda: fix trigger_tstamp_latched ALSA: hda/realtek: Add a quirk for HP Pavilion 15z-ec200 ALSA: hda/generic: Drop obsoleted obey_preferred_dacs flag ALSA: hda/generic: Unconditionally prefer preferred_dacs pairs ALSA: silence integer wrapping warning ASoC: Intel: soc-acpi: arl: Fix some missing empty terminators ASoC: Intel: soc-acpi-intel-rpl-match: add missing empty item ...
| * Merge existing fixes from asoc/for-6.12 into new branchMark Brown2024-09-303-3/+3
| |\
| | * ASoC: codecs: lpass-rx-macro: add missing CDC_RX_BCL_VBAT_RF_PROC2 to ↵Alexey Klimov2024-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default regs values CDC_RX_BCL_VBAT_RF_PROC1 is listed twice and its default value is 0x2a which is overwriten by its next occurence in rx_defaults[]. The second one should be missing CDC_RX_BCL_VBAT_RF_PROC2 instead and its default value is expected 0x0. Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20240925043823.520218-2-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: cs35l45: Corrects cs35l45_get_clk_freq_id function data typeRicardo Rivera-Matos2024-09-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes cs35l45_get_clk_freq_id() function data type from unsigned int to int. This function is returns a positive index value if successful or a negative error code if unsuccessful. Functionally there should be no difference as long as the unsigned int return is interpreted as an int, however it should be corrected for readability. Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com> Link: https://patch.msgid.link/20240919151654.197337-1-rriveram@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | move asm/unaligned.h to linux/unaligned.hAl Viro2024-10-0211-11/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asm/unaligned.h is always an include of asm-generic/unaligned.h; might as well move that thing to linux/unaligned.h and include that - there's nothing arch-specific in that header. auto-generated by the following: for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i done for i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i done git mv include/asm-generic/unaligned.h include/linux/unaligned.h git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
* | Merge tag 'sound-6.12-rc1' of ↵Linus Torvalds2024-09-1763-452/+6260
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "A fairly big update at this time, both in core and driver sides. The core received rewrites in PCM buffer allocation handling and locking optimizations, PCM rate updates followed by lots of cleanups. In ASoC side, the legacy Intel drivers have been deprecated by AVS drivers which leaded to the significant amount of code reduction. SoundWire driver updates and other cleanups contributed more code reduction, too. USB-audio driver received a large cleanup of its big quirk table, and the old snd_print*() API usages in many legacy drivers are replaced with the standard print API. Here are some highlights: Core: - More optimized locking in ALSA control code - Rewrites of memalloc helpers for better DMA API usage - Drop of obsoleted vmalloc PCM buffer helper API - Continued MIDI2 UMP updates - Support of a new user-space driven timer instance - Update for more PCM support rates and cleanups - Xrun counter report in the proc files ASoC: - Continued simplification and cleanup works for ASoC - Extensive cleanups and refactoring of the Soundwire drivers - Removal of Intel machine support obsoleted by the AVS driver - Lots of DT schema conversions - Machine support for many AMD and Intel x86 platforms - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320 SoundWire and rev C, and Texas Instruments TAS2563 USB-audio: - Add support of multiple control interfaces - A large rewrite of quirk table with macros - Support for RME Digiface USB HD-audio: - Cleanup of quirk code for Samsung Galaxy laptops - Clean up of detection of Cirrus codecs - C-Media CM9825 HD-audio codec support Others: - Rewrites to standard print API in a lot of legacy drivers" * tag 'sound-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (410 commits) ASoC: topology: Fix redundant logical jump ASoC: tas2781: Add Calibration Kcontrols for Chromebook ASoC: amd: acp: refactor SoundWire machine driver code ASoC: sdw_utils/intel: move soundwire endpoint parsing helper functions ASoC: sdw_util/intel: move soundwire endpoint and dai link structures ASoC: intel: sof_sdw: rename soundwire parsing helper functions ASoC: intel: sof_sdw: rename soundwire endpoint and dailink structures ASoC: atmel: mchp-pdmc: Retain Non-Runtime Controls ALSA: hda/realtek: Add support for Galaxy Book2 Pro (NP950XEE) ASoC: mediatek: mt7986-afe-pcm: Remove redundant error message ALSA: memalloc: Use proper DMA mapping API for x86 S/G buffer allocations ALSA: memalloc: Use proper DMA mapping API for x86 WC buffer allocations ALSA: usb-audio: Add logitech Audio profile quirk ASoc: mediatek: mt8365: Remove unneeded assignment ASoC: Intel: ARL: Add entry for HDMI-In capture support to non-I2S codec boards. ASoC: Intel: sof_rt5682: Add HDMI-In capture with rt5682 support for ARL. ASoC: SOF: Intel: hda: remove common_hdmi_codec_drv ASoC: Intel: sof_pcm512x: do not check common_hdmi_codec_drv ASoC: Intel: ehl_rt5660: do not check common_hdmi_codec_drv ASoC: Intel: skl_hda_dsp_generic: use common module for DAI links ...
| * \ Merge branch 'for-linus' into for-nextTakashi Iwai2024-09-142-2/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | Pull 6.11 fixes to 6.12-devel branch Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * \ \ Merge tag 'asoc-v6.12' of ↵Takashi Iwai2024-09-1456-362/+6229
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.12 This is a very large set of changes, almost all in drivers rather than the core. Even with the addition of several quite large drivers the overall diffstat is negative thanks to the removal of some old Intel board support which has been obsoleted by the AVS driver, helped a bit by some factoring out into helpers (especially around the Soundwire machine drivers for x86). Highlights include: - More simplifications and cleanups throughout the subsystem from Morimoto-san. - Extensive cleanups and refactoring of the Soundwire drivers to make better use of helpers. - Removal of Intel machine support obsoleted by the AVS driver. - Lots of DT schema conversions. - Machine support for many AMD and Intel x86 platforms. - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320 SoundWire and rev C, and Texas Instruments TAS2563
| | * | ASoC: tas2781: Add Calibration Kcontrols for ChromebookShenghao Ding2024-09-133-11/+962
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add calibration related kcontrol for speaker impedance calibration and speaker leakage check for Chromebook. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240911232739.1509-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: tlv320aic31xx: Fix typosAndrew Kreimer2024-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typos in comments. Reported-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Kreimer <algonell@gmail.com> Link: https://patch.msgid.link/20240910211302.8909-1-algonell@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: Switch back to struct platform_driver::remove()Uwe Kleine-König2024-09-0922-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all drivers below sound/soc to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240909151230.909818-2-u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: tlv320aic31xx: Add support for loading filter coefficientsRomain Gantois2024-09-091-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TLV320DAC3100 Audio DAC has 25 built-in digital audio processing blocks (PRBs). Each of these PRBs has a static filter structure with programmable coefficients. Once a PRB is selected for use by the DAC, its filter coefficients can be configured via a dedicated set of registers. Define a new optional firmware which can be loaded by the TLV320DAC driver. This firmware describes a full set of filter coefficients for all blocks used by the various PRBs. The firmware's binary format is heavily inspired by the one used in the peb2466 driver. It includes a version marker to allow for potential evolutions of the format. Note that adaptive filtering is not supported i.e. filter coefficients are loaded once before power-on and then cannot be changed while the DAC is powered. This is why only page A coefficients are modified. Page B coefficients are only used for adaptive filtering. Signed-off-by: Romain Gantois <romain.gantois@bootlin.com> Link: https://patch.msgid.link/20240906-tlv320-filter-v1-1-6955f53ff435@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: codecs: Use devm_clk_get_enabled() helpersying zuxin2024-09-061-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). Signed-off-by: ying zuxin <11154159@vivo.com> Link: https://patch.msgid.link/20240906084841.19248-1-yingzuxin@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: codecs: add MT6357 supportNicolas Belin2024-09-054-0/+2524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the support of MT6357 PMIC audio codec. Signed-off-by: Nicolas Belin <nbelin@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://patch.msgid.link/20240226-audio-i350-v8-1-e80a57d026ce@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: tlv320aic32x4: Add multi endpoint supportMarek Vasut2024-09-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support multiple endpoints on TLV320AIC32x4 codec port when used in of_graph context. This patch allows to share the codec port between two CPU DAIs. Example: Custom STM32MP157C board uses TLV320AIC32x4 audio codec. This codec is connected to two serial audio interfaces, which are configured either as rx or tx. >From AsoC point of view the topolgy is the following: // 2 CPU DAIs (SAI2A/B), 1 Codec (TLV320AIC32x4) Playback: CPU-A-DAI(slave) -> (master)CODEC-DAI/port0 Record: CPU-B-DAI(slave) <- (master)CODEC-DAI/port0 In the DT two endpoints have to be associated to the codec port: tlv320aic32x4_port: port { tlv320aic32x4_tx_endpoint: endpoint@0 { remote-endpoint = <&sai2a_endpoint>; }; tlv320aic32x4_rx_endpoint: endpoint@1 { remote-endpoint = <&sai2b_endpoint>; }; }; However, when the audio graph card parses the codec nodes, it expects to find DAI interface indexes matching the endpoints indexes. The current patch forces the use of DAI id 0 for both endpoints, which allows to share the codec DAI between the two CPU DAIs for playback and capture streams respectively. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://patch.msgid.link/20240830231007.205707-1-marex@denx.de Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: rt5682: Return devm_of_clk_add_hw_provider to transfer the errorMa Ke2024-09-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return devm_of_clk_add_hw_provider() in order to transfer the error, if it fails due to resource allocation failure or device tree clock provider registration failure. Cc: stable@vger.kernel.org Fixes: ebbfabc16d23 ("ASoC: rt5682: Add CCF usage for providing I2S clks") Signed-off-by: Ma Ke <make24@iscas.ac.cn> Link: https://patch.msgid.link/20240830143154.3448004-1-make24@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: rt1320: Add support for version CShuming Fan2024-09-022-23/+2127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch added the support for version C. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20240902090845.1862354-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: cs-amp-lib: Add KUnit test case for empty calibration entriesRichard Fitzgerald2024-08-301-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test case for commit bb4485562f59 ("ASoC: cs-amp-lib: Ignore empty UEFI calibration entries"). Any entries in the calibration blob that have calTime==0 are empty entries. So they must not be returned by a lookup. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240830144819.118362-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: codecs: wsa884x: Implement temperature reading and hwmonKrzysztof Kozlowski2024-08-291-0/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read temperature of the speaker and expose it via hwmon interface, which will be later used during calibration of speaker protection algorithms. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240809110122.137761-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: tas2781: replace devm_kzalloc and scnprintf with devm_kstrdupShenghao Ding2024-08-261-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace devm_kzalloc and scnprintf with devm_kstrdup. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240824060503.1259-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: Merge up fixesMark Brown2024-08-232-1/+15
| | |\ \ | | | | | | | | | | | | | | | | | | | | Some of the fixes for the Intel bards overlap with development work that removed old boards.
| | * | | ASoC: cs35l56: Make struct regmap_config constRichard Fitzgerald2024-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's now possible to declare instances of struct regmap_config as const data. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20240822145535.336407-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: tas2781: Remove unnecessary line feed for tasdevice_codec_removeBaojun Xu2024-08-211-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary line feed for tasdevice_codec_remove. Add comma at the end the last member of the array. Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20240821072527.1294-1-baojun.xu@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: codecs: wcd934x: make read-only array minCode_param static constColin Ian King2024-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate the read-only array minCode_param on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20240821114927.520193-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: Merge up fixesMark Brown2024-08-203-3/+12
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch 'for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-6.12 for some AMD work.
| | * | | | ASoC: tas5086: use sleeping variants of gpiod APIDmitry Torokhov2024-08-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver does not access reset GPIO in atomic contexts so it is usable with GPIOs that may sleep during access. Switch to using gpiod_set_value_cansleep(). Also the reset GPIO is configured as output at the time it is acquired, there is no need to use gpiod_direction_output() when executing reset sequence. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/ZsPty8oNMQk4YTl1@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: Intel: Remove skylake driverMark Brown2024-08-192-0/+3
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: A spiritual successor to haswell/baytrail removal series [1]. The avs-driver found in sound/soc/intel/avs is a direct replacement to the existing skylake-driver. It covers all features supported by it and more and aligns with the recommended flows and requirements based on Windows driver equivalent. The skylake-driver related UAPI has been removed with "ASoC: Drop soc-topology ABI v4 support" [2]. For the official kernel tree the deprecation begun with v6.0. Most skylake-drivers users moved to avs- or SOF-driver when AudioDSP capabilities are available on the platform or to snd-hda-intel (sound/pci/hda) when such capabilities are not. For the supported trees the deprecation begun with v5.4 with v5.15 being the first where the skylake-driver is disabled entirely. All machine board drivers that consume this DSP driver have their replacements present within sound/soc/intel/avs/boards/ directory. [1]: https://lore.kernel.org/alsa-devel/20201006064907.16277-1-cezary.rojewski@intel.com/ [2]: https://lore.kernel.org/alsa-devel/20240403091629.647267-1-cezary.rojewski@intel.com/
| | * | | | | ASoc: tas2781: Remove unnecessary line feed and spaceShenghao Ding2024-08-151-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary line feed for tasdevice_dsp_create_ctrls, and remove two unnecessary spaces in tas2563_digital_gain_get and tas2563_digital_gain_put. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240815042138.1997-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and ↵Shenghao Ding2024-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TAS2781 Rename dai_driver name to unify the name between TAS2563 and TAS2781. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20240811135144.178-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | ASoC: rt1318: Constify struct reg_sequenceChristophe JAILLET2024-08-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'struct reg_sequence' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. While at it, remove rt1318_INIT_REG_LEN which is ununsed. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 22062 4859 32 26953 6949 sound/soc/codecs/rt1318.o After: ===== text data bss dec hex filename 24742 2171 32 26945 6941 sound/soc/codecs/rt1318.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/96561dd2962d4312eb0e68ab850027f44350d070.1722952334.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | ASoC: cs43130: Constify struct reg_sequence and reg_sequencesChristophe JAILLET2024-08-131-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'struct reg_sequence' and 'struct reg_sequences' are not modified in this drivers. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 54409 7881 64 62354 f392 sound/soc/codecs/cs43130.o After: ===== text data bss dec hex filename 55562 6729 64 62355 f393 sound/soc/codecs/cs43130.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/5b906a0cc9b7be15d0d6310069f54254a75ea767.1722951770.git.christophe.jaillet@wanadoo.fr Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | ASoC: tas*: Fix up GPIO usageMark Brown2024-08-087-30/+4
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Linus Walleij <linus.walleij@linaro.org>: The TI TAS drivers use some legacy GPIO code and headers, this series fixes it up. The TAS2781 is a special case since it adds a handful of lines of deviating code to reconfigure a GPIO line for IRQ mode and then never actually use the IRQ obtained in the code. Is the line used by autonomous hardware? I'm puzzled by this. Anyways the patch suggest how to solve this properly by fixing the parent irqchip and I'm happy to help.
| | | * | | | | ASoC: tas*: Drop unused GPIO includesLinus Walleij2024-08-084-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These drivers all use <linux/gpio/consumer.h> and has no business including the legacy headers <linux/gpio.h> or <linux/of_gpio.h>. Drop the surplus includes. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-3-bd0f2705d58b@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: tas2781-i2c: Get the right GPIO lineLinus Walleij2024-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is obtaining a GPIO reset using the reset GPIO name "reset-gpios", but the gpiolib is already adding the suffix "-gpios" to anything passed to this function and will be looking for "reset-gpios-gpios" which is most certainly not what the author desired. Fix it up. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-2-bd0f2705d58b@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | ASoC: tas2781-i2c: Drop weird GPIO codeLinus Walleij2024-08-083-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tas2781-i2c driver gets an IRQ from either ACPI or device tree, then proceeds to check if the IRQ has a corresponding GPIO and in case it does enforce the GPIO as input and set a label on it. This is abuse of the API: - First we cannot guarantee that the numberspaces of the GPIOs and the IRQs are the same, i.e that an IRQ number corresponds to a GPIO number like that. - Second, GPIO chips and IRQ chips should be treated as orthogonal APIs, the irqchip needs to ascertain that the backing GPIO line is set to input etc just using the irqchip. - Third it is using the legacy <linux/gpio.h> API which should not be used in new code yet this was added just a year ago. Delete the offending code. If this creates problems the GPIO and irqchip maintainers can help to fix the issues. It *should* not create any problems, because the irq isn't used anywhere in the driver, it's just obtained and then left unused. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patch.msgid.link/20240807-asoc-tas-gpios-v2-1-bd0f2705d58b@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | | ASoC: codecs: ES8326: input issue after initZhang Yi2024-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We found an input issue after initiation.So we added the default input source at initiation. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20240807025356.24904-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | | ASoC: cs35l56: Use regmap_read_bypassed() to wake the deviceSimon Trimmer2024-08-081-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that regmap_read_bypassed() has been added to the kernel it is preferable to wake the device with a read rather than a write as the utility function can be called at a time before the device has been identified. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://patch.msgid.link/20240807142715.47077-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | | | ASoC: Merge fixesMark Brown2024-08-0817-45/+183
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | So we can apply AMD patches that rely on them.
| | * | | | | | ASoC: cs43130: Constify snd_soc_component_driver structChristophe JAILLET2024-08-021-41/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to constify `snd_soc_component_driver` struct, duplicate `soc_component_dev_cs43130` into a `soc_component_dev_cs43130_digital` and `soc_component_dev_cs43130_analog`. These 2 new structures share the same .dapm_widgets and .dapm_routes arrays but differ for .num_dapm_widgets and .num_dapm_routes. In the digital case, the last entries are not taken into account. Doing so has several advantages: - `snd_soc_component_driver` can be declared as const to move their declarations to read-only sections. - code in the probe is simpler. There is no need to concatenate some arrays to handle the "analog" case - this saves some memory because all_hp_widgets and analog_hp_routes can be removed. Before : ====== text data bss dec hex filename 53965 8265 4512 66742 104b6 sound/soc/codecs/cs43130.o After : ===== text data bss dec hex filename 54409 7881 64 62354 f392 sound/soc/codecs/cs43130.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/1f04bb0366d9640d7ee361dae114ff79e4b381c1.1722274212.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>