- Aug 18, 2023
-
-
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.de Signed-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.de Signed-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.de Signed-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.de Signed-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.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Shenghao Ding authored
Create tas2781 side codec HDA driver for Lenovo Laptops. The quantity of the speakers has been define in ACPI. All of the tas2781s in the laptop will be aggregated as one audio speaker. The code supports realtek codec as the primary codec. Code offers several controls for digtial/analog gain setting during playback, and other for eq params setting in case of different audio profiles, such as music, voice, movie, etc. [ adjusted patch to be applied to the latest for-next branch -- tiwai ] Signed-off-by:
Shenghao Ding <shenghao-ding@ti.com> Link: https://lore.kernel.org/r/20230818085836.1442-2-shenghao-ding@ti.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Shenghao Ding authored
Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the laptop will be aggregated as one audio device. The code support realtek as the primary codec. Rename "struct cs35l41_dev_name" to "struct scodec_dev_name" for all other side codecs instead of the certain one. Signed-off-by:
Shenghao Ding <shenghao-ding@ti.com> Link: https://lore.kernel.org/r/20230818085836.1442-1-shenghao-ding@ti.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Ruan Jinjie authored
Since pcmtest is a test module that manipulates or gets notification via debugfs, without DEBUG_FS it can not work fine. So make SND_PCMTEST depend on DEBUG_FS. Signed-off-by:
Ruan Jinjie <ruanjinjie@huawei.com> Acked-by:
Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230817093740.1732738-1-ruanjinjie@huawei.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
There was typos in the previous fix for PCM to detach the struct device that caused build errors. Corrected here. Fixes: bc41a722 ("ALSA: pcm: Don't embed device") Reported-by:
kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308181347.q3XPr3Lm-lkp@intel.com/ Link: https://lore.kernel.org/r/20230818070913.23336-1-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 17, 2023
-
-
Takashi Iwai authored
Now all users of snd_device_intialize() are gone, let's drop it. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-10-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Align with the other components, and use snd_device_alloc() for the new sound device for sequencer, too. No functional changes. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-9-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Align with the other components, and use snd_device_alloc() for the new sound device for timer, too. No functional changes. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-8-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Embedding the struct device to snd_compr object may result in UAF when the delayed kobj release is used. Like other devices, let's detach the struct device from the snd_compr by allocating dynamically via snd_device_alloc(). Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-7-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch detaches the struct device from the snd_rawmidi object by allocating via snd_device_alloc(), just like done for other devices. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-6-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Like control and PCM devices, it's better to avoid the embedded struct device for hwdep (although it's more or less well working), too. Change it to allocate via snd_device_alloc(), and free the memory at the common snd_hwdep_free(). Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-5-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
So far we use the embedded struct device for each PCM substreams in struct snd_pcm. This may result in UAF when the delayed kobj release is used; each corresponding struct device is still accessed at the (delayed) device release, while the snd_pcm object may be already gone. As a workaround, detach the struct device from the snd_pcm object by allocating via the new snd_device_alloc() helper. A caveat is that we store the PCM substream pointer to drvdata since the device resume and others require the access to it. This patch is based on the fix Curtis posted initially. In this patch, the changes are split and use the new helper function instead. Link: https://lore.kernel.org/r/20230801171928.1460120-1-cujomalainey@chromium.org Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-4-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Embedding the ctl_dev in the snd_card object may result in UAF when the delayed kobj release is used; at the delayed kobj release, it still accesses the struct device itself while the card memory (that embeds the struct device) may be already gone. As a workaround, detach the struct device from the card object by allocating via the new snd_device_alloc() helper. The rest are just replacing ctl_dev access to the pointer. This is based on the fix Curtis posted initially. In this patch, the changes are split and use the new helper function instead. Link: https://lore.kernel.org/r/20230801171928.1460120-1-cujomalainey@chromium.org Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-3-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Introduce a new helper, snd_device_alloc(), for allocating a struct device that is bound with the sound class. It's a replacement of snd_device_initialize(). Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Curtis Malainey <cujomalainey@chromium.org> Tested-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20230816160252.23396-2-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Yang Yingliang authored
cs35l41_prop_model is only used in cs35l41_hda_property.c now, change it to static. Fixes: ef4ba63f ("ALSA: hda: cs35l41: Support systems with missing _DSD properties") Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230817014252.1511232-1-yangyingliang@huawei.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 16, 2023
-
-
Brady Norander authored
AlderLake and RaptorLake Chromebooks currently use the HDA driver by default. Add a quirk to use the SOF driver on these platforms, which is needed for functional internal audio. Signed-off-by:
Brady Norander <bradynorander@gmail.com> Acked-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by:
Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/ZNuDLk5hgmfKrZg6@arch Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
model->hid is a pointer, and should be rather NULL-checked in the loop of cs35l41_prop_model_table. Fixes: ef4ba63f ("ALSA: hda: cs35l41: Support systems with missing _DSD properties") Reported-by:
kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202308160506.8lCEeFDG-lkp@intel.com/ Link: https://lore.kernel.org/r/20230816063525.23009-1-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Stefan Binding authored
Some systems using CS35L41 with HDA were released without some required _DSD properties in ACPI. To support these special cases, add an api to configure the correct properties for systems with this issue. This initial commit moves the no _DSD support for Lenovo Legion Laptops (CLSA0100, CLSA0101) into a new framework which can be extended to support additional laptops in the future. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230815161033.3519-1-sbinding@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 10, 2023
-
-
Takashi Sakamoto authored
Hard-coded stream format parameters are added for Weiss Engineering FireWire devices. When the device vendor and model match, the parameters are copied into the stream format cache. This allows for setting all supported sampling rates up to 192kHz, and consequently adjusting the number of available I/O channels. Signed-off-by:
Rolf Anderegg <rolf.anderegg@weiss.ch> Signed-off-by:
Michele Perrone <michele.perrone@weiss.ch> Signed-off-by:
Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20230809002631.750120-1-o-takashi@sakamocchi.jp Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 08, 2023
-
-
Justin Stitt authored
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on its destination buffer argument which is _not_ the case for `strncpy`! It should be noted that the current implementation is unlikely to have a bug because `drv_name` is a string literal with a size of 9 while `card->driver` has a size of 16. However, it is probably worthwhile to switch to a more robust and less ambiguous interface. [1]: www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [2]: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by:
Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20230807-sound-pci-hda-v1-1-6d9cdcd085ca@google.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Yue Haibing authored
These declarations is never used since beginning of git history. Signed-off-by:
Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230807141513.31440-1-yuehaibing@huawei.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Ivan Orlov authored
Remove redundant definitions of DEVNAME and CARD_NAME, as they're not useful. The former is not used anywhere, and the latter is used only in module parameters descriptions. Signed-off-by:
Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230804110740.9867-2-ivan.orlov0322@gmail.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Ivan Orlov authored
Trigger callback is not the best place for buffer iterator initialization, so move it out to the prepare callback, where it have to be. Minor enhancement: remove blank line. Signed-off-by:
Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230804110740.9867-1-ivan.orlov0322@gmail.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 04, 2023
-
-
Takashi Iwai authored
Pull ArrowLake-S PCI ID addition and config for MTL/LNL Link: https://lore.kernel.org/r/20230802150105.24604-1-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Kai Vehmanen authored
Expand the HDA/I915 connectivity check to correctly handle the PCI topology used in some Intel Arrow Lake products. Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Tested-by:
"T, Arun" <arun.t@intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230802150105.24604-6-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
One more PCI ID for the road. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230802150105.24604-5-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
This was not updated in Commit 0cd0a7c2 ("ALSA: intel-dsp-config: Convert to PCI device IDs defines") Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230802150105.24604-4-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Kai Vehmanen authored
Add HD Audio PCI ID for Intel Arrow Lake-S platform. Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230802150105.24604-3-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Add part ID to common include file Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230802150105.24604-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 02, 2023
-
-
Stefan Binding authored
Print amp configuration information to be able to confirm ACPI _DSD information (and other useful info) for each amp on each system using CS35L41, without having to get the acpidump. Signed-off-by:
Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230802121235.467358-1-sbinding@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Yu Liao authored
sparse reports sound/ac97/bus.c:465:1: sparse: sparse: symbol 'dev_attr_vendor_id' was not declared. Should it be static? This variable is only used in its defining file, so it should be static. Reported-by:
kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.Oy0Dp2QI-lkp@intel.com/ Signed-off-by:
Yu Liao <liaoyu15@huawei.com> Link: https://lore.kernel.org/r/20230802022649.2514787-1-liaoyu15@huawei.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 01, 2023
-
-
Yue Haibing authored
Commit 68e67f40 ("ALSA: snd-usb: move calls to usb_set_interface") leave this unused declaration. Signed-off-by:
Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230801144512.18716-1-yuehaibing@huawei.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Richard Fitzgerald authored
The ACPI nodes for CS35L56 can contain an extra I2CSerialBusV2 that is not a real device, it is an alias address. This alias address will not be in the cirrus,dev-index array, so reject any instantions with a device address not found in the array. Signed-off-by:
Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-10-rf@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Richard Fitzgerald authored
A tuning patch is always needed to enable the ASP audio port. If the BIOS did not patch the firmware, then it is mandatory to have a .bin file. Signed-off-by:
Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-9-rf@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Richard Fitzgerald authored
A RAM firmware can only be downloaded if the CS35L56 is currently running from ROM firmware. The driver must not try to overwrite the RAM if the CS35L56 is already running from that RAM. Firmware can be downloaded in these two cases: - The BIOS has already patched the firmware (secured mode). In this case the firmware files will only contain tunings that are safe to overwrite. - The CS35L56 is running the built-in ROM firmware. After a RAM firmware has been downloaded it can only be cleared by hard resetting CS35L56. Some systems only hard-reset during power-on and do not give the driver control of hard reset. Signed-off-by:
Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-8-rf@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Richard Fitzgerald authored
If cs35l56_hda_fw_load() successfully called cs_dsp_power_up() the error path must balance that with a call to cs_dsp_power_down(). Signed-off-by:
Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-7-rf@opensource.cirrus.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-