- Apr 12, 2022
-
-
Takashi Iwai authored
The previous cleanup with devres may lead to the incorrect release orders at the probe error handling due to the devres's nature. Until we register the card, snd_card_free() has to be called at first for releasing the stuff properly when the driver tries to manage and release the stuff via card->private_free(). This patch fixes it by calling snd_card_free() manually on the error from the probe callback. Fixes: 87e082ad ("ALSA: cmipci: Allocate resources with device-managed APIs") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220412102636.16000-33-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Mar 14, 2022
-
-
Jonathan Teh authored
Save and restore CM_REG_AUX_VOL instead of register 0x24 twice on suspend/resume. Tested on CMI8738LX. Fixes: cb60e5f5 ("[ALSA] cmipci - Add PM support") Signed-off-by:
Jonathan Teh <jonathan.teh@outlook.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/DBAPR04MB7366CB3EA9C8521C35C56E8B920E9@DBAPR04MB7366.eurprd04.prod.outlook.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Nov 14, 2021
-
-
Takashi Iwai authored
Since the recent code refactoring using devres, the variable cm in snd_cmipci_probe() is no longer referred. Fixes: 87e082ad ("ALSA: cmipci: Allocate resources with device-managed APIs") Reported-by:
kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/cc6383a2-cafb-ffe7-0b4f-27a310a1005c@intel.com Link: https://lore.kernel.org/r/20211112103137.9504-1-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jul 19, 2021
-
-
Takashi Iwai authored
This patch converts the resource management in PCI cmipci driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-14-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 09, 2021
-
-
Takashi Iwai authored
PCI CMIPCI driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-23-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Mar 17, 2021
-
-
Leon Romanovsky authored
MODULE_SUPPORTED_DEVICE was added in pre-git era and never was implemented. We can safely remove it, because the kernel has grown to have many more reliable mechanisms to determine if device is supported or not. Signed-off-by:
Leon Romanovsky <leonro@nvidia.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jan 05, 2020
-
-
Takashi Iwai authored
Apply const prefix to the static tables for rates, ports and registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-37-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jan 03, 2020
-
-
Takashi Iwai authored
Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Dec 17, 2019
-
-
Takashi Iwai authored
Patrick May reported that his sound card with CMI8378 chip causes a crash / reboot when accessing the MIDI port that isn't actually present on the board. Moreover, despite of the documentation, passing mpu_port=0 doesn't disable the MIDI port on this board. It implies that the chip is a newer revision and the MPU401 port is integrated and mapped on the PCI register. For this chip model, the driver enables the MPU port unconditionally, so far. Although fixing the unexpected reboot would be the best solution, it's not so trivial to identify the cause. So, as a plan B, this patch extends the existing mpu_port option usage to allow disabling the port by specifying the value 0, just like we applied for fm_port option in commit 2f24d159 ("[ALSA] cmipci - Allow to disable integrated FM port"). As default, the MPU port is still enabled, but user can pass mpu_port=0 to disable it. Reported-and-tested-by:
Patrick May <dusthillresident@gmail.com> Link: https://lore.kernel.org/r/20191217081448.1144-1-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Dec 11, 2019
-
-
Takashi Iwai authored
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-11-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-16-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-31-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Nov 06, 2019
-
-
Takashi Iwai authored
Pass the device pointer from the PCI pointer directly, instead of a non-standard macro. The macro didn't give any better readability. Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- May 30, 2019
-
-
Thomas Gleixner authored
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <a...
-
- Feb 06, 2019
-
-
Takashi Iwai authored
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functional changes. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jan 15, 2019
-
-
Takashi Iwai authored
The call of snd_pcm_suspend_all() & co became superfluous since we call it in the PCM PM ops. Let's remove them. Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 16, 2018
-
-
Takashi Iwai authored
save_mixer_state() is called in a sleepable context, so it's safe to allocate with GFP_KERNEL instead of the current GFP_ATOMIC. The GFP_ATOMIC usage must have been based on an incorrect assumption in the very old code base. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 22, 2017
-
-
Markus Elfring authored
Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by:
Markus Elfring <elfring@users.sourceforge.net> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 12, 2017
-
-
Bhumika Goyal authored
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jun 09, 2017
-
-
Takashi Iwai authored
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 20, 2017
-
-
David Howells authored
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in sound/pci/. Suggested-by:
Alan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by:
David Howells <dhowells@redhat.com> cc: Jaroslav Kysela <perex@perex.cz> cc: Takashi Iwai <tiwai@suse.com> cc: alsa-devel@alsa-project.org
-
- Feb 21, 2017
-
-
Bhumika Goyal authored
Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having the same property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_kcontrol_new i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ snd_ctl_new1(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_kcontrol_new i; Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Nov 13, 2016
-
-
Fabian Frederick authored
Signed-off-by:
Fabian Frederick <fabf@skynet.be> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Sep 02, 2016
-
-
Julia Lawall authored
Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/ ) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // </smpl> Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- May 29, 2015
-
-
Takashi Iwai authored
The compiler can optimize the unused code away, so we can drop ifdefs. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Feb 25, 2015
-
-
Dan Carpenter authored
Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jan 28, 2015
-
-
Takashi Iwai authored
Nowadays it's recommended. Replace all in a shot. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jan 09, 2015
-
-
Takashi Iwai authored
This is a similar cleanup like the commit [3db084fd : ALSA: fm801: PCI core handles power state for us]. Since pci_set_power_state(), pci_save_state() and pci_restore_state() are already done in the PCI core side, so we don't need to it doubly. Also, pci_enable_device(), pci_disable_device() and pci_set_master() calls in PM callbacks are superfluous nowadays, too, so get rid of them as well. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 12, 2014
-
-
Benoit Taine authored
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/ ): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by:
Benoit Taine <benoit.taine@lip6.fr> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- Feb 26, 2014
-
-
Takashi Iwai authored
Convert with dev_err() and co from snd_printk(), etc. Some commented debug prints are also enabled as dev_dbg(). Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Feb 12, 2014
-
-
Takashi Iwai authored
Also remove superfluous snd_card_set_dev() calls. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- May 29, 2013
-
-
Takashi Iwai authored
As drvdata is cleared to NULL at probe failure or at removal by the driver core, we don't have to call pci_set_drvdata(pci, NULL) any longer in each driver. The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in hda_intel.c. Since this function itself releases the card instance, we need to clear drvdata here as well, so that it won't be released doubly in the remove callback. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Dec 07, 2012
-
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Sep 06, 2012
-
-
Takashi Iwai authored
Simply enable the channel map according to the h/w capability. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Aug 14, 2012
-
-
Takashi Iwai authored
Otherwise we may get compile warnings due to unused functions. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Jul 03, 2012
-
-
Takashi Iwai authored
Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 24, 2012
-
-
Takashi Iwai authored
Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Dec 19, 2011
-
-
Rusty Russell authored
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Oct 31, 2011
-
-
Paul Gortmaker authored
The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
-