aboutsummaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2023-09-08Merge tag 'sound-fix-6.6-rc1' of ↵Gravatar Linus Torvalds 21-61/+149
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes for 6.6-rc1. All small and easy ones. - The corrections of the previous PCM iov_iter transitions - Regression fixes in MIDI 2.0 / USB changes - Various ASoC codec fixes for Cirrus, Realtek, WCD - ASoC AMD quirks and ASoC Intel AVS driver workaround" * tag 'sound-fix-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits) ALSA: hda/realtek - ALC287 I2S speaker platform support ASoC: amd: yc: Fix a non-functional mic on Lenovo 82TL ASoC: Intel: avs: Provide support for fallback topology ALSA: seq: Fix snd_seq_expand_var_event() call to user-space ALSA: usb-audio: Fix potential memory leaks at error path for UMP open ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs. ASoC: rt5645: NULL pointer access when removing jack ASoC: amd: yc: Add DMI entries to support Victus by HP Gaming Laptop 15-fb0xxx (8A3E) MAINTAINERS: Update the MAINTAINERS enties for TEXAS INSTRUMENTS ASoC DRIVERS ALSA: sb: Fix wrong argument in commented code ALSA: pcm: Fix error checks of default read/write copy ops ASoC: Name iov_iter argument as iterator instead of buffer ASoC: dmaengine: Drop unused iov_iter for process callback ALSA: hda/tas2781: Use standard clamp() macro ASoC: cs35l56: Waiting for firmware to boot must be tolerant of I/O errors ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc ASoC: cs42l43: Fix missing error code in cs42l43_codec_probe() ASoC: cs35l45: Rename DACPCM1 Source control ASoC: cs35l45: Fix "Dead assigment" warning ASoC: cs35l45: Add support for Chip ID 0x35A460 ...
2023-09-07Merge tag 'asoc-fix-v6.6-merge-window' of ↵Gravatar Takashi Iwai 9-29/+88
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.6 A bunch of fixes and new IDs that came in since the initial pull request - all driver specific and nothing too exciting. There's a trivial conflict in the AMD driver ID table due to the last v6.5 fixes not having been merged up.
2023-09-07ALSA: hda/realtek - ALC287 I2S speaker platform supportGravatar Kailang Yang 1-0/+30
0x17 was only speaker pin, DAC assigned will be 0x03. Headphone assigned to 0x02. Playback via headphone will get EQ filter processing. So,it needs to swap DAC. Tested-by: Mark Pearson <mpearson@lenovo.com> Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/r/4e4cfa1b3b4c46838aecafc6e8b6f876@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-06ASoC: amd: yc: Fix a non-functional mic on Lenovo 82TLGravatar Mario Limonciello 1-0/+7
Lenovo 82TL has DMIC connected like 82V2 does. Also match 82TL. Reported-by: wildjim@kiwinet.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217063 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20230906182257.45736-1-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-05ASoC: Intel: avs: Provide support for fallback topologyGravatar Amadeusz Sławiński 1-0/+22
HDA and HDMI devices are simple enough that in case of user not having topology tailored to their device, they can use fallback topology. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230905093147.1960675-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-05ALSA: seq: Fix snd_seq_expand_var_event() call to user-spaceGravatar Takashi Iwai 1-2/+7
The recent fix to clear the padding bytes at snd_seq_expand_var_event() broke the read to user-space with in_kernel=0 parameter. For user-space address, it has to use clear_user() instead of memset(). Fixes: f80e6d60d677 ("ALSA: seq: Clear padded bytes at expanding events") Reported-and-tested-by: Ash Holland <ash@sorrel.sh> Closes: https://lore.kernel.org/r/8a555319-9f31-4ea2-878f-adc338bc40d4@sorrel.sh Link: https://lore.kernel.org/r/20230905052631.18240-1-tiwai@suse.de Link: https://lore.kernel.org/r/20230905081210.6731-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-05ALSA: usb-audio: Fix potential memory leaks at error path for UMP openGravatar Takashi Iwai 1-2/+5
The allocation and initialization errors at alloc_midi_urbs() that is called at MIDI 2.0 / UMP device are supposed to be handled at the caller side by invoking free_midi_urbs(). However, free_midi_urbs() loops only for ep->num_urbs entries, and since ep->num_entries wasn't updated yet at the allocation / init error in alloc_midi_urbs(), this entry won't be released. The intention of free_midi_urbs() is to release the whole elements, so change the loop size to NUM_URBS to scan over all elements for fixing the missed releases. Also, the call of free_midi_urbs() is missing at snd_usb_midi_v2_open(). Although it'll be released later at reopen/close or disconnection, it's better to release immediately at the error path. Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support") Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Closes: https://lore.kernel.org/r/fc275ed315b9157952dcf2744ee7bdb78defdb5f.1693746347.git.christophe.jaillet@wanadoo.fr Link: https://lore.kernel.org/r/20230905054511.20502-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-04Merge tag 'uml-for-linus-6.6-rc1' of ↵Gravatar Linus Torvalds 1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Richard Weinberger: - Drop 32-bit checksum implementation and re-use it from arch/x86 - String function cleanup - Fixes for -Wmissing-variable-declarations and -Wmissing-prototypes builds * tag 'uml-for-linus-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: virt-pci: fix missing declaration warning um: Refactor deprecated strncpy to memcpy um: fix 3 instances of -Wmissing-prototypes um: port_kern: fix -Wmissing-variable-declarations uml: audio: fix -Wmissing-variable-declarations um: vector: refactor deprecated strncpy um: use obj-y to descend into arch/um/*/ um: Hard-code the result of 'uname -s' um: Use the x86 checksum implementation on 32-bit asm-generic: current: Don't include thread-info.h if building asm um: Remove unsued extern declaration ldt_host_info() um: Fix hostaudio build errors um: Remove strlcpy usage
2023-09-04ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.Gravatar Vitaly Rodionov 2-1/+2
Recently in v6.3-rc1 there was a change affecting behaviour of hrtimers (commit 0c52310f260014d95c1310364379772cb74cf82d) and causing few issues on platforms with two CS42L42 codecs. Canonical/Dell has reported an issue with Vostro-3910. We need to increase this value by 15ms. Link: https://bugs.launchpad.net/somerville/+bug/2031060 Fixes: 9fb9fa18fb50 ("ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock.") Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230904160033.908135-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-04ASoC: rt5645: NULL pointer access when removing jackGravatar Brent Lu 1-6/+10
Machine driver calls snd_soc_component_set_jack() function with NULL jack and data parameters when removing jack in codec exit function. Do not access data when jack is NULL. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20230904104046.4150208-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-04ASoC: amd: yc: Add DMI entries to support Victus by HP Gaming Laptop ↵Gravatar Shubh 1-0/+7
15-fb0xxx (8A3E) This model requires an additional detection quirk to enable the internal microphone. Signed-off-by: Shubh <shubhisroking@gmail.com> Link: https://lore.kernel.org/r/20230902150807.133523-1-shubhisroking@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-02ALSA: sb: Fix wrong argument in commented codeGravatar Takashi Iwai 1-1/+1
While rewriting the code from sockptr_t to iov_iter during the development, I forgot to replace one place in emu8000-pcm code. As it's in the disabled area (with ifdef), it's never built and overlooked. Replace with the proper argument NULL. Fixes: 9d0fdc602de9 ("ALSA: emu8000: Convert to generic PCM copy ops") Reported-by: Al Viro <viro@zeniv.linux.org.uk> Closes: https://lore.kernel.org/r/20230902053646.GK3390869@ZenIV Link: https://lore.kernel.org/r/20230902061044.19366-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-02ALSA: pcm: Fix error checks of default read/write copy opsGravatar Takashi Iwai 1-4/+4
copy_from/to_iter() returns the actually copied bytes, and the more correct check should be to compare with the given bytes, instead of zero-check. Fixes: cf393babb37a ("ALSA: pcm: Add copy ops with iov_iter") Reported-by: Al Viro <viro@zeniv.linux.org.uk> Closes: https://lore.kernel.org/r/20230902053044.GJ3390869@ZenIV Link: https://lore.kernel.org/r/20230902061044.19366-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-01Merge tag 'tty-6.6-rc1' of ↵Gravatar Linus Torvalds 2-3/+3
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 changes for 6.6-rc1. Lots of cleanups in here this cycle, and some driver updates. Short summary is: - Jiri's continued work to make the tty code and apis be a bit more sane with regards to modern kernel coding style and types - cpm_uart driver updates - n_gsm updates and fixes - meson driver updates - sc16is7xx driver updates - 8250 driver updates for different hardware types - qcom-geni driver fixes - tegra serial driver change - stm32 driver updates - synclink_gt driver cleanups - tty structure size reduction All of these have been in linux-next this week with no reported issues. The last bit of cleanups from Jiri and the tty structure size reduction came in last week, a bit late but as they were just style changes and size reductions, I figured they should get into this merge cycle so that others can work on top of them with no merge conflicts" * tag 'tty-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits) tty: shrink the size of struct tty_struct by 40 bytes tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw() tty: n_tty: extract ECHO_OP processing to a separate function tty: n_tty: unify counts to size_t tty: n_tty: use u8 for chars and flags tty: n_tty: simplify chars_in_buffer() tty: n_tty: remove unsigned char casts from character constants tty: n_tty: move newline handling to a separate function tty: n_tty: move canon handling to a separate function tty: n_tty: use MASK() for masking out size bits tty: n_tty: make n_tty_data::num_overrun unsigned tty: n_tty: use time_is_before_jiffies() in n_tty_receive_overrun() tty: n_tty: use 'num' for writes' counts tty: n_tty: use output character directly tty: n_tty: make flow of n_tty_receive_buf_common() a bool Revert "tty: serial: meson: Add a earlycon for the T7 SoC" Documentation: devices.txt: Fix minors for ttyCPM* Documentation: devices.txt: Remove ttySIOC* Documentation: devices.txt: Remove ttyIOC* serial: 8250_bcm7271: improve bcm7271 8250 port ...
2023-09-01ASoC: Name iov_iter argument as iterator instead of bufferGravatar Takashi Iwai 2-5/+5
While transitioning ASoC code for iov_iter usages, I kept the argument name as "buf" as the original code. But, iov_iter is an iterator, and using the name "buf" may be misleading: the crucial difference is that iov_iter can be proceeded after the operation, hence it can't be passed twice, while a simple "buffer" sounds as if reusable. To make the usage clearer, rename the argument from "buf" to "iter". There is no functional changes, just names. Fixes: 66201cacc33d ("ASoC: component: Add generic PCM copy ops") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wje+VkXjjfVTmK-uJdG_M5=ar14QxAwK+XDiq07k_pzBg@mail.gmail.com Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230831130457.8180-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-09-01ASoC: dmaengine: Drop unused iov_iter for process callbackGravatar Takashi Iwai 3-4/+4
Passing the iov_iter to the process callback is rather buggy, as the iterator has been already processed for playback. Similarly, it makes the copy for capture buggy after the process callback reading the iterator out. Moreover, all existing process callbacks don't refer to the passed iterator at all. So, it's better to drop the argument from the process callback. Fixes: 9bebd65443c1 ("ASoC: dmaengine: Use iov_iter for process callback, too") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wje+VkXjjfVTmK-uJdG_M5=ar14QxAwK+XDiq07k_pzBg@mail.gmail.com Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230831130457.8180-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-31ALSA: hda/tas2781: Use standard clamp() macroGravatar Takashi Iwai 1-13/+3
Instead of the home-made clamp() function, use the standard macro(). Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://lore.kernel.org/r/20230831123620.23064-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-30Merge tag 'sound-6.6-rc1' of ↵Gravatar Linus Torvalds 543-6665/+21359
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We've received a fairly wide range of changes at this time, including for ALSA and ASoC core, but all of them are rather small changes. Here are some highlights: ALSA / ASoC Core: - Fixes of inconsistent locking around control API helpers - A few new control API functions and cleanups - Workarounds for potential UAFs by delayed kobj releases - Unified PCM copy ops with iov_iter - Continued efforts for ASoC API cleanups ASoC: - An adaptor to allow use of IIO DACs and ADCs in ASoC which pulls in some IIO changes - Create a library function for intlog10() and use it in the NAU8825 driver - Convert drivers to use the more modern maple tree register cache - Lots of work on the SOF framework, AMD and Intel drivers, including a lot of cleanup and new device support - Standardization of the presentation of jacks from drivers - Provision of some generic sound card DT properties - Support for AMD Van Gogh, AMD machines with MAX98388 and NAU8821, AWInic AW88261, Cirrus Logic CS35L36 and CS42L43, various Intel platforms including AVS machines with ES8336 and RT5663, Mediatek MT7986, NXP i.MX93, RealTek RT1017 and StarFive JH7110 Others: - New test coverage including ASoC and topology tests in KUnit; this also involves enabling UML builds of ALSA since that's the default KUnit test environment which pulls in the addition of some stubs to the driver - More enhancement of pcmtest driver - A few fixes / enhancements of MIDI 2.0 UMP core - Using PCI definitions in allover HD-audio code - Support for Cirrus CS35L56 and TI TAS2781 HD-audio sub-codecs - CS35L41 HD-audio sub-codec improvements - Continued emu10k1 improvements" * tag 'sound-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (693 commits) ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl ASoC: dwc: i2s: Fix unused functions ALSA: usb-audio: Don't try to submit URBs after disconnection ALSA: emu10k1: add separate documentation for E-MU cards ALSA: emu10k1: more documentation updates ALSA: emu10k1: de-duplicate audigy-mixer.rst vs. sb-live-mixer.rst ALSA: ump: Fix -Wformat-truncation warnings ALSA: hda: Add missing dependency on CONFIG_EFI for Cirrus/TI sub-codecs ALSA: doc: Fix missing backquote in midi-2.0.rst ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx ALSA: hda/tas2781: Switch back to use struct i2c_driver's .probe() ASoC: soc-core.c: Do not error if a DAI link component is not found ASoC: codecs: Fix error code in aw88261_i2c_probe() ASoC: audio-graph-card.c: move audio_graph_parse_of() ASoC: cs42l43: Use new-style PM runtime macros ALSA: documentation: Add description for USB MIDI 2.0 gadget driver ALSA: ump: Don't create unused substreams for static blocks ALSA: ump: Fill group names for legacy rawmidi substreams ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs ALSA: ac97: Fix possible error value of *rac97 ...
2023-08-29ASoC: cs35l56: Waiting for firmware to boot must be tolerant of I/O errorsGravatar Simon Trimmer 1-14/+15
Ignore failure to read from the cs35l56 when polling as the device will NAK i2c accesses until it has booted and this would terminate the poll of regmap_read_poll_timeout(). Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com Link: https://lore.kernel.org/r/20230829160433.2647889-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-29Merge tag 'regmap-v6.6' of ↵Gravatar Linus Torvalds 1-6/+3
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is a much quieter release than the past few, there's one small API addition that I noticed a user for in ALSA and a bunch of cleanups: - Provide an interface for determining if a register is present in the cache and add a user of it in ALSA. - Full support for dynamic allocations, following the temporary bodges that were done as fixes in the previous release. - Remove the unused and questionably working 64 bit support" * tag 'regmap-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Fix the type used for a bitmap pointer regmap: Remove dynamic allocation warnings for rbtree and maple regmap: rbtree: Use alloc_flags for memory allocations regmap: maple: Use alloc_flags for memory allocations regmap: Reject fast_io regmap configurations with RBTREE and MAPLE caches ALSA: hda: Use regcache_reg_cached() rather than open coding regmap: Provide test for regcache_reg_present() regmap: Let users check if a register is cached regmap: Provide user selectable option to enable regmap regmap: mmio: Remove unused 64-bit support code regmap: cache: Revert "Add 64-bit mode support" regmap: Revert "add 64-bit mode support" and Co.
2023-08-29ALSA: pcm: Fix missing fixup call in compat hw_refine ioctlGravatar Takashi Iwai 1-2/+6
The update of rate_num/den and msbits were factored out to fixup_unreferenced_params() function to be called explicitly after the hw_refine or hw_params procedure. It's called from snd_pcm_hw_refine_user(), but it's forgotten in the PCM compat ioctl. This ended up with the incomplete rate_num/den and msbits parameters when 32bit compat ioctl is used. This patch adds the missing call in snd_pcm_ioctl_hw_params_compat(). Reported-by: Meng_Cai@novatek.com.cn Fixes: f9a076bff053 ("ALSA: pcm: calculate non-mask/non-interval parameters always when possible") Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230829134344.31588-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-29ASoC: cs42l43: Fix missing error code in cs42l43_codec_probe()Gravatar Harshit Mogalapalli 1-1/+2
When clk_get_optional() fails, the error handling code does a 'goto err_pm' with ret = 0, which is resturning success on a failure path. Fix this by assigning the PTR_ERR(priv-mclk) to ret variable. Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230829073635.1877367-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-29ASoC: cs35l45: Rename DACPCM1 Source controlGravatar Vlad Karpovich 1-4/+4
Rename control to "DACPCM Source" for backward compatibility with previous implementation. Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230828170525.335671-5-vkarpovi@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-29ASoC: cs35l45: Fix "Dead assigment" warningGravatar Vlad Karpovich 1-1/+1
Value stored to 'ret' is never read. Remove it. Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230828170525.335671-2-vkarpovi@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-29ASoC: cs35l45: Add support for Chip ID 0x35A460Gravatar Vlad Karpovich 1-0/+1
The 0x35A460 chip is a different variant of the cs35l45. Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230828170525.335671-1-vkarpovi@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-28Merge tag 'asoc-fix-v6.5-merge-window' of ↵Gravatar Takashi Iwai 4-72/+102
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes that got left after v6.4 These were some changes in my v6.4 branch that never got sent as fixes, none of them super urgent thankfully.
2023-08-28ASoC: dwc: i2s: Fix unused functionsGravatar Takashi Iwai 1-0/+2
A few newly added functions aren't built unless CONFIG_OF is set, which result in the build failure due to defined-but-not-used errors. Put "#ifdef CONFIG_OF" around those functions to suppress the build error. Fixes: 52ea7c0543f8 ("ASoC: dwc: i2s: Add StarFive JH7110 SoC support") Link: https://lore.kernel.org/r/20230828113537.27600-1-tiwai@suse.de Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28ASoC: codecs: wcd93xx: fix object added to multiple driversGravatar Krzysztof Kozlowski 3-3/+19
Three Qualcomm audio codecs (WCD9355, WCD934x and WCD938x) use the same object file wcd-clsh-v2.o leading to warnings: Makefile: wcd-clsh-v2.o is added to multiple modules: snd-soc-wcd9335 snd-soc-wcd934x snd-soc-wcd938x Convert the wcd-clsh-v2.o to a module to solve it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org Link: https://lore.kernel.org/r/20230828132316.190386-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-28Merge tag 'asoc-v6.6' of ↵Gravatar Takashi Iwai 304-3351/+13521
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.6 The rest of the updates for v6.6, some of the highlights include: - A big API cleanup from Morimoto-san, rationalising the places we put functions. - Lots of work on the SOF framework, AMD and Intel drivers, including a lot of cleanup and new device support. - Standardisation of the presentation of jacks from drivers. - Provision of some generic sound card DT properties. - Conversion oof more drivers to the maple tree register cache. - New drivers for AMD Van Gogh, AWInic AW88261, Cirrus Logic cs42l43, various Intel platforms, Mediatek MT7986, RealTek RT1017 and StarFive JH7110.
2023-08-28ALSA: usb-audio: Don't try to submit URBs after disconnectionGravatar Takashi Iwai 1-13/+27
USB-audio driver can still submit URBs while the device is being disconnected, and it may result in spurious error messages like: usb 1-2: cannot submit urb (err = -19) usb 1-2: Unable to submit urb #0: -19 at snd_usb_queue_pending_output_urbs usb 1-2: cannot submit urb 0, error -19: no device Although those are harmless, they are just ugly. This patch tries to avoid spewing such error messages when the device is already at the disconnected state. It also skips the superfluous xfer notification, too. Link: https://lore.kernel.org/r/20230828101924.27107-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28Merge branch 'for-next' into for-linusGravatar Takashi Iwai 273-3257/+7731
Pull materials for 6.5 merge window. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-26ALSA: ump: Fix -Wformat-truncation warningsGravatar Takashi Iwai 1-2/+2
Filling the rawmidi name and substream name can be truncated, and this leads to spurious compiler warnings due to -Wformat-truncation. Although the truncation is the expected behavior, it'd be better to truncate the string within "(...)" This patch puts the precision specifies to each %s for fitting the words within the size-limited strings. Fixes: 5f11dd938fe7 ("ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308251844.1FuQYsql-lkp@intel.com/ Link: https://lore.kernel.org/r/20230826072151.23408-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-25ALSA: hda: Add missing dependency on CONFIG_EFI for Cirrus/TI sub-codecsGravatar Takashi Iwai 1-0/+3
The CS35L41 and TAS2781 sub-codecs depend on CONFIG_EFI, as they have the code accessing efi variable directly. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308250621.1lwt7PtZ-lkp@intel.com/ Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://lore.kernel.org/r/20230825092819.12340-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-25ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxxGravatar Fabian Vogt 1-0/+8
The LED for the mic mute button is controlled by GPIO2. The mute button LED is slightly more complex, it's controlled by two bits in coeff 0x0b. Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de> Link: https://lore.kernel.org/r/2693091.mvXUDI8C0e@fabians-envy Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-25ALSA: hda/tas2781: Switch back to use struct i2c_driver's .probe()Gravatar Uwe Kleine-König 1-1/+1
struct i2c_driver::probe_new is about to go away. Switch the driver to use the probe callback with the same prototype. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://lore.kernel.org/r/20230824200219.9569-1-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-25Merge tag 'asoc-fix-v6.5-rc7-2' of ↵Gravatar Takashi Iwai 1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Quirk for v6.5 One additional fix for v6.5, an additional quirk. As with the other fixes this could wait for the merge window.
2023-08-24ASoC: soc-core.c: Do not error if a DAI link component is not foundGravatar Cristian Ciocaltea 1-5/+5
A recent cleanup of soc_dai_link_sanity_check() is responsible for generating lots of confusing errors before returning -EPROBE_DEFER: acp5x_mach acp5x_mach.0: ASoC: Component acp5x_i2s_dma.0 not found for link acp5x-8821-play [...] acp5x_mach acp5x_mach.0: ASoC: Component spi-VLV1776:00 not found for link acp5x-CS35L41-Stereo [...] acp5x_mach acp5x_mach.0: ASoC: Component spi-VLV1776:01 not found for link acp5x-CS35L41-Stereo Switch back to the initial behaviour of logging those messages on KERN_DEBUG level instead of KERN_ERR. While at it, use the correct form of the verb in 'component_not_find' label. Fixes: 0e66a2c69409 ("ASoC: soc-core.c: cleanup soc_dai_link_sanity_check()") Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com Link: https://lore.kernel.org/r/20230824193837.369761-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-24ASoC: codecs: Fix error code in aw88261_i2c_probe()Gravatar Harshit Mogalapalli 1-1/+1
Passing zero to dev_err_probe is a success which is incorrect when i2c_check_functionality() fails. Fix this by passing -ENXIO instead of zero to dev_err_probe(). Fixes: 028a2ae25691 ("ASoC: codecs: Add aw88261 amplifier driver") Reported-by: kernel test robot <lkp@intel.com Reported-by: Dan Carpenter <error27@gmail.com Closes: https://lore.kernel.org/r/202308150315.CvOTIOKm-lkp@intel.com/ Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com Link: https://lore.kernel.org/r/20230824191722.2701215-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-24ASoC: audio-graph-card.c: move audio_graph_parse_of()Gravatar Kuninori Morimoto 1-71/+68
Current audio-graph-card functions definition are like below (A)' static int graph_get_dais_count(); (B) int audio_graph_parse_of(...) { ... (A) ret = graph_get_dais_count(); ... } (A) static int graph_get_dais_count(...) { ... } (C) We don't need to have (A)' definition if audio_graph_parse_of() (B) was defined at (C). This patch moves (B) to (C). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87r0ntmc3c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-24ASoC: cs42l43: Use new-style PM runtime macrosGravatar Charles Keepax 1-4/+3
Update to the newer style PM runtime macros, no functional change. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230824103902.1606288-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-24ASoC: amd: yc: Fix a non-functional mic on Lenovo 82SJGravatar Mario Limonciello 1-1/+1
Lenovo 82SJ doesn't have DMIC connected like 82V2 does. Narrow the match down to only cover 82V2. Reported-by: prosenfeld@Yuhsbstudents.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217063 Fixes: 2232b2dd8cd4 ("ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com Link: https://lore.kernel.org/r/20230824011149.1395-1-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org
2023-08-24ALSA: ump: Don't create unused substreams for static blocksGravatar Takashi Iwai 1-6/+37
When the UMP Endpoint is declared as "static", that is, no dynamic reassignment of UMP Groups, it makes little sense to expose always all 16 groups with 16 substreams. Many of those substreams are disabled groups, hence they are useless, but applications don't know it and try to open / access all those substreams unnecessarily. This patch limits the number of UMP legacy rawmidi substreams only to the active groups. The behavior is changed only for the static endpoint (i.e. devices without UMP v1.1 feature implemented or with the static block flag is set). Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Link: https://lore.kernel.org/r/20230824075108.29958-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: ump: Fill group names for legacy rawmidi substreamsGravatar Takashi Iwai 1-0/+15
To make it clearer which legacy substream corresponds to which UMP group, fill the subname field of each substream object with the group number and the endpoint name, e.g. "Group 1 (My Device)". Ideally speaking, we should have some better link information to the derived UMP, but it's another feature extension. Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Link: https://lore.kernel.org/r/20230824075108.29958-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPsGravatar Takashi Iwai 2-7/+10
The legacy rawmidi devices are the shadows of the main UMP devices, hence it's better to initialize them after all UMP Endpoints are parsed. Then, at the moment the legacy rawmidi is created, we already know the static flag or the proper EP name string, and we can fill those information at UMP core side instead of fiddling the attributes at a later point. Fixes: ec362b63c4b5 ("ALSA: usb-audio: Enable the legacy raw MIDI support") Link: https://lore.kernel.org/r/20230824075108.29958-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: ac97: Fix possible error value of *rac97Gravatar Su Hui 1-3/+2
Before committing 79597c8bf64c, *rac97 always be NULL if there is an error. When error happens, make sure *rac97 is NULL is safer. For examble, in snd_vortex_mixer(): err = snd_ac97_mixer(pbus, &ac97, &vortex->codec); vortex->isquad = ((vortex->codec == NULL) ? 0 : (vortex->codec->ext_id&0x80)); If error happened but vortex->codec isn't NULL, this may cause some problems. Move the judgement order to be clearer and better. Fixes: 79597c8bf64c ("ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer") Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Su Hui <suhui@nfschina.com> Link: https://lore.kernel.org/r/20230823025212.1000961-1-suhui@nfschina.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: pcmtest: Add support for pcm pausingGravatar Ivan Orlov 1-8/+41
Add pause push/release support to the virtual PCM test driver. Add 'suspend' boolean field to the pcmtst_buf_iter structure, so we can pause the timer without shutting it down. Update the trigger callback handler correspondingly. Extract buffer initialization to the 'reset_buf_iterator' function since it is used in multiple places now. Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230822150541.8450-1-ivan.orlov0322@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: hda/realtek: Add quirk for HP Victus 16-d1xxx to enable mute LEDGravatar SungHwan Jung 1-0/+22
This quirk enables mute LED on HP Victus 16-d1xxx (8A25) laptops, which use ALC245 codec. Signed-off-by: SungHwan Jung <onenowy@gmail.com> Link: https://lore.kernel.org/r/20230823114051.3921-1-onenowy@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct ↵Gravatar Stefan Binding 1-0/+32
boost type CS35L41 HDA driver requires ACPI to contain correct _DSD properties to correctly configure the device. Whilst the HP Zbook Fury 17 G9 contains valid _DSD properties, the boost type has been configured incorrectly in the _DSD for this laptop. We can override these properties to fix the boost type. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230823143956.755758-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24Merge branch 'for-linus' into for-nextGravatar Takashi Iwai 39-95/+335
Back-merge the 6.5-devel branch for the clean patch application for 6.6 and resolving merge conflicts. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-24Merge tag 'asoc-fix-v6.5-rc7' of ↵Gravatar Takashi Iwai 7-29/+51
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.5 A relatively large but generally not super urgent set of fixes for ASoC, including some quirks and a MAINTAINERS update. There's also an update to cs35l56 to change the firmware ABI, there are no current shipping systems which use the current interface and the sooner we get the new interface in the less likely it is that something will start. It'd be nice if these landed for v6.5 but not the end of the world if they wait till v6.6.