summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2023-06-30ASoC: codecs: wcd938x: use dev_printk() for impedance loggingJohan Hovold1-7/+8
Pass the component structure also to the wcd938x_mbhc_get_result_params() helper so that the component device can be used for logging consistently. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230630142717.5314-4-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30ASoC: codecs: wcd938x: drop inline keywordsJohan Hovold1-3/+3
The compiler is generally better at deciding what functions should be inlined than driver authors are. Drop the bogus inline keyword from two functions that were neither very small or used in a single place. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230630142717.5314-3-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30ASoC: codecs: wcd938x: fix mbhc impedance loglevelJohan Hovold1-2/+2
Demote the MBHC impedance measurement printk, which is not an error message, from error to debug level. While at it, fix the capitalisation of "ohm" and add the missing space before the opening parenthesis. Fixes: bcee7ed09b8e ("ASoC: codecs: wcd938x: add Multi Button Headset Control support") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230630142717.5314-2-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30ASoC: qdsp6: q6apm: use dai link pcm id as pcm device numberSrinivas Kandagatla1-0/+1
For some reason we ended up with a setup without this flag. This resulted in inconsistent sound card devices numbers which are also not starting as expected at dai_link->id. (Ex: MultiMedia1 pcm ended up with device number 4 instead of 0) With this patch patch now the MultiMedia1 PCM ends up with device number 0 as expected. [This is causing unstable numbering in userspace as other changes go in, which in turn gets noticed by some userspace. There's been multiple values so we can't simply pick one and revert to it. Do not backport since it will introduce a change. -- broonie] Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230628092404.13927-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30ASoC: codecs: wcd938x: fix codec initialisation raceJohan Hovold1-0/+6
Make sure to resume the codec and soundwire device before trying to read the codec variant and configure the device during component probe. This specifically avoids interpreting (a masked and shifted) -EBUSY errno as the variant: wcd938x_codec audio-codec: ASoC: error at soc_component_read_no_lock on audio-codec for register: [0x000034b0] -16 when the soundwire device happens to be suspended, which in turn prevents some headphone controls from being registered. Fixes: 8d78602aa87a ("ASoC: codecs: wcd938x: add basic driver") Cc: stable@vger.kernel.org # 5.14 Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reported-by: Steev Klimaszewski <steev@kali.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20230630120318.6571-1-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30ASoC: SOF: amd: add revision check for sending sha dma completion commandMastan Katragadda1-3/+7
ACP driver should send SHA DMA completion command to PSP module for RN platform only. Add a revision check for RN platform. Signed-off-by: Mastan Katragadda <Mastan.Katragadda@amd.com> Link: https://lore.kernel.org/r/20230630070544.2167421-1-Mastan.Katragadda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-30Merge tag 'soc-arm-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/socLinus Torvalds1-2/+0
Pull ARM SoC updates from Arnd Bergmann: "These are mostly minor cleanups and bugfixes that address harmless problems. The largest branch is a conversion of the omap platform to use GPIO descriptors throughout the tree, for any devices that are not fully converted to devicetree. The Samsung Exynos platform gains back support for the Exynos4212 chip that was previously unused and removed but is now used for the Samsung Galaxy Tab3" * tag 'soc-arm-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits) ARM: omap2: Fix copy/paste bug MAINTAINERS: Replace my email address Input: ads7846 - fix pointer cast warning Input: ads7846 - Fix usage of match data ARM: omap2: Fix checkpatch issues arm: omap1: replace printk() with pr_err macro ARM: omap: Fix checkpatch issues ARM: s3c: Switch i2c drivers back to use .probe() ARM: versatile: mark mmc_status() static ARM: spear: include "pl080.h" for pl080_get_signal() prototype ARM: sa1100: address missing prototype warnings ARM: pxa: fix missing-prototypes warnings ARM: orion5x: fix d2net gpio initialization ARM: omap2: fix missing tick_broadcast() prototype ARM: omap1: add missing include ARM: lpc32xx: add missing include ARM: imx: add missing include ARM: highbank: add missing include ARM: ep93xx: fix missing-prototype warnings ARM: davinci: fix davinci_cpufreq_init() declaration ...
2023-06-29Merge tag 'sound-6.5-rc1' of ↵Linus Torvalds524-6381/+29072
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Lots of changes as usual, but the only significant stuff in ALSA core part is the MIDI 2.0 support, while ASoC core kept receiving the code refactoring. The majority of changes are seen rather in device drivers, and quite a few new drivers can be found there. Here we go, some highlights: ALSA and ASoC Core: - Support of MIDI 2.0 devices: rawmidi and sequencer API have been extended for the support of the new UMP (Universal MIDI Packet) protocol, USB audio driver got the USB MIDI 2.0 interface support - Continued refactoring around ASoC DAI links and the ordering of trigger callbacks - PCM ABI extension for better drain support ASoC Drivers: - Conversions of many drivers to use maple tree based caches - Everlasting improvement works on ASoC Intel drivers - Compressed audio support for Qualcomm - Support for AMD SoundWire, Analog Devices SSM3515, Google Chameleon, Ingenic X1000, Intel systems with various CODECs, Loongson platforms, Maxim MAX98388, Mediatek MT8188, Nuvoton NAU8825C, NXP platforms with NAU8822, Qualcomm WSA884x, StarFive JH7110, Texas Instruments TAS2781 HD-audio: - Quirks for HP and ASUS machines - CS35L41 HD-audio codec fixes - Loongson HD-audio support Misc: - A new virtual PCM test driver for kselftests - Continued refactoring and improvements on the legacy emu10k1 driver" * tag 'sound-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (556 commits) ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook ASoC: hdmi-codec: fix channel info for compressed formats ALSA: pcm: fix ELD constraints for (E)AC3, DTS(-HD) and MLP formats ASoC: core: Always store of_node when getting DAI link component ASoC: tas2781: Fix error code in tas2781_load_calibration() ASoC: amd: update pm_runtime enable sequence ALSA: ump: Export MIDI1 / UMP conversion helpers ASoC: tas2781: fix Kconfig dependencies ASoC: amd: acp: remove acp poweroff function ASoC: amd: acp: clear pdm dma interrupt mask ASoC: codecs: max98090: Allow dsp_a mode ASoC: qcom: common: add default jack dapm pins ASoC: loongson: fix address space confusion ASoC: dt-bindings: microchip,sama7g5-pdmc: Simplify "microchip,mic-pos" constraints ASoC: tegra: Remove stale comments in AHUB ASoC: tegra: Use normal system sleep for ASRC ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio ASoC: fsl-asoc-card: Allow passing the number of slots in use ASoC: codecs: wsa884x: Add WSA884x family of speakers ASoC: dt-bindings: qcom,wsa8840: Add WSA884x family of speakers ...
2023-06-29Merge tag 'clk-for-linus' of ↵Linus Torvalds1-13/+16
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This batch of clk driver updates contains almost no new SoC support. Instead there's a treewide patch series from Maxime that makes clk_ops::determine_rate mandatory for muxes. Beyond that core framework change we have the usual pile of clk driver updates such as migrating i2c drivers to use .probe() again or YAMLfication of clk DT bindings so we can validate DTBs. Overall the SoCs that got the most updates this time around in terms of diffstat are the Amlogic and Mediatek drivers because they added new SoC support or fixed up various drivers to have proper data. In general things look kinda quiet. I suspect the core framework change may still shake out some problems after the merge window, mostly because not everyone tests linux-next where that series has been for some number of weeks. I saw that there's at least one pending fix for Tegra that needs to be wrapped up into a proper patch. I'll try to catch those bits before the window closes so that -rc1 is bootable. More details below. Core: - Make clk_ops::determine_rate mandatory for muxes New Drivers: - Add amlogic a1 SoC family PLL and peripheral clock controller support Updates: - Handle allocation failures from kasprintf() and friends - Migrate platform clk drivers to .remove_new() - Migrate i2c clk drivers to .probe() instead of .probe_new() - Remove CLK_SET_PARENT from all Mediatek MSDC core clocks - Add infra_ao reset support for Mediatek MT8188 SoCs - Align driver_data to i2c_device_id tables in some i2c clk drivers - Use device_get_match_data() in vc5 clk driver - New Kconfig symbol name (SOC_MICROCHIP_POLARFIRE) for Microchip FPGA clock drivers - Use of_property_read_bool() to read "microchip,pic32mzda-sosc" boolean DT property in clk-pic32mzda - Convert AT91 clock dt-bindings to YAML - Remove CLK_SET_RATE_PARENT flag from LDB clocks on i.MX6SX - Keep i.MX UART clocks enabled during kernel boot if earlycon is set - Drop imx_unregister_clocks() as there are no users anymore - Switch to _safe iterator on imx_clk_scu_unregister() to avoid use after free - Add determine_rate op to the imx8m composite clock - Use device managed API for iomap and kzalloc for i.MXRT1050, i.MX8MN, i.MX8MP and i.MX93 clock controller drivers - Add missing interrupt DT property for the i.MX8M clock controller - Re-add support for Exynos4212 clock controller because we are re-introducing the SoC in the mainline - Add CONFIG_OF dependency to Samsung clk Kconfig symbols to solve some objtool warnings - Preselect PLL MIPI as TCON0 parent for Allwinner A64 SoC - Convert the Renesas clock drivers to readl_poll_timeout_atomic() - Add PWM clock on Renesas R-Car V3U - Fix PLL5 on Renesas RZ/G2L and RZ/V2L" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (149 commits) clk: fix typo in clk_hw_register_fixed_rate_parent_data() macro clk: Fix memory leak in devm_clk_notifier_register() clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes clk: mvebu: Use of_get_cpu_hwid() to read CPU ID MAINTAINERS: Add Marvell mvebu clock drivers clk: clocking-wizard: check return value of devm_kasprintf() clk: ti: clkctrl: check return value of kasprintf() clk: keystone: sci-clk: check return value of kasprintf() clk: si5341: free unused memory on probe failure clk: si5341: check return value of {devm_}kasprintf() clk: si5341: return error if one synth clock registration fails clk: cdce925: check return value of kasprintf() clk: vc5: check memory returned by kasprintf() clk: mediatek: clk-mt8173-apmixedsys: Fix iomap not released issue clk: mediatek: clk-mt8173-apmixedsys: Fix return value for of_iomap() error clk: mediatek: clk-mtk: Grab iomem pointer for divider clocks clk: keystone: syscon-clk: Add support for audio refclk dt-bindings: clock: Add binding documentation for TI Audio REFCLK dt-bindings: clock: ehrpwm: Remove unneeded syscon compatible clk: keystone: syscon-clk: Allow the clock node to not be of type syscon ...
2023-06-29ASoC: rt5640: Fix sleep in atomic contextSameer Pujar1-5/+7
Following prints are observed while testing audio on Jetson AGX Orin which has onboard RT5640 audio codec: BUG: sleeping function called from invalid context at kernel/workqueue.c:3027 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 preempt_count: 10001, expected: 0 RCU nest depth: 0, expected: 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1e0/0x270 ---[ end trace ad1c64905aac14a6 ]- The IRQ handler rt5640_irq() runs in interrupt context and can sleep during cancel_delayed_work_sync(). Fix this by running IRQ handler, rt5640_irq(), in thread context. Hence replace request_irq() calls with devm_request_threaded_irq(). Fixes: 051dade34695 ("ASoC: rt5640: Fix the wrong state of JD1 and JD2") Cc: stable@vger.kernel.org Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1688015537-31682-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-29ASoC: tegra: Fix ADX byte mapSheetal1-12/+22
Byte mask for channel-1 of stream-1 is not getting enabled and this causes failures during ADX use cases. This happens because the byte map value 0 matches the byte map array and put() callback returns without enabling the corresponding bits in the byte mask. ADX supports 4 output streams and each stream can have a maximum of 16 channels. Each byte in the input frame is uniquely mapped to a byte in one of these 4 outputs. This mapping is done with the help of byte map array via user space control setting. The byte map array size in the driver is 16 and each array element is of size 4 bytes. This corresponds to 64 byte map values. Each byte in the byte map array can have any value between 0 to 255 to enable the corresponding bits in the byte mask. The value 256 is used as a way to disable the byte map. However the byte map array element cannot store this value. The put() callback disables the byte mask for 256 value and byte map value is reset to 0 for this case. This causes problems during subsequent runs since put() callback, for value of 0, just returns without enabling the byte mask. In short, the problem is coming because 0 and 256 control values are stored as 0 in the byte map array. Right now fix the put() callback by actually looking at the byte mask array state to identify if any change is needed and update the fields accordingly. The get() callback needs an update as well to return the correct control value that user has set before. Note that when user set 256, the value is stored as 0 and byte mask is disabled. So byte mask state is used to either return 256 or the value from byte map array. Given above, this looks bit complicated and all this happens because the byte map array is tightly packed and cannot actually store the 256 value. Right now the priority is to fix the existing failure and a TODO item is put to improve this logic. Fixes: 3c97881b8c8a ("ASoC: tegra: Fix kcontrol put callback in ADX") Cc: stable@vger.kernel.org Signed-off-by: Sheetal <sheetal@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1688015537-31682-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-29ASoC: tegra: Fix AMX byte mapSheetal1-18/+22
Byte mask for channel-1 of stream-1 is not getting enabled and this causes failures during AMX use cases. This happens because the byte map value 0 matches the byte map array and put() callback returns without enabling the corresponding bits in the byte mask. AMX supports 4 input streams and each stream can take a maximum of 16 channels. Each byte in the output frame is uniquely mapped to a byte in one of these 4 inputs. This mapping is done with the help of byte map array via user space control setting. The byte map array size in the driver is 16 and each array element is of size 4 bytes. This corresponds to 64 byte map values. Each byte in the byte map array can have any value between 0 to 255 to enable the corresponding bits in the byte mask. The value 256 is used as a way to disable the byte map. However the byte map array element cannot store this value. The put() callback disables the byte mask for 256 value and byte map value is reset to 0 for this case. This causes problems during subsequent runs since put() callback, for value of 0, just returns without enabling the byte mask. In short, the problem is coming because 0 and 256 control values are stored as 0 in the byte map array. Right now fix the put() callback by actually looking at the byte mask array state to identify if any change is needed and update the fields accordingly. The get() callback needs an update as well to return the correct control value that user has set before. Note that when user sets 256, the value is stored as 0 and byte mask is disabled. So byte mask state is used to either return 256 or the value from byte map array. Given above, this looks bit complicated and all this happens because the byte map array is tightly packed and cannot actually store the 256 value. Right now the priority is to fix the existing failure and a TODO item is put to improve this logic. Fixes: 8db78ace1ba8 ("ASoC: tegra: Fix kcontrol put callback in AMX") Cc: stable@vger.kernel.org Signed-off-by: Sheetal <sheetal@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1688015537-31682-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-29ALSA: hda/realtek: Add quirk for Clevo NPx0SNxWerner Sembach1-0/+1
This applies a SND_PCI_QUIRK(...) to the Clevo NPx0SNx barebones fixing the microphone not being detected on the headset combo port. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230628155434.584159-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-28Merge tag 'regulator-v6.5' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This release is almost all drivers, there's some small improvements in the core but otherwise everything is updates to drivers, mostly the addition of new ones. There's also a bunch of changes pulled in from the MFD subsystem as dependencies, Rockchip and TI core MFD code that the regulator drivers depend on. I've also yet again managed to put a SPI commit in the regulator tree, I don't know what it is about those two trees (this for spi-geni-qcom). Summary: - Support for Renesas RAA215300, Rockchip RK808, Texas Instruments TPS6594 and TPS6287x, and X-Powers AXP15060 and AXP313a" * tag 'regulator-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (43 commits) regulator: Add Renesas PMIC RAA215300 driver regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings regulator: ltc3676: Use maple tree register cache regulator: ltc3589: Use maple tree register cache regulator: helper: Document ramp_delay parameter of regulator_set_ramp_delay_regmap() regulator: mt6358: Use linear voltage helpers for single range regulators regulator: mt6358: Const-ify mt6358_regulator_info data structures regulator: mt6358: Drop *_SSHUB regulators regulator: mt6358: Merge VCN33_* regulators regulator: dt-bindings: mt6358: Drop *_sshub regulators regulator: dt-bindings: mt6358: Merge ldo_vcn33_* regulators regulator: dt-bindings: pwm-regulator: Add missing type for "pwm-dutycycle-unit" regulator: Switch two more i2c drivers back to use .probe() spi: spi-geni-qcom: Do not do DMA map/unmap inside driver, use framework instead soc: qcom: geni-se: Add interfaces geni_se_tx_init_dma() and geni_se_rx_init_dma() regulator: tps6594-regulator: Add driver for TI TPS6594 regulators regulator: axp20x: Add AXP15060 support regulator: axp20x: Add support for AXP313a variant dt-bindings: pfuze100.yaml: Add an entry for interrupts regulator: stm32-pwr: Fix regulator disabling ...
2023-06-28Merge branch 'topic/midi20' into for-linusTakashi Iwai1-1/+1
Pull a typo fix in MIDI 2.0 helper code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-28ALSA: ump: Correct wrong byte size at converting a UMP System messageTakashi Iwai1-1/+1
A wrong size for UMP_SYSTEM_STATUS_MIDI_TIME_CODE and case UMP_SYSTEM_STATUS_SONG_SELECT was reported at converting to the legacy MIDI 1.0 stream. This patch corrects the value. Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Link: https://lore.kernel.org/r/20230628094352.15754-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-28ALSA: fireface: make read-only const array for model names staticTakashi Sakamoto1-1/+1
It is preferable not to populate the constant array for constant strings on the stack. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230627235406.289970-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-28ALSA: oxfw: make read-only const array models staticColin Ian King1-1/+1
Don't populate the const array on the stack, instead make it static. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230627113253.700065-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-26Merge tag 'asoc-v6.5' of ↵Takashi Iwai439-3451/+19746
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.5 A fairly quiet release from a core and framework point of view, but a very big one from the point of view of new drivers: - More refectoring from Morimoto-san, this time mainly around DAI links and how we control the ordering of trigger() callbacks. - Convert a lot of drivers to use maple tree based caches. - Lots of work on the x86 driver stack. - Compressed audio support for Qualcomm. - Support for AMD SoundWire, Analog Devices SSM3515, Google Chameleon, Ingenic X1000, Intel systems with various CODECs, Longsoon platforms, Maxim MAX98388, Mediatek MT8188, Nuvoton NAU8825C, NXP platforms with NAU8822, Qualcomm WSA884x, StarFive JH7110, Texas Instruments TAS2781.
2023-06-26Merge branch 'for-next' into for-linusTakashi Iwai86-2927/+9323
Pull the 6.5-devel branch for upstreaming. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-26ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBookAndy Chi1-3/+3
On HP EliteBook 835/845/845W G10, the audio LEDs can be enabled by ALC285_FIXUP_HP_MUTE_LED. So use it accordingly. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Fixes: 3e10f6ca76c4 ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops") Link: https://lore.kernel.org/r/20230626130301.301712-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-26ASoC: amd: acp: fix for invalid dai id handling in acp_get_byte_count()Vijendar Mukunda1-3/+4
For invalid dai id, instead of returning -EINVAL return bytes count as zero in acp_get_byte_count() function. Fixes: 623621a9f9e1 ("ASoC: amd: Add common framework to support I2S on ACP SOC") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: amd: ps: fix byte count return value for invalid SoundWire manager ↵Vijendar Mukunda1-1/+2
instance acp_get_byte_count() function should return zero bytes instead of -EINVAL for invalid SoundWire manager instance. Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: amd: ps: add comments for DMA register mappingVijendar Mukunda1-0/+11
Add comments for DMA register mapping for both the SoundWire manager instances. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: amd: ps: fix for position register set for AUDIO0 RX streamVijendar Mukunda1-1/+1
For AUDIO0 RX stream, AUDIO0_RX position registers should be used. DMA error is reported due to referring wrong position register set for AUDIO0 RX stream. Correct the position register set for AUDIO0 RX stream. Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: amd: ps: add fix for dma irq mask for rx streams for SDW0 instanceVijendar Mukunda1-1/+1
Correct the DMA irq mask macro to program DMA irq bits correctly for SDW0 instance rx streams. Fixes: 298d4f7b1765 ("ASoC: amd: ps: add support for SoundWire DMA interrupts") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: amd: ps: add comments for DMA irq bits mappingVijendar Mukunda1-0/+20
Add comments for DMA stream id and IRQ bit mapping in ACP_EXTERNAL_CNTL & ACP_EXTERNAL_CNTL1 registers for SDW0 and SDW1 manager instances. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230626105356.2580125-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-26ASoC: hdmi-codec: fix channel info for compressed formatsMatthias Reichl1-12/+24
According to CTA 861 the channel/speaker allocation info in the audio infoframe only applies to uncompressed (PCM) audio streams. The channel count info should indicate the number of channels in the transmitted audio, which usually won't match the number of channels used to transmit the compressed bitstream. Some devices (eg some Sony TVs) will refuse to decode compressed audio if these values are not set correctly. To fix this we can simply set the channel count to 0 (which means "refer to stream header") and set the channel/speaker allocation to 0 as well (which would mean stereo FL/FR for PCM, a safe value all sinks will support) when transmitting compressed audio. Signed-off-by: Matthias Reichl <hias@horus.com> Link: https://lore.kernel.org/r/20230624165232.5751-1-hias@horus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-25ASoC: hdmi-codec: fix channel info for compressed formatsMatthias Reichl1-12/+24
According to CTA 861 the channel/speaker allocation info in the audio infoframe only applies to uncompressed (PCM) audio streams. The channel count info should indicate the number of channels in the transmitted audio, which usually won't match the number of channels used to transmit the compressed bitstream. Some devices (eg some Sony TVs) will refuse to decode compressed audio if these values are not set correctly. To fix this we can simply set the channel count to 0 (which means "refer to stream header") and set the channel/speaker allocation to 0 as well (which would mean stereo FL/FR for PCM, a safe value all sinks will support) when transmitting compressed audio. Signed-off-by: Matthias Reichl <hias@horus.com> Link: https://lore.kernel.org/r/20230624165232.5751-1-hias@horus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-25ALSA: pcm: fix ELD constraints for (E)AC3, DTS(-HD) and MLP formatsMatthias Reichl1-3/+70
The SADs of compressed formats contain the channel and sample rate info of the audio data inside the compressed stream, but when building constraints we must use the rates and channels used to transport the compressed streams. eg 48kHz 6ch EAC3 needs to be transmitted as a 2ch 192kHz stream. This patch fixes the constraints for the common AC3 and DTS formats, the constraints for the less common MPEG, DSD etc formats are copied directly from the info in the SADs as before as I don't have the specs and equipment to test those. Signed-off-by: Matthias Reichl <hias@horus.com> Link: https://lore.kernel.org/r/20230624165216.5719-1-hias@horus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-24Add Renesas PMIC RAA215300 and built-in RTCMark Brown35-124/+178
Merge series from Biju Das <biju.das.jz@bp.renesas.com>: This patch series aims to add support for Renesas PMIC RAA215300 and built-in RTC found on this PMIC device. The details of PMIC can be found here[1]. Renesas PMIC RAA215300 exposes two separate i2c devices, one for the main device and another for rtc device.
2023-06-24ASoC: core: Always store of_node when getting DAI link componentMark Brown1-1/+2
The generic snd_soc_dai_get_dlc() contains a default translation function for DAI names which has factored out common code in a number of card drivers, resolving the dai_name and of_node either using a driver provided translation function or with a generic implementation. Unfortunately the of_node can't be set by the translation function since it currently doesn't have an interface to do that but snd_soc_dai_get_dlc() only initialises the of_node in the case where there is no translation function. This breaks the Meson support after conversion to use the generic helpers since the DPCM cards for it check which component of the SoC is connected to each link by checking the compatible for the component and the Meson components provide a custom operation so don't use the generic code. Fix this and potentially other cards by unconditionally storing the node in the dai_link_component, there shouldn't be a binding specific of_node selected since that's how we determine the translation function. Fixes: 2e1dbea1f8a3 ("ASoC: meson: use snd_soc_{of_}get_dlc()") Fixes: 3c8b5861850c ("ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()") Link: https://lore.kernel.org/r/Message-Id: <20230623-asoc-fix-meson-probe-v1-1-82b2c2ec5ca4@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23ASoC: tas2781: Fix error code in tas2781_load_calibration()Dan Carpenter1-0/+1
Return -EINVAL instead of success on this error path. Fixes: 915f5eadebd2 ("ASoC: tas2781: firmware lib") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/Message-Id: <729bb6b3-bc1d-4b3d-8b65-077a492c753c@moroto.mountain> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23ASoC: amd: update pm_runtime enable sequenceArun Gopal Kondaveeti5-6/+10
pm_runtime_allow() is not needed for ACP child platform devices. Replace pm_runtime_allow() with pm_runtime_mark_last_busy() & pm_runtime_set_active() in pm_runtime enable sequence for ACP child platform drivers. Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com> Link: https://lore.kernel.org/r/Message-Id: <20230623214150.4058721-1-arungopal.kondaveeti@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23Merge branch 'topic/midi20' into for-nextTakashi Iwai3-98/+43
Pull one more API update for UMP core. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-23ALSA: ump: Export MIDI1 / UMP conversion helpersTakashi Iwai3-98/+43
Yet more preliminary work for the upcoming USB gadget support. Now export the helpers to convert between legacy MIDI1 and UMP data for handling the MIDI 1.0 USB interface. The header file is moved to include/sound. The API functions are slightly changed, so that they can be used without the direct access to snd_ump object. The allocation is done in ump.c itself as it's a simple kcalloc(). Link: https://lore.kernel.org/r/20230623075530.10976-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-23ASoC: tas2781: fix Kconfig dependenciesArnd Bergmann1-0/+1
The new driver has two modules that both get enabled for build testing when all codecs are selected. The comlib part has an i2c dependency, so this remains disabled on builds without i2c, but then the other one fails to link: ERROR: modpost: "tasdevice_dev_bulk_write" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! ERROR: modpost: "tasdevice_dev_update_bits" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! ERROR: modpost: "tasdevice_dev_bulk_read" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! ERROR: modpost: "tasdevice_dev_read" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! ERROR: modpost: "tasdevice_dev_write" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! There are many ways to address this, adding an explicit dependency seems to be the clearest method that keeps the structure of the driver otherwise unchanged. Fixes: ef3bcde75d06d ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/Message-Id: <20230622101205.3180938-1-arnd@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23ASoC: amd: acp: remove acp poweroff functionSyed Saba Kareem2-42/+0
BIOS invokes ACP Power off sequence based on ACP device state. Remove redundant code from ACP PCI driver for ACP Power off sequence. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/Message-Id: <20230622152406.3709231-4-Syed.SabaKareem@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23ASoC: amd: acp: clear pdm dma interrupt maskSyed Saba Kareem1-1/+1
Clear pdm dma interrupt mask in acp_dmic_shutdown(). 'Fixes: c32bd332ce5c9 ("ASoC: amd: acp: Add generic support for PDM controller on ACP")' Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/Message-Id: <20230622152406.3709231-1-Syed.SabaKareem@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-23ASoC: codecs: max98090: Allow dsp_a modeMaxim Kochetkov2-26/+30
TDM mode for max98090 is dsp_a compatible with such limitations: 1) Up to four timeslots supported. 2) Only 16 bits timeslots supported. 3) Only 2 active timeslots (L/R) supported. We want to setup TDM mode only when dsp_a mode is selected. So move M98090_REG_TDM_FORMAT/M98090_REG_TDM_CONTROL registers setup from max98090_set_tdm_slot() to the max98090_dai_set_fmt(). Also extend max98090_set_tdm_slot() with all TDM limitations check. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Link: https://lore.kernel.org/r/Message-Id: <20230622142038.63388-1-fido_max@inbox.ru> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22ASoC: qcom: common: add default jack dapm pinsSrinivas Kandagatla1-0/+10
If the soundcard does not specify the dapm pins, let the common code add these pins for jack. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/Message-Id: <20230302120327.10823-1-srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22ASoC: loongson: fix address space confusionArnd Bergmann1-2/+2
The i2s driver uses the mapped __iomem address of the FIFO as the DMA address for the device. This apparently works on loongarch because of the way it handles __iomem pointers as aliases of physical addresses, but this is not portable to other architectures and causes a compiler warning when dma addresses are not the same size as pointers: sound/soc/loongson/loongson_i2s_pci.c: In function 'loongson_i2s_pci_probe': sound/soc/loongson/loongson_i2s_pci.c:110:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 110 | tx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_TX_DATA; | ^ sound/soc/loongson/loongson_i2s_pci.c:113:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 113 | rx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_RX_DATA; | ^ Change the driver to instead use the physical address as stored in the PCI BAR resource directly. Since 'dev_addr' is a 32-bit address, I think this results in the same truncated address on loongarch but is otherwise closer to portable code and avoids the warning. Fixes: d84881e06836d ("ASoC: Add support for Loongson I2S controller") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/Message-Id: <20230622101235.3230941-1-arnd@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22ASoC: tegra: Remove stale comments in AHUBSameer Pujar1-10/+0
Remove stale comments in AHUB driver which is related to DAPM widgets and routes. This is misleading otherwise. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/Message-Id: <1687433656-7892-7-git-send-email-spujar@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22ASoC: tegra: Use normal system sleep for ASRCSameer Pujar1-2/+2
Align with other AHUB module drivers and use normal system sleep for ASRC as well. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/Message-Id: <1687433656-7892-6-git-send-email-spujar@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audioMatthew Anderson1-0/+46
This requires a patched ACPI table or a firmware from ASUS to work because the system does not come with the _DSD field for the CSC3551. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217550 Signed-off-by: Matthew Anderson <ruinairas1992@gmail.com> Tested-by: Philip Mueller <philm@manjaro.org> Link: https://lore.kernel.org/r/20230621161714.9442-1-ruinairas1992@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-21Merge tag 'asoc-fix-v6.4-rc7' of ↵Takashi Iwai1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for v6.4 A fix for a typoed iterator in the Intel Soundwire driver, fairly simple on inspection though not reviewed by Intel.
2023-06-21ASoC: fsl-asoc-card: Allow passing the number of slots in useFabio Estevam1-1/+7
Currently, fsl-asoc-card supports passing the width of the TDM slot, but not the number of slots in use, as it harcodes it as two slots. Add support for passing the number of slots in use. Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20230616203913.551183-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21ASoC: codecs: wsa884x: Add WSA884x family of speakersKrzysztof Kozlowski3-0/+1948
Add drivers for Qualcomm WSA8840/WSA8845/WSA8845H smart speaker amplifiers. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230616115751.392886-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21ASoC: Intel: sof_rt5682: Add mtl support RT1019P speakerMac Chiang2-0/+35
This patch support below hardware configuration: SSP2: 10EC5682/RTL5682 codec SSP0: RTL1019 amplifier Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com> Link: https://lore.kernel.org/r/20230616063617.25900-2-mac.chiang@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-21ASoC: Intel: sof_rt5682: reorder quirk tableTerry Cheong1-26/+26
Reorder the entries in quirk table to group entries with same platform. Signed-off-by: Terry Cheong <htcheong@chromium.org> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Link: https://lore.kernel.org/r/20230616063617.25900-1-mac.chiang@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>