summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0AF3 productGongjun Song1-0/+10
This product supports SoundWire capture from local microphones and two SoundWire amplifiers(no headset codec). Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: mediatek: mt8173-rt5650: Rename Speaker control to Ext SpkAngeloGioacchino Del Regno1-4/+4
Some RT5645 and RT5650 powered platforms are using "Ext Spk" instead of "Speaker", and this is also reflected in alsa-lib configurations for the generic RT5645 usecase manager configs. Rename the "Speaker" control to "Ext Spk" in order to be able to make the userspace reuse/inherit the same configurations also for this machine, along with the others. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20211105152013.75252-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: DAPM: Cover regression by kctl change notification fixTakashi Iwai1-6/+23
The recent fix for DAPM to correct the kctl change notification by the commit 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change notifications") caused other regressions since it changed the behavior of snd_soc_dapm_set_pin() that is called from several API functions. Formerly it returned always 0 for success, but now it returns 0 or 1. This patch addresses it, restoring the old behavior of snd_soc_dapm_set_pin() while keeping the fix in snd_soc_dapm_put_pin_switch(). Fixes: 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change notifications") Reported-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20211105090925.20575-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: SOF: Intel: hda: fix hotplug when only codec is suspendedKai Vehmanen3-2/+34
If codec is in runtime suspend, but controller is not, hotplug events are missed as the codec has no way to alert the controller. Problem does not occur if both controller and codec are active, or when both are suspended. An easy way to reproduce is to play an audio stream on one codec (e.g. to HDMI/DP display codec), wait for other HDA codec to go to runtime suspend, and then plug in a headset to the suspended codec. The jack event is not reported correctly in this case. Another way to reproduce is to force controller to stay active with "snd_sof_pci.sof_pci_debug=0x1" Fix the issue by reconfiguring the WAKEEN register when powering up/down individual links, and handling control events in the interrupt handler. Fixes: 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management") Reported-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211105111655.668777-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ALSA: timer: Unconditionally unlink slave instances, tooTakashi Iwai1-7/+6
Like the previous fix (commit c0317c0e8709 "ALSA: timer: Fix use-after-free problem"), we have to unlink slave timer instances immediately at snd_timer_stop(), too. Otherwise it may leave a stale entry in the list if the slave instance is freed before actually running. Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211105091517.21733-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-05ALSA: memalloc: Catch call with NULL snd_dma_buffer pointerTakashi Iwai1-0/+2
Although we've covered all calls with NULL dma buffer pointer, so far, there may be still some else in the wild. For catching such a case more easily, add a WARN_ON_ONCE() in snd_dma_get_ops(). Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers") Link: https://lore.kernel.org/r/20211105102103.28148-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-04Revert "ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type"Takashi Iwai3-47/+206
This reverts commit 2d9ea39917a4e4293bc2caea902c7059a330b611. We've got a regression report showing that the audio got broken the device over AMD IOMMU. The conversion assumed the wrong pointer / page mapping for the indirect mapping case, and we need to correct this urgently, so let's revert it for now. Fixes: 2d9ea39917a4 ("ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type") Reported-and-tested-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> Link: https://lore.kernel.org/r/20211104180846.16340-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-04ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54NJaroslav Kysela1-0/+1
Another model requires ALC255_FIXUP_ACER_MIC_NO_PRESENCE fixup. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211853 Signed-off-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211104155726.2090997-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-04Merge tag 'tty-5.16-rc1' of ↵Linus Torvalds2-4/+2
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the big set of tty and serial driver updates for 5.16-rc1. Nothing major in here at all, just lots of tiny serial and tty driver updates for various reported things, and some good cleanups. These include: - more good tty api cleanups from Jiri - stm32 serial driver updates - softlockup fix for non-preempt systems under high serial load - rpmsg serial driver update - 8250 drivers updates and fixes - n_gsm line discipline fixes and updates as people are finally starting to use it. All of these have been in linux-next for a while now with no reported issues" * tag 'tty-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (86 commits) tty: Fix extra "not" in TTY_DRIVER_REAL_RAW description serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE tty: rpmsg: Define tty name via constant string literal tty: rpmsg: Add pr_fmt() to prefix messages tty: rpmsg: Use dev_err_probe() in ->probe() tty: rpmsg: Unify variable used to keep an error code tty: rpmsg: Assign returned id to a local variable serial: stm32: push DMA RX data before suspending serial: stm32: terminate / restart DMA transfer at suspend / resume serial: stm32: rework RX dma initialization and release serial: 8250_pci: Remove empty stub pci_quatech_exit() serial: 8250_pci: Replace custom pci_match_id() implementation serial: xilinx_uartps: Fix race condition causing stuck TX serial: sunzilog: Mark sunzilog_putchar() __maybe_unused Revert "tty: hvc: pass DMA capable memory to put_chars()" Revert "virtio-console: remove unnecessary kmemdup()" serial: 8250_pci: Replace dev_*() by pci_*() macros serial: 8250_pci: Get rid of redundant 'else' keyword serial: 8250_pci: Refactor the loop in pci_ite887x_init() tty: add rpmsg driver ...
2021-11-04ALSA: firewire-motu: add support for MOTU Traveler mk3Takashi Sakamoto3-3/+21
Mark of the Unicorn (MOTU) shipped Traveler mk3 as one of models in third generation of its FireWire series, and discontinued it already. The model consists of below ICs: * Texas Instruments TSB41AB2 * Phillips Semiconductors PDI1394L40 * Altera cyclone EP1C3 * Texas Instruments TMS320VC5402 It supports sampling transfer frequency up to 192.0 kHz. The packet format differs depending on both of current sampling transfer frequency and whether to enable ADAT channels in rx/tx packets. The model supports transmission of PCM frames as well as MIDI messages. The model supports command mechanism to configure internal DSP. Hardware meter information is available in the first 2 chunks of each data block of tx packet. This commit adds support for it. $ cd linux-firewire-tools/src $ python crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 0410af0a bus_info_length 4, crc_length 16, crc 44810 404 31333934 bus_name "1394" 408 20ff7000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256) 40c 0001f200 company_id 0001f2 | 410 00090911 device_id 0000090911 | EUI-64 0001f20000090911 root directory ----------------------------------------------------------------- 414 0004ef04 directory_length 4, crc 61188 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 d1000002 --> unit directory at 428 424 8d000005 --> eui-64 leaf at 438 unit directory at 428 ----------------------------------------------------------------- 428 00031733 directory_length 3, crc 5939 42c 120001f2 specifier id 430 1300001b version 434 17102800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 00028484 leaf_length 2, crc 33924 43c 0001f200 company_id 0001f2 | 440 00090911 device_id 0000090911 | EUI-64 0001f20000090911 Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211104110627.94469-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-04ASoC: SOF:control: Fix variable type in snd_sof_refresh_control()Peter Ujfalusi1-4/+4
The second parameter for snd_sof_ipc_set_get_comp_data() is ipc_cmd, not ipc_ctrl_type and the type is u32. Fixes: 756bbe4205bc6 ("ASoC: SOF: Handle control change notification from firmware") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Acked-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211103082710.17165-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-03Merge tag 'drivers-5.16' of ↵Linus Torvalds1-6/+6
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "These are all the driver updates for SoC specific drivers. There are a couple of subsystems with individual maintainers picking up their patches here: - The reset controller subsystem add support for a few new SoC variants to existing drivers, along with other minor improvements - The OP-TEE subsystem gets a driver for the ARM FF-A transport - The memory controller subsystem has improvements for Tegra, Mediatek, Renesas, Freescale and Broadcom specific drivers. - The tegra cpuidle driver changes get merged through this tree this time. There are only minor changes, but they depend on other tegra driver updates here. - The ep93xx platform finally moves to using the drivers/clk/ subsystem, moving the code out of arch/arm in the process. This depends on a small sound driver change that is included here as well. - There are some minor updates for Qualcomm and Tegra specific firmware drivers. The other driver updates are mainly for drivers/soc, which contains a mixture of vendor specific drivers that don't really fit elsewhere: - Mediatek drivers gain more support for MT8192, with new support for hw-mutex and mmsys routing, plus support for reset lines in the mmsys driver. - Qualcomm gains a new "sleep stats" driver, and support for the "Generic Packet Router" in the APR driver. - There is a new user interface for routing the UARTS on ASpeed BMCs, something that apparently nobody else has needed so far. - More drivers can now be built as loadable modules, in particular for Broadcom and Samsung platforms. - Lots of improvements to the TI sysc driver for better suspend/resume support" Finally, there are lots of minor cleanups and new device IDs for amlogic, renesas, tegra, qualcomm, mediateka, samsung, imx, layerscape, allwinner, broadcom, and omap" * tag 'drivers-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (179 commits) optee: Fix spelling mistake "reclain" -> "reclaim" Revert "firmware: qcom: scm: Add support for MC boot address API" qcom: spm: allow compile-testing firmware: arm_ffa: Remove unused 'compat_version' variable soc: samsung: exynos-chipid: add exynosautov9 SoC support firmware: qcom: scm: Don't break compile test on non-ARM platforms soc: qcom: smp2p: Add of_node_put() before goto soc: qcom: apr: Add of_node_put() before return soc: qcom: qcom_stats: Fix client votes offset soc: qcom: rpmhpd: fix sm8350_mxc's peer domain dt-bindings: arm: cpus: Document qcom,msm8916-smp enable-method ARM: qcom: Add qcom,msm8916-smp enable-method identical to MSM8226 firmware: qcom: scm: Add support for MC boot address API soc: qcom: spm: Add 8916 SPM register data dt-bindings: soc: qcom: spm: Document qcom,msm8916-saw2-v3.0-cpu soc: qcom: socinfo: Add PM8150C and SMB2351 models firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available() soc: aspeed: Add UART routing support soc: fsl: dpio: rename the enqueue descriptor variable soc: fsl: dpio: use an explicit NULL instead of 0 ...
2021-11-03ALSA: hda/realtek: Headset fixup for Clevo NH77HJQJeremy Soller1-0/+14
On Clevo NH77HJ, NH77HP, and their 15" variants, there is a headset microphone input attached to 0x19 that does not have a jack detect. In order to get it working, the pin configuration needs to be set correctly, and a new ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE fixup is applied. This is similar to the existing System76 quirk for ALC293, but for ALC256. Signed-off-by: Jeremy Soller <jeremy@system76.com> Signed-off-by: Tim Crawford <tcrawford@system76.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211102172104.10610-1-tcrawford@system76.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-03ALSA: timer: Fix use-after-free problemWang Wensheng1-2/+2
When the timer instance was add into ack_list but was not currently in process, the user could stop it via snd_timer_stop1() without delete it from the ack_list. Then the user could free the timer instance and when it was actually processed UAF occurred. This issue could be reproduced via testcase snd_timer01 in ltp - running several instances of that testcase at the same time. What I actually met was that the ack_list of the timer broken and the kernel went into deadloop with irqoff. That could be detected by hardlockup detector on board or when we run it on qemu, we could use gdb to dump the ack_list when the console has no response. To fix this issue, we delete the timer instance from ack_list and active_list unconditionally in snd_timer_stop1(). Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com> Suggested-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211103033517.80531-1-wangwensheng4@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-03Merge tag 'sound-5.16-rc1' of ↵Linus Torvalds391-7387/+41478
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Lots of code development have been see in ASoC side as usual, while the continued development on memalloc helper and USB-audio low- latency support are found in the rest. Note that a few changes in the unusual places like arch/sh are included, which are a part of ASoC DAI format cleanups. ALSA core: - Continued memalloc helper updates and cleanups, now supporting non-coherent and non-contiguous pages - Fixes for races in mixer OSS layer ASoC: - A new version of the audio graph card which supports a wider range of systems - Several conversions to YAML DT bindings - Continuing cleanups to the SOF and Intel code - Move of the Cirrus DSP framework into drivers/firmware to allow for future use by non-audio DSPs - An overhaul of the cs42l42 driver, correcting many problems - DAI format terminology conversions over many drivers for cleanups - Support for AMD Vangogh and Yelow Cap, Cirrus CS35L41, Maxim MAX98520 and MAX98360A, Mediatek MT8195, Nuvoton NAU8821, nVidia Tegra210, NXP i.MX8ULP, Qualcomm AudioReach, Realtek ALC5682I-VS, RT5682S, and RT9120 and Rockchip RV1126 and RK3568 USB-audio: - Continued improvements on low-latency playback - Quirks for Pioneer devices, Line6 HX-Stomp XL, Audient iD14 HD-audio: - Reduce excessive udelay() calls on Intel platforms; this should reduce the CPU load with PulseAudio - Quirks for HP and Clevo laptops FireWire: - Support for meter information on MOTU" * tag 'sound-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (513 commits) ALSA: usb-audio: Add quirk for Audient iD14 ALSA: hda/realtek: Add quirk for Clevo PC70HS ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirk ALSA: usb-audio: Add registration quirk for JBL Quantum 400 ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()' ASoC: tlv320aic3x: Make aic3x_remove() return void ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s ASoC: Intel: sof_rt5682: detect codec variant in probe function ASoC: soc-acpi: add comp_ids field for machine driver matching ASoC: mediatek: mt8195: add mt8195-mt6359-rt1011-rt5682 bindings document ASoC: mediatek: mt8195: add machine driver with mt6359, rt1011 and rt5682 ASoC: Stop dummy from overriding hwparams ASoC: topology: Change topology device to card device ASoC: topology: Use correct device for prints ASoC: topology: Check for dapm widget completeness ASoC: topology: Add header payload_size verification ASoC: core: Remove invalid snd_soc_component_set_jack call ...
2021-11-02Merge tag 'platform-drivers-x86-v5.16-1' of ↵Linus Torvalds1-48/+3
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: "Highlights: - AMD-PMC S0ix support fixes and improvements - HP-WMI support for Omen laptops - New nvidia-wmi-ec-backlight driver - New Intel ISH ECLITE driver - WMI core cleanups - Support for various new Melanox platforms - System76 Laptop support improvements - Surface Laptop Studio support and initial Surface Pro 8 support - Various other small fixes and hardware-id additions" * tag 'platform-drivers-x86-v5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (106 commits) platform/x86: system76_acpi: Fix input device error handling platform/x86: touchscreen_dmi: Add info for the Viglen Connect 10 tablet platform/surface: aggregator_registry: Add initial support for Surface Pro 8 platform/x86: mlx-platform: Add support for new system SGN2410 platform/x86: mlx-platform: Add BIOS attributes for CoffeeLake COMEx based systems platform/x86: mlx-platform: Extend FAN and LED configuration to support new MQM97xx systems platform/x86: asus-wmi: rename platform_profile_* function symbols platform/x86: hp-wmi: rename platform_profile_* function symbols platform/x86: amd-pmc: Drop check for valid alarm time platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE platform/x86: system76_acpi: fix Kconfig dependencies platform/x86: barco-p50-gpio: use KEY_VENDOR for button instead of KEY_RESTART platform/x86: sony-laptop: replace snprintf in show functions with sysfs_emit platform/x86: lg-laptop: replace snprintf in show functions with sysfs_emit docs: ABI: fix documentation warning in sysfs-driver-mlxreg-io platform/x86: wmi: change notification handler type HID: surface-hid: Allow driver matching for target ID 1 devices HID: surface-hid: Use correct event registry for managing HID events platform/surface: aggregator_registry: Add support for Surface Laptop Studio ...
2021-11-02ALSA: usb-audio: Add quirk for Audient iD14Takashi Iwai1-0/+2
Audient iD14 (2708:0002) may get a control message error that interferes the operation e.g. with alsactl. Add the quirk to ignore such errors like other devices. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1191247 Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211102161859.19301-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-02ASoC: cs35l41: Change monitor widgets to siggensCharles Keepax1-7/+7
Currently the internal monitor sources are input widgets, which means if the card is set to fully routed these will not enable unless connected to something in the machine driver. However, all these are internal monitor signals so it makes no sense to connect them to something in the machine driver. As such switch them to siggen widgets which will have the same behaviour except not require external linkage on a fully routed card. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211029214028.401284-1-drhodes@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-02ALSA: hda/realtek: Add quirk for Clevo PC70HSTim Crawford1-0/+1
Apply the PB51ED PCI quirk to the Clevo PC70HS. Fixes audio output from the internal speakers. Signed-off-by: Tim Crawford <tcrawford@system76.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211101162134.5336-1-tcrawford@system76.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-01Merge tag 'asoc-v5.16' of ↵Takashi Iwai341-6924/+39817
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.16 This is an unusually large set of updates, mostly a large crop of unusually big drivers coupled with extensive overhauls of existing code. There's a SH change here for the DAI format terminology, the change is straightforward and the SH maintainers don't seem very active. - A new version of the audio graph card which supports a wider range of systems. - Move of the Cirrus DSP framework into drivers/firmware to allow for future use by non-audio DSPs. - Several conversions to YAML DT bindings. - Continuing cleanups to the SOF and Intel code. - A very big overhaul of the cs42l42 driver, correcting many problems. - Support for AMD Vangogh and Yelow Cap, Cirrus CS35L41, Maxim MAX98520 and MAX98360A, Mediatek MT8195, Nuvoton NAU8821, nVidia Tegra210, NXP i.MX8ULP, Qualcomm AudioReach, Realtek ALC5682I-VS, RT5682S, and RT9120 and Rockchip RV1126 and RK3568
2021-11-01ALSA: usb-audio: Line6 HX-Stomp XL USB_ID for 48k-fixed quirkJason Ormes1-0/+1
Adding the Line6 HX-Stomp XL USB_ID as it needs this fixed frequency quirk as well. The device is basically just the HX-Stomp with some more buttons on the face. I've done some recording with it after adding it, and it seems to function properly with this fix. The Midi features appear to be working as well. [ a coding style fix and patch reformat by tiwai ] Signed-off-by: Jason Ormes <skryking@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211030200405.1358678-1-skryking@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-01ALSA: usb-audio: Add registration quirk for JBL Quantum 400Alexander Tsoy1-0/+1
Add another device ID for JBL Quantum 400. It requires the same quirk as other JBL Quantum devices. Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211030174308.1011825-1-alexander@tsoy.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-11-01Merge branch 'for-next' into for-linusTakashi Iwai48-452/+1606
Merge 5.16-devel branch for upstreaming Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-10-29Merge series "Multiple headphone codec driver support" from Brent Lu ↵Mark Brown12-170/+116
<brent.lu@intel.com>: Support multiple headphone drivers in same machine driver. In this case, both rt5682 and rt5682s are supported and enumerated by different ACPI HID "10EC5682" and "RTL5682". V2 Changes: - remove useless 'NULL', 'false' in if-condition - can use 'comp_ids' field alone to enumerate driver - add comma to the end of entry in structure initialization - keep the table of byt/cht/cml/icl untouched V3 Changes: - upstreamd from SOF github, PR#3200 - use new compatiable IDs to shrink the enumerate table of BYT and CHT - add 'const' to snd_soc_acpi_codecs structures V4 Changes: - add signoff to patch 4~6 V5 Changes: - none, just rebase for patch 3 conflict Brent Lu (3): ASoC: soc-acpi: add comp_ids field for machine driver matching ASoC: Intel: sof_rt5682: detect codec variant in probe function ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s Pierre-Louis Bossart (3): ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs include/sound/soc-acpi.h | 3 + sound/soc/intel/boards/sof_rt5682.c | 34 ++------- .../intel/common/soc-acpi-intel-adl-match.c | 11 ++- .../intel/common/soc-acpi-intel-bxt-match.c | 2 +- .../intel/common/soc-acpi-intel-byt-match.c | 68 +++++++----------- .../intel/common/soc-acpi-intel-cht-match.c | 69 +++++++------------ .../intel/common/soc-acpi-intel-cml-match.c | 8 +-- .../intel/common/soc-acpi-intel-glk-match.c | 2 +- .../intel/common/soc-acpi-intel-jsl-match.c | 43 ++++-------- .../intel/common/soc-acpi-intel-kbl-match.c | 12 ++-- .../intel/common/soc-acpi-intel-skl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 11 ++- sound/soc/soc-acpi.c | 24 ++++++- 13 files changed, 119 insertions(+), 170 deletions(-) -- 2.25.1
2021-10-29Merge series "ASoC: Sanity checks and soc-topology updates" from Cezary ↵Mark Brown3-7/+43
Rojewski <cezary.rojewski@intel.com>: Couple of soc-topology related changes and a use-after-free fix. Said fix and two sanity checks for soc-topology lead the way. While the use-after-free is quite obvious, the sanity checks are here to cover for cases where user malformed the topology file -or- access to filesystem somehow got interrupted during copy operation. We shouldn't be reading outside the file boundary. Afterward a change to soc_tplg_add_kcontrol(): device being passed to soc_tplg_add_dcontrol() from comp->dev to tplg->dev which corrects dev_xxx() invoked later on. Also, device used for topology memory allocations from component->dev to component->card->dev so memory gets freed each time card device (usually platform device) is removed rather than the component device what may happen less frequently. Dummy component gets smarter and no longer overrides hw_params if there are other components accociated with related struct snd_soc_pcm_runtime instance. Amadeusz Sławiński (5): ASoC: core: Remove invalid snd_soc_component_set_jack call ASoC: topology: Check for dapm widget completeness ASoC: topology: Use correct device for prints ASoC: topology: Change topology device to card device ASoC: Stop dummy from overriding hwparams Cezary Rojewski (1): ASoC: topology: Add header payload_size verification sound/soc/soc-core.c | 3 --- sound/soc/soc-topology.c | 34 ++++++++++++++++++++++++++++++---- sound/soc/soc-utils.c | 13 +++++++++++++ 3 files changed, 43 insertions(+), 7 deletions(-) -- 2.25.1
2021-10-29ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()'Christophe JAILLET1-0/+1
If we return before the end of the 'for_each_child_of_node()' iterator, the reference taken on 'np' must be released. Add the missing 'of_node_put()' call. Fixes: c413983eb66a ("ASoC: rsnd: adjust disabled module") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/4c0e893cbfa21dc76c1ede0b6f4f8cff42209299.1634586167.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: tlv320aic3x: Make aic3x_remove() return voidUwe Kleine-König4-5/+8
Up to now aic3x_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211019074125.3812513-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecsPierre-Louis Bossart6-17/+17
'const' qualifiers are missing on some platforms, add as needed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-7-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDsPierre-Louis Bossart1-44/+25
We have multiple entries for the same codecs, use the new compatible IDs to have a single entry. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-6-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDsPierre-Louis Bossart1-44/+24
We have multiple entries for the same codecs, use the new compatible IDs to have a single entry. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-5-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682sBrent Lu4-63/+24
Use comp_ids field to enumerate rt5682/rt5682s headphone codec for JSL/TGL/ADL devices and remove redundant entries in tables. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-4-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: sof_rt5682: detect codec variant in probe functionBrent Lu1-0/+4
Detect whether the headphone codec is ALC5682I-VS or not in probe function so we don't need to duplicate all board configs for this new variant. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: soc-acpi: add comp_ids field for machine driver matchingBrent Lu1-2/+22
A machine driver needs to be enumerated by more than one ACPI HID if it supports second headphone driver (i.e. rt5682 and rt5682s). However, the id field in snd_soc_acpi_mach structure could contain only one HID. By adding a 'comp_ids' field which can contain several HIDs, we can enumerate a machine driver by multiple ACPI HIDs. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: mediatek: mt8195: add machine driver with mt6359, rt1011 and rt5682Trevor Wu3-0/+1171
This patch adds support for mt8195 board with mt6359, rt1011 and rt5682. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20211020071428.14297-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Stop dummy from overriding hwparamsAmadeusz Sławiński1-0/+13
In case that there are other components assigned to runtime device, depending on order dummy component can override their params with its own, which shouldn't happen. Check if there are any other components assigned to rtd and if so, skip setting hwparams. Occurs when using topology where 'snd-soc-dummy' gets assigned by default as codec and platform component. Alternative approach would be to copy whole dummy handling and rename it to "snd-soc-null" or something similar. And remove hwparams assignment to make it really do nothing. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: topology: Change topology device to card deviceAmadeusz Sławiński1-3/+3
Topology needs device for prints and resource allocation. So far, component->dev is used. However, this may lead to high memory use in model where card is an independent driver which can be reloaded and topology is loaded from component's probe() method. Every time machine driver is reloaded topology is being loaded anew, each time allocating new memory. Said memory will only be freed when component itself is being freed. Address the problem by tying topology to component->card->dev instead, so memory occupied by the topology is freed whenever related machine device gets removed. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: topology: Use correct device for printsAmadeusz Sławiński1-1/+1
soc_tplg_add_dcontrol() passes device as argument which is later used to print messages. Align it with all other prints in file to use tplg->dev. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: topology: Check for dapm widget completenessAmadeusz Sławiński1-0/+17
Add sanity checks to make sure the data is read within file boundary. Helps in situations where file is only partially copied or malformed. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: topology: Add header payload_size verificationCezary Rojewski1-0/+9
Add sanity check to make sure the data is read within file boundary. Helps in situations where file is only partially copied or malformed. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: core: Remove invalid snd_soc_component_set_jack callAmadeusz Sławiński1-3/+0
If snd_soc_component_set_jack() is called after snd_soc_component_remove() it may operate on memory which is freed in ->remove handler. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211015161257.27052-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: codecs: tfa989x: Add support for tfa9897 RCV bitVincent Knecht1-0/+21
TFA9897 has an internal 'rcv' switch so that it can manage both loudspeaker and earpiece modes with the same physical speaker. Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org> Link: https://lore.kernel.org/r/20211024085840.1536438-3-vincent.knecht@mailoo.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: amd: acp: select CONFIG_SND_SOC_ACPIArnd Bergmann1-0/+1
The acp-platform driver now needs the ACPI helpers: ld.lld: error: undefined symbol: snd_soc_acpi_find_machine >>> referenced by acp-platform.c >>> soc/amd/acp/acp-platform.o:(acp_machine_select) in archive sound/built-in.a ld.lld: error: undefined symbol: snd_soc_acpi_codec_list >>> referenced by acp-renoir.c >>> soc/amd/acp/acp-renoir.o:(snd_soc_acpi_amd_acp_machines) in archive sound/built-in.a Other drivers using this interface, select SND_SOC_ACPI, so do the same thing here. Fixes: e646b51f5dd5 ("ASoC: amd: acp: Add callback for machine driver on ACP") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20211029113714.966823-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29Merge series "ASoC: cs42l42: Fix definition and handling of jack switch ↵Mark Brown1-5/+4
invert" from Richard Fitzgerald <rf@opensource.cirrus.com>: Summary: The driver applied the opposite of the DT setting to the wrong register bit. The jack plug detect hardware in cs42l42 is somewhat confusing, compounded by an unclear description in the datasheet. This is most likely the reason that the driver implemented a DT property for the wrong register bit, that had the opposite effect of what was described in the binding. Changing the meaning of the property values isn't feasible; the driver dates from 2016 and the risk of breaking out-of-tree configs is too high (the property is also available to ACPI systems). So the fix is to make the binding doc match the actual behaviour and then fix the driver to apply it to the correct register bit. As a bonus, patch #3 converts the binding to yaml. Richard Fitzgerald (3): ASoC: dt-bindings: cs42l42: Correct description of ts-inv ASoC: cs42l42: Correct configuring of switch inversion from ts-inv ASoC: dt-bindings: cs42l42: Convert binding to yaml .../devicetree/bindings/sound/cirrus,cs42l42.yaml | 225 +++++++++++++++++++++ .../devicetree/bindings/sound/cs42l42.txt | 114 ----------- MAINTAINERS | 1 + sound/soc/codecs/cs42l42.c | 9 +- 4 files changed, 230 insertions(+), 119 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs42l42.yaml delete mode 100644 Documentation/devicetree/bindings/sound/cs42l42.txt -- 2.11.0
2021-10-29ASoC: Intel: glk_rt5682_max98357a: support ALC5682I-VS codecBrent Lu3-9/+52
Detect the codec variant in probe function and update DAI link accordingly. Also add an new entry in enumeration table for machine driver enumeration. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211028140909.496022-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_RT1015PJulian Braha1-4/+4
When SND_SOC_MT8192_MT6359_RT1015_RT5682, SND_SOC_MT8192_MT6359_RT1015_RT5682, SND_SOC_MT8183_DA7219_MAX98357A, or SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A is selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively: WARNING: unmet direct dependencies detected for SND_SOC_DMIC Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n] Selected by [y]: - SND_SOC_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] && MTK_PMIC_WRAP [=y] WARNING: unmet direct dependencies detected for SND_SOC_RT1015P Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n] Selected by [y]: - SND_SOC_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] && MTK_PMIC_WRAP [=y] WARNING: unmet direct dependencies detected for SND_SOC_RT1015P Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n] Selected by [y]: - SND_SOC_MT8183_DA7219_MAX98357A [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_MT8183 [=y] && I2C [=y] WARNING: unmet direct dependencies detected for SND_SOC_RT1015P Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n] Selected by [y]: - SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8183 [=y] This is because these config options select SND_SOC_RT1015P without selecting or depending on GPIOLIB, despite SND_SOC_RT1015P depending on GPIOLIB. These unmet dependency bugs were detected by Kismet, a static analysis tool for Kconfig. Please advise if this is not the appropriate solution. Signed-off-by: Julian Braha <julianbraha@gmail.com> Acked-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211029001225.27218-1-julianbraha@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: es8316: add support for ESSX8336 ACPI _HIDPierre-Louis Bossart1-0/+1
The same codec seems to have different personalities. ESSX8316 was used for Baytrail/CherryTrail, ESSX8336 seems to be used for AppoloLake, GeminiLake, JasperLake and TigerLake devices. BugLink: https://github.com/thesofproject/linux/issues/2955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>-e Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211029011109.23633-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: cs42l42: Correct configuring of switch inversion from ts-invRichard Fitzgerald1-5/+4
The setting from the cirrus,ts-inv property should be applied to the TIP_SENSE_INV bit, as this is the one that actually affects the jack detect block. The TS_INV bit only swaps the meaning of the PLUG and UNPLUG interrupts and should always be 1 for the interrupts to have the normal meaning. Due to some misunderstanding the driver had been implemented to configure the TS_INV bit based on the jack switch polarity. This made the interrupts behave the correct way around, but left the jack detect block, button detect and analogue circuits always interpreting an open switch as unplugged. The signal chain inside the codec is: SENSE pin -> TIP_SENSE_INV -> TS_INV -> (invert) -> interrupts | v Jack detect, button detect and analog control As the TIP_SENSE_INV already performs the necessary inversion the TS_INV bit never needs to change. It must always be 1 to yield the expected interrupt behaviour. Some extra confusion has arisen because of the additional invert in the interrupt path, meaning that a value applied to the TS_INV bit produces the opposite effect of applying it to the TIP_SENSE_INV bit. The ts-inv property has therefore always had the opposite effect to what might be expected (0 = inverted, 1 = not inverted). To maintain the meaning of the ts-inv property it must be inverted when applied to TIP_SENSE_INV. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/20211028140902.11786-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ALSA: firewire-motu: remove TODO for interaction with userspace about ↵Takashi Sakamoto1-2/+0
control message Now UAPI of ALSA firewire stack got enough functions to interact with userspace for protocol of MOTU FireWire series. Let's remove the relevant TODO. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211029012847.11839-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-10-28ALSA: oxfw: fix functional regression for Mackie Onyx 1640i in v5.14 or laterTakashi Sakamoto3-1/+19
A user reports functional regression for Mackie Onyx 1640i that the device generates slow sound with ALSA oxfw driver which supports media clock recovery. Although the device is based on OXFW971 ASIC, it does not transfer isochronous packet with own event frequency as expected. The device seems to adjust event frequency according to events in received isochronous packets in the beginning of packet streaming. This is unknown quirk. This commit fixes the regression to turn the recovery off in driver side. As a result, nominal frequency is used in duplex packet streaming between device and driver. For stability of sampling rate in events of transferred isochronous packet, 4,000 isochronous packets are skipped in the beginning of packet streaming. Reference: https://github.com/takaswie/snd-firewire-improve/issues/38 Fixes: 029ffc429440 ("ALSA: oxfw: perform sequence replay for media clock recovery") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211028130325.45772-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-10-28ASoC: qdsp6: audioreach: Fix clang -Wimplicit-fallthroughNathan Chancellor1-1/+1
Clang warns: sound/soc/qcom/qdsp6/topology.c:465:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ sound/soc/qcom/qdsp6/topology.c:465:3: note: insert 'break;' to avoid fall-through default: ^ break; 1 warning generated. Clang is a little more pedantic than GCC, which permits implicit fallthroughs to cases that contain just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to fix the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1495 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20211027190823.4057382-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>