summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2023-05-06Merge tag 'sound-fix-6.4-rc1' of ↵Linus Torvalds7-1013/+1072
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes for rc1. The only (LOC-wise) dominant change was ASoC Qualcomm fix, but most of it was merely a code shuffling. Another significant change here is for ALSA PCM core; it received a revert and a series of fixes for PCM auto-silencing where it caused a regression in the previous PR for rc1. Others are all small: ASoC Intel fixes, various quirks for ASoC AMD, HD-audio and USB-audio, the continued legacy emu10k1 code cleanup, and some documentation updates" * tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence() ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence() ALSA: pcm: playback silence - move silence variable updates to separate function ALSA: pcm: playback silence - remove extra code ALSA: pcm: fix playback silence - correct incremental silencing ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` ALSA: usb-audio: Add quirk for Pioneer DDJ-800 ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x ASoC: codecs: wcd938x: fix accessing regmap on unattached devices ALSA: docs: Fix code block indentation in ALSA driver example ALSA: docs: Extend module parameters description ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41 ALSA: emu10k1: use more existing defines instead of open-coded numbers ASoC: amd: yc: Add ASUS M3402RA into DMI table ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6 ...
2023-05-05Merge tag 'asoc-fix-v6.4-rc1' of ↵Takashi Iwai7-1013/+1072
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A small set of fixes and device quirks that have come in during the merge window, the Qualcomm fix seems quite large but it's mainly code motion so looks larger than it is.
2023-05-04ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tabletHans de Goede1-0/+26
The Nextbook Ares 8A tablet which has Android as factory OS, has a buggy DSDT with both ESSX8316 and 10EC5651 ACPI devices. This tablet actually uses an rt5651 codec, but the matching code ends up picking the ESSX8316 device, add a quirk to ignote the ESSX8316 device on this tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Message-Id: <20230429104721.7176-1-hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-04ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for ↵Andrey Rakhmatullin1-0/+7
acp6x This is needed (and enough) to get the internal mic visible and working. Signed-off-by: Andrey Rakhmatullin <wrar@wrar.name> Message-Id: <20230501185134.34591-1-wrar@wrar.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-04ASoC: codecs: wcd938x: fix accessing regmap on unattached devicesKrzysztof Kozlowski3-1011/+1030
The WCD938x comes with three devices on two Linux drivers: 1. RX Soundwire device (wcd938x-sdw.c driver), 2. TX Soundwire device, which is used to access devices via regmap (also wcd938x-sdw.c driver), 3. platform device (wcd938x.c driver) - glue and component master, actually having most of the code using TX Soundwire device regmap. When RX and TX Soundwire devices probe, the component master (platform device) bind tries to write micbias configuration via TX Soundwire regmap. This might happen before TX Soundwire enumerates, so the regmap access fails. On Qualcomm SM8550 board with WCD9385: qcom-soundwire 6d30000.soundwire-controller: Qualcomm Soundwire controller v2.0.0 Registered wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:4 (ops wcd938x_sdw_component_ops) wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:3 (ops wcd938x_sdw_component_ops) qcom-soundwire 6ad0000.soundwire-controller: swrm_wait_for_wr_fifo_avail err write overflow Fix the issue by: 1. Moving the regmap creation from platform device to TX Soundwire device. The regmap settings are moved as-is with one difference: making the wcd938x_regmap_config const. 2. Using regmap in cache only mode till the actual TX Soundwire device enumerates and then sync the regmap cache. Cc: <stable@vger.kernel.org> # v3.14+ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Message-Id: <20230503144102.242240-1-krzysztof.kozlowski@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-28Merge tag 'mm-nonmm-stable-2023-04-27-16-01' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "Mainly singleton patches all over the place. Series of note are: - updates to scripts/gdb from Glenn Washburn - kexec cleanups from Bjorn Helgaas" * tag 'mm-nonmm-stable-2023-04-27-16-01' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (50 commits) mailmap: add entries for Paul Mackerras libgcc: add forward declarations for generic library routines mailmap: add entry for Oleksandr ocfs2: reduce ioctl stack usage fs/proc: add Kthread flag to /proc/$pid/status ia64: fix an addr to taddr in huge_pte_offset() checkpatch: introduce proper bindings license check epoll: rename global epmutex scripts/gdb: add GDB convenience functions $lx_dentry_name() and $lx_i_dentry() scripts/gdb: create linux/vfs.py for VFS related GDB helpers uapi/linux/const.h: prefer ISO-friendly __typeof__ delayacct: track delays from IRQ/SOFTIRQ scripts/gdb: timerlist: convert int chunks to str scripts/gdb: print interrupts scripts/gdb: raise error with reduced debugging information scripts/gdb: add a Radix Tree Parser lib/rbtree: use '+' instead of '|' for setting color. proc/stat: remove arch_idle_time() checkpatch: check for misuse of the link tags checkpatch: allow Closes tags with links ...
2023-04-27ASoC: amd: yc: Add ASUS M3402RA into DMI tableEnrico Belleri1-0/+7
Fix builtin microphone on ASUS Vivobook S 14 OLED 2022 (M3402RA) Same issue with this model as apparently with other Rembrandt laptops: https://bugzilla.kernel.org/show_bug.cgi?id=216270 Signed-off-by: Enrico Belleri <kilgore.trout@idesmi.eu> Link: https://lore.kernel.org/r/20230427191645.24519-1-kilgore.trout@idesmi.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-27Merge tag 'sound-6.4-rc1' of ↵Linus Torvalds357-3606/+12288
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "At this time, it's an interesting mixture of changes for both old and new stuff. Majority of changes are about ASoC (lots of systematic changes for converting remove callbacks to void, and cleanups), while we got the fixes and the enhancements of very old PCI cards, too. Here are some highlights: ALSA/ASoC Core: - Continued effort of more ASoC core cleanups - Minor improvements for XRUN handling in indirect PCM helpers - Code refactoring of PCM core code ASoC: - Continued feature and simplification work on SOF, including addition of a no-DSP mode for bringup, HDA MLink and extensions to the IPC4 protocol - Hibernation support for CS35L45 - More DT binding conversions - Support for Cirrus Logic CS35L56, Freescale QMC, Maxim MAX98363, nVidia systems with MAX9809x and RT5631, Realtek RT712, Renesas R-Car Gen4, Rockchip RK3588 and TI TAS5733 ALSA: - Lots of works for legacy emu10k1 and ymfpci PCI drivers - PCM kselftest fixes and enhancements" * tag 'sound-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (586 commits) ALSA: emu10k1: use high-level I/O in set_filterQ() ALSA: emu10k1: use high-level I/O functions also during init ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put() ALSA: emu10k1: don't stop DSP in _snd_emu10k1_{,audigy_}init_efx() ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEP ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cards ALSA: emu10k1: fixup DSP defines ALSA: emu10k1: pull in some register definitions from kX-project ALSA: emu10k1: remove some bogus defines ALSA: emu10k1: eliminate some unused defines ALSA: emu10k1: fix lineup of EMU_HANA_* defines ALSA: emu10k1: comment updates ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards ALSA: emu10k1: remove unused emu->pcm_playback_efx_substream field ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init() ALSA: emu10k1: minor optimizations ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init() ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS reads ALSA: emu10k1: remove apparently pointless FPGA reads ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init() ...
2023-04-27Merge branch 'for-linus' into for-nextTakashi Iwai5-11/+24
Merge 6.3-devel branch back in order to apply the more Realtek HD-audio changes cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-24ASoC: Intel: soc-acpi-byt: Fix "WM510205" match no longer workingHans de Goede1-1/+1
Commit 7e1d728a94ca ("ASoC: Intel: soc-acpi-byt: Add new WM5102 ACPI HID") added an extra HID to wm5102_comp_ids.codecs, but it forgot to bump wm5102_comp_ids.num_codecs, causing the last codec HID in the codecs list to no longer work. Bump wm5102_comp_ids.num_codecs to fix this. Fixes: 7e1d728a94ca ("ASoC: Intel: soc-acpi-byt: Add new WM5102 ACPI HID") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230421183714.35186-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-24ASoC: max98090: make it selectableMaxim Kochetkov1-1/+1
There is no way to select max98090 from menuconfig right now. Add a Kconfig menu description to allow building the driver standalone. It will allow this codec to be used by any other I2S master without adding extra sound card entry in Kconfig. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Link: https://lore.kernel.org/r/20230421211950.20972-1-fido_max@inbox.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21ASoC: fsl: imx-audmix: remove dummy dai_link->platformKuninori Morimoto1-5/+2
Dummy dai_link->platform is not needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/877cu6f619.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21ASoC: fsl: imx-audmix: cleanup platform which is using Generic DMAKuninori Morimoto1-9/+12
If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/878remf61j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21ASoC: fsl: imx-spdif: cleanup platform which is using Generic DMAKuninori Morimoto1-4/+7
If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/87a5z2f61w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21ASoC: fsl: imx-es8328: cleanup platform which is using Generic DMAKuninori Morimoto1-4/+7
If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/87bkjif628.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: pcm/Intel: Pause-resume improvements forMark Brown5-18/+47
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Last minute patch for correct the pasue/resume operation with IPC4. The issues are hardto reproduce and needs extended stress testing to be hit, in which case the audio breaks due to DMA errors.
2023-04-20ASoC: SOF: add no_reply IPC callsMark Brown13-71/+51
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Simplify IPC messages to avoid passing a reply structure that is not used later.
2023-04-20ASoC: Intel: boards: updates for 6.4Mark Brown5-78/+152
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Preparation of ALC712 support with different types of SoundWire devices per link, new RaptorLake SoundWire device, better error handling for Cirrus devices and cosmetic changes for Max98373. Bard Liao (3): ASoC: Intel: sof_sdw: set codec_num = 1 if the device is not aggregated ASoC: Intel: sof_sdw: support different devices on the same sdw link ASoC: Intel: sof_sdw: append codec type to dai link name Curtis Malainey (1): ASoC: Intel: sof_cirrus_common: Guard against missing buses Yong Zhi (2): ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_info ASoC: Intel: sof_sdw_max98373: change sof_sdw_mx8373_late_probe to static call apoorv (1): ASoC: Intel: soc-acpi: Add entry for rt711-sdca-sdw at link 2 in RPL match table sound/soc/intel/boards/sof_cirrus_common.c | 7 +- sound/soc/intel/boards/sof_sdw.c | 181 ++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 3 - sound/soc/intel/boards/sof_sdw_max98373.c | 22 +-- .../intel/common/soc-acpi-intel-rpl-match.c | 17 +- 5 files changed, 152 insertions(+), 78 deletions(-) -- 2.37.2
2023-04-20ASoC: cs35l56: Remove duplicate mbox log messagesSimon Trimmer1-6/+2
cs35l56_mbox_send() logs a warning when sending a mbox command fails so the callers can be simplified. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230420102043.1151830-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: es8316: Don't use ranges based register lookup for a single registerMark Brown1-9/+10
The es8316 driver uses a register range to specify the single volatile register it has. While the cost will be in the noise this is a bunch of overhead compared to just having a volatile_reg() callback so switch to the callback. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230419-asoc-es8316-volatile-v1-1-2074ec93d8f1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: Intel: Split the set_power_op for IPC3 and IPC4Ranjani Sridharan8-25/+60
Suspending to S0iX with IPC3 requires the PM_GATE IPC to be sent again to stop the DMA trace. But with IPC4, this is not needed as the trace is stopped with the LARGE_CONFIG_SET IPC. Also, sending the MOD_D0IX IPC to set the D0I3 state again when the DSP is in D0I3 already results in an imbalance in PM runtime states in the firmware. So split the set_power_state ops for IPC3 and IPC4 to avoid sending the MOD_D0IX IPC when the DSP is already in D0I3 with IPC4. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230420104714.29573-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: pcm: Add an option to skip platform trigger during stopRanjani Sridharan4-17/+37
In the case of IPC4, a pipeline is only paused during STOP/PAUSE/SUSPEND triggers and the FW keeps the host DMA running when a pipeline is paused. The start/stop tests iterate through STOP/START triggers without involving a hw_free. This means that the pipeline state will only toggle between PAUSED (during the STOP trigger) and RUNNING (during the START trigger). So this test should be treated in the same way as a PAUSE_PUSH/PAUSE_RELEASE test and the DMA should be kept running when toggling the pipeline states between PAUSED and RUNNING. Since there is no way to tell if a STOP trigger will be followed by hw_free or not, this patch proposes to always skip DMA stop during the STOP trigger and handle it later during hw_free. Introduce a new flag in struct sof_ipc_pcm_ops, delayed_platform_trigger, that will be used to ensure that the host DMA will not be stopped during the STOP/PAUSE/RELEASE triggers and set it for IPC4. The platform_trigger call to stop the DMA will be invoked during PCM hw_free instead when the pipeline is reset. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230420114137.27613-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: Intel: hda: Do not stop/start DMA during pause/releaseRanjani Sridharan1-1/+10
The FW does not pause/stop the host DMA during pause and stopping the host DMA from the driver could result in an unknown behaviour. So, skip triggering the HD-Audio host DMA during pause/release. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230420114137.27613-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_sdw: append codec type to dai link nameBard Liao1-4/+37
The existing sdw_sof machine driver constructs two SoundWire interfaces by direction and sdw link id. It means that we will have exactly the same dai link name if two dai links are on the same sdw link with the same direction. The new Realtek codec has two SoundWire interfaces for jack and DMIC functions and they are treated as different codecs. To create two dai links for jack and DMIC, we need to have different dai link names. This patch suggests to append codec type if there are two or more different types of devices on the same sdw bus. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_sdw: support different devices on the same sdw linkBard Liao1-53/+77
The existing code assumes all devices on the same soundwire link are the same devices. eg. all rt1316. This commit removes the assumption and supports different devices on the same soundwire link. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_sdw: set codec_num = 1 if the device is not aggregatedBard Liao1-0/+1
We assume adr_link->num_adr = 1 if a device is not aggregated. However, the assumption is not valid if there are different type devices on the same soundwire link. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_sdw_max98373: change sof_sdw_mx8373_late_probe to static callYong Zhi2-13/+11
sof_sdw_mx8373_late_probe is only used in sof_sdw_max98373, so it should be static and rename it to 'mx8373_sdw_late_probe'. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_infoYong Zhi3-8/+6
Just use codec_card_late_probe ptr in struct sof_sdw_codec_info for validation check and drop late_probe variable. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: soc-acpi: Add entry for rt711-sdca-sdw at link 2 in RPL match tableapoorv1-1/+16
RT711 sdca sdw is added with SDW2 link for RPL-P CRB platform. Signed-off-by: apoorv <apoorv@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: Intel: sof_cirrus_common: Guard against missing busesCurtis Malainey1-1/+6
Even if we find a acpi device we can still be missing the physical node. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: Use no_reply calls for TXCurtis Malainey11-71/+37
Convert all existing calls that pass "NULL, 0" for reply data to the new no_reply calls. Also convert any calls that pass in data but don't actually parse the result. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20230419194057.42205-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-20ASoC: SOF: ipc: Add no reply inline callsCurtis Malainey2-0/+14
95% of the calls inside SOF to TX an IPC don't care about a reply. Yet the previous commit cleaned up a bunch of replies that were being populated and then thrown away. This adds some functions so users who do not need replies don't feel obligated to provide the space to the API. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20230419194057.42205-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-19ASoC: fsl: Restore configuration of platformShengjiu Wang2-5/+14
This reverts commit 33683cbf49b54 ("ASoC: fsl: remove unnecessary dai_link->platform"). dai_link->platform is needed. The platform component is "snd_dmaengine_pcm", which is registered from cpu driver, If dai_link->platform is not assigned, then platform component will not be probed, then there will be issue: aplay: main:831: audio open error: Invalid argument Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1681900158-17428-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-19ASoC: fsl: Simplify an error messageChristophe JAILLET1-1/+1
dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/c167c16a535049d56f817bbede9c9f6f0a0f4c68.1681626553.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-19ASoC: fsl_asrc_dma: fix potential null-ptr-derefNikita Zhandarovich1-3/+8
dma_request_slave_channel() may return NULL which will lead to NULL pointer dereference error in 'tmp_chan->private'. Correct this behaviour by, first, switching from deprecated function dma_request_slave_channel() to dma_request_chan(). Secondly, enable sanity check for the resuling value of dma_request_chan(). Also, fix description that follows the enacted changes and that concerns the use of dma_request_slave_channel(). Fixes: 706e2c881158 ("ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End") Co-developed-by: Natalia Petrova <n.petrova@fintech.ru> Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20230417133242.53339-1-n.zhandarovich@fintech.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-19ASoC: fsl_sai: Fix pins setting for i.MX8QM platformChancel Liu1-1/+1
SAI on i.MX8QM platform supports the data lines up to 4. So the pins setting should be corrected to 4. Fixes: eba0f0077519 ("ASoC: fsl_sai: Enable combine mode soft") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://lore.kernel.org/r/20230418094259.4150771-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: cs35l56: Updates for B0 siliconMark Brown2-59/+5
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These patches make some small changes to align with the B0 silicon revision.
2023-04-18ASoC: cs35l56: Rename mixer source defines for SoundWire DP1Richard Fitzgerald1-2/+2
Rename the mixer source defines from CS35L56_INPUT_SRC_SWIRE_RXn to CS35L56_INPUT_SRC_SWIRE_DP1_CHANNELn to match the latest datasheet. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230418144309.1100721-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: cs35l56: Remove SDW2RX1 mixer sourceRichard Fitzgerald1-2/+1
The mixer source index value for SDW2RX1 is different between A1 and B0 silicon. As the driver doesn't provide a DAI for SDW2 just remove it as a mixer source option. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230418144309.1100721-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: cs35l56: Remove SDW1 TX5 and TX6Richard Fitzgerald2-54/+1
Reduce SDW1 to 4 channels and remove the controls for SDW1 TX5 and TX6. The TX5 and TX6 channels have been removed from B0 silicon. There is no need to support them on A1 silicon. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230418144309.1100721-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: cs35l56: Update comment on masking of EINT20 interruptsRichard Fitzgerald1-1/+1
EINT20 contains wake-source interrupts and also interface-blocked interrupts, which all default to unmasked after reset or wake. The comment in cs35l56_init() only mentioned the wake interrupts. Update the comment so it's clear that it's intentional to also mask the *_BLOCKED interrupts. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230418144309.1100721-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: codecs: wcd938x: Simplify with dev_err_probeKrzysztof Kozlowski1-17/+10
Replace dev_err() in probe() path with dev_err_probe() to: 1. Make code a bit simpler and easier to read, 2. Do not print messages on deferred probe. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230418074630.8681-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: codecs: wcd934x: Simplify &pdev->dev in probeKrzysztof Kozlowski1-3/+3
The probe already stores pointer to &pdev->dev, so use it to make the code a bit easier to read. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230418074630.8681-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: codecs: wcd934x: Simplify with dev_err_probeKrzysztof Kozlowski1-12/+7
Replace dev_err() in probe() path with dev_err_probe() to: 1. Make code a bit simpler and easier to read, 2. Do not print messages on deferred probe. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230418074630.8681-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: nau8825: fix bounds check for adc_delayTom Rix1-1/+1
clang build reports sound/soc/codecs/nau8825.c:2826:31: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare] if (nau8825->adc_delay < 125 && nau8825->adc_delay > 500) ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a bug, a logical-or should have been used. Fixes: fc0b096c9291 ("ASoC: nau8825: Add delay control for input path") Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: David Lin <CTLIN0@nuvoton.com> Link: https://lore.kernel.org/r/20230418120955.3230705-1-trix@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-18ASoC: codecs: wcd9335: Simplify with dev_err_probeKrzysztof Kozlowski1-16/+11
Code can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230417141453.919158-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-17ASoC: cs35l56: Code improvementsMark Brown5-60/+38
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: Various code improvements. These remove redundant code and clean up less-than-optimal original implementations.
2023-04-17ASoC: fsl_mqs: move of_node_put() to the correct locationLiliang Ye1-10/+5
of_node_put() should have been done directly after mqs_priv->regmap = syscon_node_to_regmap(gpr_np); otherwise it creates a reference leak on the success path. To fix this, of_node_put() is moved to the correct location, and change all the gotos to direct returns. Fixes: a9d273671440 ("ASoC: fsl_mqs: Fix error handling in probe") Signed-off-by: Liliang Ye <yll@hust.edu.cn> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/20230403152647.17638-1-yll@hust.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-17ASoC: cleanup mutex lockMark Brown5-116/+100
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: ASoC is using many type of mutex lock, but some of them has helper function, but some doesn't. Or, it has helper function, but is static. This patch-set adds helper function and use it.
2023-04-17ASoC: add snd_soc_card_mutex_lock/unlock()Kuninori Morimoto2-11/+11
ASoC need to use card->mutex with _INIT or _RUNTIME, but there is no helper function for it. This patch adds its helper function and use it. Because people might misunderstand that _init() is mutex initialization, this patch renames _INIT to _ROOT and adds new snd_soc_card_mutex_lock_root() for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a5zlx3tw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>