summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'mfd-next-6.13' of ↵Linus Torvalds11 days1-42/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: - Several drivers, including atmel-flexcom/rk8xx-core, palmas, and tps65010, have undergone minor code improvements to enhance consistency and fix race conditions. - The syscon driver now utilizes the regmap max_register_is_0 capability for consistent register map configuration across syscons of all sizes. - New device support has been added for QCS8300, qcs615, SA8255p, and samsung,s2dos05, expanding the range of compatible hardware. - The cros_ec driver now supports loading cros_ec_ucsi on supported ECs and avoids loading the charger with UCSI, streamlining functionality. - The bd96801 driver now utilizes the more modern maple tree register cache, improving performance. - The da9052-spi driver has undergone a fix to change the read-mask to write-mask, preventing potential issues. - Unused declarations in max77693 have been removed, and support for samsung,s2dos05 has been added, enhancing code clarity and device compatibility. - Error handling in cs42l43 has been fixed to avoid unbalanced regulator put and ensure proper synchronization during driver removal. - The wcd934x driver now uses MODULE_DEVICE_TABLE() instead of MODULE_ALIAS(), improving code consistency. - Documentation for qcom,tcsr, syscon, and atmel-smc has been updated and reorganized for better clarity and maintainability. - The intel_soc_pmic_bxtwc driver has undergone significant improvements, including the use of IRQ domains for various devices, fixing IRQ domain names duplication, and code refactoring for better consistency and maintainability. - The ipaq-micro driver has received a fix for a missing break statement in the default case, enhancing code robustness. - Support for the AXP323 PMIC has been added to the axp20x driver, along with ensuring a clear relationship between IDs and model names, and allowing multiple regulators, broadening hardware compatibility. - The cs42l43 driver now disables IRQs during suspend for improved power management. - The adp5585 driver has reduced its dependencies by dropping the obsolete dependency on COMPILE_TEST. - Initial support for the MT6328 PMIC has been added to the mt6397 driver, expanding the range of supported hardware. - The rtc-bd70528 driver has been simplified by dropping the IC name from IRQ, improving code readability. - Documentation for qcom,spmi-pmic, ti,twl, and zii,rave-sp has been updated to enhance clarity and incorporate new features. - The rt5033 driver has received a fix for a missing regmap_del_irq_chip() in the error handling path. - New device support has been added for MSM8917, and the intel_soc_pmic_crc driver now supports non-ACPI instantiated i2c_client. - The 88pm886 driver has added support for the RTC cell, and the tqmx86 driver has improved its GPIO IRQ setup and added I2C IRQ support, increasing functionality. - The sprd,sc2731 DT schema has been updated and converted to YAML format for better readability and maintainability. * tag 'mfd-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (62 commits) dt-bindings: mfd: bd71828: Use charger resistor in mOhm instead of MOhm dt-bindings: mfd: sprd,sc2731: Convert to YAML mfd: tqmx86: Add I2C IRQ support mfd: tqmx86: Make IRQ setup errors non-fatal mfd: tqmx86: Refactor GPIO IRQ setup mfd: tqmx86: Improve gpio_irq module parameter description mfd: tqmx86: Add board definitions for TQMx120UC, TQMx130UC and TQMxE41S mfd: 88pm886: Add the RTC cell dt-bindings: mfd: Add Realtek RTL9300 switch peripherals mfd: intel_soc_pmic_crc: Add support for non ACPI instantiated i2c_client mfd: intel_soc_pmic_*: Consistently use filename as driver name dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8917 mfd: rt5033: Fix missing regmap_del_irq_chip() mfd: cgbc-core: Fix error handling paths in cgbc_init_device() dt-bindings: mfd: aspeed: Support for AST2700 mfd: Switch back to struct platform_driver::remove() dt-bindings: mfd: qcom,spmi-pmic: Document PMICs added in SM8750 mfd: rtc: bd7xxxx Drop IC name from IRQ mfd: mt6397: Add initial support for MT6328 mfd: adp5585: Drop obsolete dependency on COMPILE_TEST ...
| * mfd: cs42l43: Disable IRQs during suspendCharles Keepax2024-10-311-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASoC CODEC driver masks the IRQs whilst entering and exiting system suspend to avoid issues where the IRQ handler can run but PM runtime is disabled. However, as the IRQs could also be used from other parts of the driver, it would be better to move this handling to the MFD level. Remove the handling from the ASoC driver and move it to the MFD driver. Whilst moving also ensure the IRQs are all masked at the device level before powering down the device, as per hardware recommendations. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org.> Link: https://lore.kernel.org/r/20241014095202.828194-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
* | ASoC: hdmi-codec: reorder channel allocation listJonas Karlman2024-11-151-63/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ordering in hdmi_codec_get_ch_alloc_table_idx() results in wrong channel allocation for a number of cases, e.g. when ELD reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC: ca_id 0x01 with speaker mask FL|FR|LFE is selected instead of ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels and ca_id 0x04 with speaker mask FL|FR|RC gets selected instead of ca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels Fix this by reordering the channel allocation list with most specific speaker masks at the top. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://patch.msgid.link/20241115044344.3510979-1-christianshewitt@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoc: simple-mux: Allow to specify an idle-stateMark Brown2024-11-141-1/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | Merge series from "Hendrik v. Raven" <h.v.raven@merzmedtech.de>: This series adds support for the idle-state property from the mux framework to the simple-mux audio variant. It allows to specify the state of the mux when it is not in use.
| * | 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: sma1307: fix uninitialized variable refenceArnd Bergmann2024-11-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When firmware loading is disabled, gcc warns that the local 'fw' variable fails to get initialized: sound/soc/codecs/sma1307.c: In function 'sma1307_setting_loaded.isra': sound/soc/codecs/sma1307.c:1717:12: error: 'fw' is used uninitialized [-Werror=uninitialized] 1717 | if (!fw) { | ^ sound/soc/codecs/sma1307.c:1712:32: note: 'fw' was declared here 1712 | const struct firmware *fw; Check the return code from request_firmware() to ensure that the firmware is correctly set, and drop the incorrect release_firmware() on that uninitialized data. Fixes: 576c57e6b4c1 ("ASoC: sma1307: Add driver for Iron Device SMA1307") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20241113175734.2443315-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: Merge up fixesMark Brown2024-11-1412-34/+59
|\ \ \ | | | | | | | | | | | | Needed for new Intel board file changes.
| * | | ASoC: max9768: Fix event generation for playback muteMark Brown2024-11-121-2/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max9768 has a custom control for playback mute which unconditionally returns 0 from the put() operation, rather than returning 1 on change to ensure notifications are generated to userspace. Check to see if the value has changed and return appropriately. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20241112-asoc-max9768-event-v1-1-ba5d50599787@kernel.org 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: max98088: Add headphone mixer switchMarek Vasut2024-11-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add enable/disable headphone output mixers knob. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://patch.msgid.link/20241111165523.113142-1-marex@denx.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: max98088: Add left/right DAC volume controlMarek Vasut2024-11-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add left/right DAC digital volume control knob. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://patch.msgid.link/20241111165435.113086-1-marex@denx.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: max98088: Remove duplicate DACsMarek Vasut2024-11-111-54/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This codec only has one set of left and right DACs, remove the duplicate DACs with duplicated bits controlling them as the userspace can set those controls to mismatched value. This most likely does break userspace ABI, but there seem to be no in-kernel users. Signed-off-by: Marek Vasut <marex@denx.de> Link: https://patch.msgid.link/20241108235453.196289-1-marex@denx.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: sma1307: Fix invalid logical judgementTang Bin2024-11-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function sma1307_dai_hw_params_amp, the variable 'ret' has not been assigned a value, so the logical judgement is invalid, thus fix it. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20241108011617.2284-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Add a driver for the Iron Device SMA1307 AmpMark Brown2024-11-074-0/+2508
|\ \ \ | | | | | | | | | | | | | | | | | | | | Merge series from Kiseok Jo <kiseok.jo@irondevice.com>: This adds basic audio support for the Iron Device SMA1307 amplifier
| * | | ASoC: sma1307: Add driver for Iron Device SMA1307Kiseok Jo2024-11-064-0/+2508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Iron Device SMA1307 is a boosted digital speaker amplifier Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com> Link: https://patch.msgid.link/20241106005800.7520-3-kiseok.jo@irondevice.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: da7213: Extend support for the MCK in range [2, 50] MHzHao Bui2024-11-062-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to DA7212 HW manual, the codec's PLL input divider can operate with MCLK range from 2MHz to 50MHz but current driver only set the minimum supported MCLK frequency to 5MHz. That cause 11.025kHz audio which is corresponding to MCLK of 2.8224MHz (11.025kHz * 256) unable to play in case audio-simple-card is used. Signed-off-by: Hao Bui <hao.bui.yg@renesas.com> Co-developed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241106081826.1211088-27-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: da7213: Avoid setting PLL when closing audio streamHao Bui2024-11-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When audio stream is closing, audio frequency is set to 0 by ALSA but codec driver DA7213 does not handle properly in this case. This patch adds checking of 0Hz frequency to da7213_set_component_sysclk() and avoid unnecessary PLL settings. Signed-off-by: Hao Bui <hao.bui.yg@renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241106081826.1211088-26-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: da7213: Add suspend to RAM supportClaudiu Beznea2024-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suspend to RAM support. This uses the already available runtime PM support. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241106081826.1211088-25-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: da7213: Return directly the value of regcache_sync()Claudiu Beznea2024-11-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return directly the value of the regcache_sync() in da7213_runtime_resume(). In case of any failures this will inform the runtime resume process. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241106081826.1211088-24-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: da7213: Populate max_register to regmap_configClaudiu Beznea2024-11-061-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Renesas RZ/G3S SMARC Carrier II board having a DA7212 codec (using da7213 driver) connected to one SSIF-2 available on the Renesas RZ/G3S SoC it has been discovered that using the runtime PM API for suspend/resume (as will be proposed in the following commits) leads to the codec not being propertly initialized after resume. This is because w/o max_register populated to regmap_config the regcache_rbtree_sync() breaks on base_reg > max condition and the regcache_sync_block() call is skipped. Fixes: ef5c2eba2412 ("ASoC: codecs: Add da7213 codec") Cc: stable@vger.kernel.org Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20241106081826.1211088-23-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: Add aw88081 amplifier driverMark Brown2024-11-054-0/+1387
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from wangweidong.a@awinic.com: Add the awinic,aw88081 property to support the aw88081 chip. The driver is for amplifiers aw88081 of Awinic Technology Corporation. The awinic AW88081 is an I2S/TDM input, high efficiency digital Smart K audio amplifier
| * | | ASoC: codecs: Add aw88081 amplifier driverWeidong Wang2024-11-014-0/+1387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is for amplifiers aw88081 of Awinic Technology Corporation. The awinic AW88081 is an I2S/TDM input, high efficiency digital Smart K audio amplifier Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Reviewed-by: anish kumar <yesanishhere@gmail.com> Link: https://patch.msgid.link/20241024090324.131731-3-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: rt721-sdca: change interrupt mask from XU to GEJack Yu2024-11-053-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change interrupt mask from XU to GE to fix jack detection interrupt issue. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/cbc81e324673467a96b70e4e219766b5@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: rt722: change the interrupt mask for jack type detectionShuming Fan2024-11-052-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changed the interrupt mask from XU to GE. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20241105100557.1987917-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()Qiu-ji Chen2024-11-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An atomicity violation occurs when the validity of the variables da7219->clk_src and da7219->mclk_rate is being assessed. Since the entire assessment is not protected by a lock, the da7219 variable might still be in flux during the assessment, rendering this check invalid. To fix this issue, we recommend adding a lock before the block if ((da7219->clk_src == clk_id) && (da7219->mclk_rate == freq)) so that the legitimacy check for da7219->clk_src and da7219->mclk_rate is protected by the lock, ensuring the validity of the check. This possible bug is found by an experimental static analysis tool developed by our team. This tool analyzes the locking APIs to extract function pairs that can be concurrently executed, and then analyzes the instructions in the paired functions to identify possible concurrency bugs including data races and atomicity violations. Fixes: 6d817c0e9fd7 ("ASoC: codecs: Add da7219 codec driver") Cc: stable@vger.kernel.org Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com> Link: https://patch.msgid.link/20240930101216.23723-1-chenqiuji666@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: codecs: ES8326: Reduce pop noiseZhang Yi2024-11-051-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | We modify the value of ES8326_ANA_MICBIAS to reduce the pop noise Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20241031060253.21001-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: wcd937x: Remove unused of_gpio.hAndy Shevchenko2024-10-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241031103302.2450830-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs42l84: Remove unused including <linux/version.h>Jiapeng Chong2024-10-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./sound/soc/codecs/cs42l84.c: 15 linux/version.h not needed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11570 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://patch.msgid.link/20241030021047.70543-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: adau1373: drop platform dataMark Brown2024-10-292-46/+156
|\ \ \ | | | | | | | | | | | | | | | | | | | | Merge series from Nuno Sa <nuno.sa@analog.com>: Support the powerdown GPIO on ADAU1373.
| * | | ASoC: codecs: adau1373: add powerdown gpioNuno Sa2024-10-291-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the powerdown GPIO is specified, we use it for reset. Otherwise, fallback to a software reset. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-4-647f56bbd182@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: codecs: adau1373: drop patform_dataNuno Sa2024-10-291-44/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct adau1373_platform_data" was not being used by any platform. Hence, drop it and move to firmware based support. All the configurations quirks present in the platform_data are now supported as firmware properties. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-3-647f56bbd182@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: codecs: adau1373: add some kconfig textNuno Sa2024-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some text to 'tristate' so that we can actually enable the driver when using things like menuconfig. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-1-647f56bbd182@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cs42l84: remove incorrect of_match_ptr()Arnd Bergmann2024-10-291-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of of_match_ptr() is incorrect here and just causes a warning: sound/soc/codecs/cs42l84.c:1084:34: error: unused variable 'cs42l84_of_match' [-Werror,-Wunused-const-variable] Fixes: 250304a0fb34 ("ASoC: cs42l84: Add new codec driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20241029092404.3874040-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: ES8326: Modify the configuration of and micbiasZhang Yi2024-10-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we designed a new version of ES8326, the configuration of micbias needed to be modified.We tested the new driver, on both the new version and the old one. It works well. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20241028060529.3359-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt1320: add mic functionShuming Fan2024-10-252-14/+313
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the mic function. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20241025081259.1419518-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: add CS42L84 codec driverMark Brown2024-10-244-0/+1331
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from James Calligeros <jcalligeros99@gmail.com>: This patch set adds a driver for the Cirrus Logic CS42L84 codec. This chip is (so far) found only on Apple Silicon Macs. In keeping with proud Apple tradition, the CS42L84 is essentially just a CS42L42 with a different regmap and no publicly available datasheet. It may also be missing its parent's S/PDIF capabilities as none of Apple's devices support S/PDIF out, however this cannot be positively confirmed. This driver has lived in the downstream Asahi tree for quite a while now, and gained some refinements along the way. I have squashed most of these into the initial driver commit as they were small changes like tweaking msleep()s or filling out TLVs, but left seperate a larger change to tip/ring sense IRQ handling as it differs significantly from what is found in the CS42L42 driver.
| * | | ASoC: cs42l84: leverage ring sense IRQs to correctly detect headsetsJames Calligeros2024-10-241-30/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some jacks integrated on devices with this codec, such as certain Apple Silicon Macs, have quite trigger-happy tip sense switches that cause a tip sense IRQ before the plug is fully seated. If users are unfortunate with their timing, this can lead to headsets being detected as mic-less headphones among other issues with the codec's device detection routines. Introduce some rudimentary ring sense interrupt handling so that we can re-trigger the codec's detection routines when we are certain that the plug is fully seated. This seems to differ from what other Cirrus drivers do, but is necessary for devices to be reliably detected properly here. Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Link: https://patch.msgid.link/20241020-cs42l84-v2-3-37ba2b6721d9@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: cs42l84: Add new codec driverMartin Povišer2024-10-244-0/+1301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CS42L84 is a codec from Cirrus Logic found in Apple Silicon Macs. The chip continues Apple's long tradition of compelling vendors to spin out bespoke SKUs that are based on existing IP but made subtly incompatible with the publicly available part. CS42L84 is very similar to CS42L42, but has a different regmap. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Link: https://patch.msgid.link/20241020-cs42l84-v2-2-37ba2b6721d9@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: rt-sdw-common: fix rt_sdca_index_update_bits function parameter ↵Bard Liao2024-10-241-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | description Fix the mismatch between function parameter and description. Below warning are reported with W=1. warning: Function parameter or struct member 'val' not described in 'rt_sdca_index_update_bits' warning: Excess function parameter 'value' description in 'rt_sdca_index_update_bits' Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20241024060205.20201-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: fix error code in ntp8835_i2c_probe()Harshit Mogalapalli2024-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reset_control_deassert() fails it returns valid error codes stored in return, pass that to dev_err_probe() instead of PTR_ERR(ntp8835->reset). Fixes: dc9004ea273a ("ASoC: codecs: Add NeoFidelity NTP8835 codec") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202409281054.DUTb5KxU-lkp@intel.com/ Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Link: https://patch.msgid.link/20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: codecs: adau1372: add match tableNuno Sa2024-10-224-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Add an of_device_id table for both the I2C and SPI drivers. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241021-adau1372-of-table-v1-1-6efbc7946957@analog.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC/soundwire: add initial support for SDCAMark Brown2024-10-183-9/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: We need to get rt712 version by reading SDCA version and functions. This patch series adds initial support for SDCA and add a helper to tell if the codec is RT712_VB. This series may go via the ASoC tree with Vinod's Acked-by tag. Bard Liao (1): soundwire: sdw_intel: include linux/acpi.h Pierre-Louis Bossart (10): ASoC/soundwire: remove sdw_slave_extended_id ASoC: SDCA: add initial module soundwire: slave: lookup SDCA version and functions ASoC: SDCA: add quirk function for RT712_VB match ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage ASoC: soc-acpi: introduce new 'machine check' callback ASoC: sdw_utils: add SmartMic DAI for RT712 VB ASoC: sdw_utils: add SmartMic DAI for RT713 VB ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper ASoC: SOF: Intel: hda: use machine_check() for SoundWire drivers/soundwire/Kconfig | 1 + drivers/soundwire/amd_init.c | 12 +- drivers/soundwire/intel_init.c | 13 +- drivers/soundwire/slave.c | 14 ++ include/linux/soundwire/sdw.h | 9 +- include/linux/soundwire/sdw_amd.h | 7 +- include/linux/soundwire/sdw_intel.h | 8 +- include/sound/sdca.h | 62 +++++++ include/sound/sdca_function.h | 55 ++++++ include/sound/soc-acpi.h | 8 +- sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/amd/ps/pci-ps.c | 3 +- sound/soc/codecs/rt712-sdca-sdw.c | 1 + sound/soc/codecs/rt712-sdca.c | 38 +++- sound/soc/codecs/rt712-sdca.h | 1 + sound/soc/intel/Kconfig | 5 + sound/soc/intel/common/Makefile | 3 + .../intel/common/soc-acpi-intel-mtl-match.c | 51 ++++++ .../intel/common/soc-acpi-intel-sdca-quirks.c | 42 +++++ .../intel/common/soc-acpi-intel-sdca-quirks.h | 14 ++ sound/soc/sdca/Kconfig | 11 ++ sound/soc/sdca/Makefile | 5 + sound/soc/sdca/sdca_device.c | 67 +++++++ sound/soc/sdca/sdca_functions.c | 173 ++++++++++++++++++ sound/soc/sdw_utils/soc_sdw_utils.c | 18 +- sound/soc/soc-acpi.c | 30 +-- sound/soc/sof/amd/acp-common.c | 3 +- sound/soc/sof/intel/hda.c | 19 +- 29 files changed, 610 insertions(+), 65 deletions(-) create mode 100644 include/sound/sdca.h create mode 100644 include/sound/sdca_function.h create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h create mode 100644 sound/soc/sdca/Kconfig create mode 100644 sound/soc/sdca/Makefile create mode 100644 sound/soc/sdca/sdca_device.c create mode 100644 sound/soc/sdca/sdca_functions.c -- 2.43.0
| * | | ASoC: rt712-sdca: detect the SMART_MIC function during the probe stagePierre-Louis Bossart2024-10-173-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't do any devm_ based allocation in the io_init(), this need to happen in the probe(). Luckily, we now have an SDCA helper to look in ACPI tables if a SMART_MIC function is exposed. FIXME: the registers are not well handled today, the regmap lists registers which are not really supported in all platforms. The regmap needs to throw an error if those registers are accessed without existing. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20241016102333.294448-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>