- 24 Aug, 2023 7 commits
-
-
Takashi Iwai authored
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: ec362b63 ("ALSA: usb-audio: Enable the legacy raw MIDI support") Link: https://lore.kernel.org/r/20230824075108.29958-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Su Hui authored
Before committing 79597c8b, *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: 79597c8b ("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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Ivan Orlov authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
SungHwan Jung authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
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.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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>
-
Takashi Iwai authored
Merge tag 'asoc-fix-v6.5-rc7' of 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.
-
- 23 Aug, 2023 2 commits
-
-
Takashi Iwai authored
Like a few other drivers, YMFPCI driver needs to clean up with snd_card_free() call at an error path of the probe; otherwise the other devres resources are released before the card and it results in the UAF. This patch uses the helper for handling the probe error gracefully. Fixes: f33fc157 ("ALSA: ymfpci: Create card with device-managed snd_devm_card_new()") Cc: <stable@vger.kernel.org> Reported-and-tested-by: Takashi Yano <takashi.yano@nifty.ne.jp> Closes: https://lore.kernel.org/r/20230823135846.1812-1-takashi.yano@nifty.ne.jp Link: https://lore.kernel.org/r/20230823161625.5807-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Charles Keepax authored
The current analog gain TLV seems to have completely incorrect values in it. The gain starts at 0.5dB, proceeds in 1dB steps, and has no mute value, correct the control to match. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230823085308.753572-1-ckeepax@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 21 Aug, 2023 4 commits
-
-
Takashi Iwai authored
The error path of tas2781_hda_bind() needs to release PM refcount as well. Modify the code flow to handle properly. Fixes: 5be27f1e ("ALSA: hda/tas2781: Add tas2781 HDA driver") Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Closes: https://lore.kernel.org/r/9f910785-e856-1539-e3e4-c9817af5fe67@linux.intel.com Link: https://lore.kernel.org/r/20230820172635.22236-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The error path at tas2781_read_acpi() doesn't release the acpi_device adev but releases another device physdev instead. This results in a refcount leak. Fix it by replacing with the right object. Fixes: 5be27f1e ("ALSA: hda/tas2781: Add tas2781 HDA driver") Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Closes: https://lore.kernel.org/r/9f910785-e856-1539-e3e4-c9817af5fe67@linux.intel.com Link: https://lore.kernel.org/r/20230820172635.22236-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
There have been reports of USB-audio driver spewing errors at the probe time on a few devices like Jabra and Logitech. The suggested fix there couldn't be applied as is, unfortunately, because it'll likely break other devices. But, the patch suggested an interesting point: looking at the current init code in stream.c, one may notice that it does initialize differently from the device setup in endpoint.c. Namely, for UAC1, we should call snd_usb_init_pitch() and snd_usb_init_sample_rate() after setting the interface, while the init sequence at parsing calls them before setting the interface blindly. This patch changes the init sequence at parsing for UAC1 (and other devices that need a similar behavior) to be aligned with the rest of the code, setting the interface at first. And, this fixes the long-standing problems on a few UAC1 devices like Jabra / Logitech, as reported, too. Reported-and-tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> Closes: https://lore.kernel.org/r/202bbbc0f51522e8545783c4c5577d12a8e2d56d.camel@infinera.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230821111857.28926-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Colin Ian King authored
There is a spelling mistake in a quirk entry. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Fixes: 3babae91 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://lore.kernel.org/r/20230821080003.16678-1-colin.i.king@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 18 Aug, 2023 27 commits
-
-
BrenoRCBrito authored
VivoBook Pro 15 Ryzen Edition uses Ryzen 6800H processor, and adding to quirks list for acp6x will enable internal mic. Signed-off-by: BrenoRCBrito <brenorcbrito@gmail.com> Link: https://lore.kernel.org/r/20230818211417.32167-1-brenorcbrito@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yue Haibing authored
These are not implemented, so can remove them. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230818124852.51468-1-yuehaibing@huawei.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Finally all users have been converted to the new PCM copy ops, let's drop the obsoleted copy_kernel and copy_user ops completely. Link: https://lore.kernel.org/r/20230815190136.8987-26-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Now all ASoC users have been replaced to use the new PCM copy ops, let's drop the obsoleted copy_user ops and its helper function. Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815190136.8987-25-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Update the documentation about the PCM copy callbacks. The update was kept minimalistic, just correcting the use of copy_user ops with the single copy ops, and drop/update the text mentioning the copy_kernel. Link: https://lore.kernel.org/r/20230815190136.8987-24-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Along with the conversion to PCM copy ops, use the iov_iter for the pointer to be passed to the dmaengine process callback, too. It avoids the direct reference of iter_iov_addr(), and it can potentially help for the drivers to access memory properly (although both atmel and stm drivers don't use the given buffer address at all for now). Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Olivier Moysan <olivier.moysan@foss.st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20230815190136.8987-23-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the ASoC dmaenging driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. The process callback is still using the direct pointer as of now, but it'll be converted in the next patch. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20230815190136.8987-22-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the qcom lpass driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Banajit Goswami <bgoswami@quicinc.com> Link: https://lore.kernel.org/r/20230815190136.8987-21-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the mediatek BT SCO driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. As copy_form/to_iter() updates the internal offset at each read/write, we can drop the cur_*_idx counter in the loop, too. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815190136.8987-20-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
For following the ALSA PCM core change, a new PCM copy ops is added toe ASoC component framework: snd_soc_component_driver receives the copy ops, and snd_soc_pcm_component_copy() helper is provided. This also fixes a long-standing potential bug where the ASoC driver covers only copy_user PCM callback and misses the copy from kernel pointers (such as OSS PCM layer), too. As of this patch, the old copy_user is still kept, but it'll be dropped later after all drivers are converted. Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815190136.8987-19-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the solo6x10 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. As copy_to_iter() updates the internal offest at each write, we can drop the dst counter update in the loop, too. Note that copy_to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Acked-by: Ismael Luceno <ismael@iodev.co.uk> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Bluecherry Maintainers <maintainers@bluecherrydvr.com> Cc: Anton Sviridenko <anton@corp.bluecherry.net> Cc: Andrey Utkin <andrey_utkin@fastmail.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-media@vger.kernel.org Link: https://lore.kernel.org/r/20230815190136.8987-18-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Just an update of a comment mentioning the old PCM callbacks to correct to the new PCM copy ops. Link: https://lore.kernel.org/r/20230815190136.8987-17-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the xen frontend driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Cc: xen-devel@lists.xenproject.org Link: https://lore.kernel.org/r/20230815190136.8987-16-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the sh_dac_audio driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Link: https://lore.kernel.org/r/20230815190136.8987-15-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the rme9652 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-14-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the hdsp driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-13-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the rme96 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Link: https://lore.kernel.org/r/20230815190136.8987-12-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the rme32 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Link: https://lore.kernel.org/r/20230815190136.8987-11-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the nm256 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Link: https://lore.kernel.org/r/20230815190136.8987-10-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the korg1212 driver code to use the new unified PCM copy callback. The open-coded conditional memory copies are replaced with simpler copy_from/to_iter() calls. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-9-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the es1938 driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants in most parts. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-8-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the SB Emu8000 driver code to use the new unified PCM copy callback. The conversion is a bit complicated because of many open code in emu8000_pcm.c. GET_VAL() and LOOP_WRITE() macros were rewritten / simplified with copy_from_iter(). As copy_from_iter() updates the internal offset value, we can drop the corresponding part, too. Link: https://lore.kernel.org/r/20230815190136.8987-7-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the GUS driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the dummy driver code to use the new unified PCM copy callback. As dummy driver doesn't do anything in the callback, it's just a simple replacement. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230815190136.8987-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Add two more helpers for copying memory between iov_iter and iomem, which will be used by the new PCM copy ops in a few drivers. The existing helpers became wrappers of those now. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Link: https://lore.kernel.org/r/20230815190136.8987-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
iov_iter is a universal interface to copy the data chunk from/to user-space and kernel in a unified manner. This API can fit for ALSA PCM copy ops, too; we had to split to copy_user and copy_kernel in the past, and those can be unified to a single ops with iov_iter. This patch adds a new PCM copy ops that passes iov_iter for copying both kernel and user-space in the same way. This patch touches only the ALSA PCM core part, and the actual users will be replaced in the following patches. The expansion of iov_iter is done in the PCM core right before calling each copy callback. It's a bit suboptimal, but I took this now as it's the most straightforward replacement. The more conversion to iov_iter in the caller side is a TODO for future. As of now, the old copy_user and copy_kernel ops are still kept. Once after all users are converted, we'll drop the old copy_user and copy_kernel ops, too. Link: https://lore.kernel.org/r/20230815190136.8987-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Export import_ubuf() to be used in sound subsystem for generic memory handling as Linus suggested. It's used for constructing an iov_iter of a single segment user-space copy for PCM data. Cc: Alexander Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/r/CAHk-=wh-mUL6mp4chAc6E_UjwpPLyCPRCJK+iB4ZMD2BqjwGHA@mail.gmail.com Link: https://lore.kernel.org/r/20230815190136.8987-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-