aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/als100.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-19ALSA: als100: Allocate resources with device-managed APIsTakashi Iwai1-31/+10
This patch converts the resource management in ISA als100 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-58-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-09ALSA: als100: Fix assignment in if conditionTakashi Iwai1-6/+12
ISA ALS100 driver code contains lots of 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-13-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-17module: remove never implemented MODULE_SUPPORTED_DEVICELeon Romanovsky1-11/+0
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>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner1-13/+1
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 <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15ALSA: isa: Remove superfluous snd_pcm_suspend*() callsTakashi Iwai1-1/+0
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>
2017-08-17ALSA: als100: constify pnp_card_device_idArvind Yadav1-1/+1
pnp_card_device_id are not supposed to change at runtime. All functions working with pnp_card_device_id provided by <linux/pnp.h> work with const pnp_card_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-18ALSA: als100: fix format string overflow warningArnd Bergmann1-6/+7
The compiler sees that the format string might overflow for the longname: sound/isa/als100.c: In function 'snd_als100_pnp_detect': sound/isa/als100.c:225:27: error: ', dma ' directive writing 6 bytes into a region of size between 0 and 64 [-Werror=format-overflow=] sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/isa/als100.c:225:3: note: 'sprintf' output between 24 and 113 bytes into a destination of size 80 sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d", Open-coding "shortname" here gets us below the limit, and using snprintf() is a good idea too. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ASoC: sb16: Simplify snd_sb16dsp_pcm()Lars-Peter Clausen1-1/+1
All callers of snd_sb16dsp_pcm() always pass the pcm field of the first parameter as the last parameter. Simplify the function by moving this inside the function itself. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12ALSA: isa: Convert to snd_card_new() with a device pointerTakashi Iwai1-3/+3
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: isa: remove __dev* attributesBill Pemberton1-11/+11
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>
2012-08-21ALSA: snd-als100: fix suspend/resumeOndrej Zary1-1/+1
snd_card_als100_probe() does not set pcm field in struct snd_sb. As a result, PCM is not suspended and applications don't know that they need to resume the playback. Tested with Labway A381-F20 card (ALS120). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-28Email/web address changeJonathan Woithe1-1/+1
This patch updates Jonathan Woithe's contact details across the kernel tree. Signed-off-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-12-19ALSA: module_param: make bool parameters really boolRusty Russell1-1/+1
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>
2011-10-31sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker1-1/+1
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>
2011-09-14ALSA: mpu401: clean up interrupt specificationClemens Ladisch1-1/+0
The semantics of snd_mpu401_uart_new()'s interrupt parameters are somewhat counterintuitive: To prevent the function from allocating its own interrupt, either the irq number must be invalid, or the irq_flags parameter must be zero. At the same time, the irq parameter being invalid specifies that the mpu401 code has to work without an interrupt allocated by the caller. This implies that, if there is an interrupt and it is allocated by the caller, the irq parameter must be set to a valid-looking number which then isn't actually used. With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value, which forces us to handle the parameters differently. This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the device interrupt is handled by the caller, and makes the allocation of the interrupt to depend only on the irq parameter. As suggested by Takashi, the irq_flags parameter was dropped because, when used, it had the constant value IRQF_DISABLED. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11ALSA: dt019x: merge into the als100 driverKrzysztof Helt1-35/+86
The als100 driver is so similar to the dt019x/als007 driver that one driver's source can be used for both drivers with only few changes. Merge the dt019x driver into the als100. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in sound/isa/*Takashi Iwai1-3/+4
Convert from snd_card_new() to the new snd_card_create() function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai1-1/+0
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] sound/isa: kill pnp_resource_changeRene Herman1-47/+2
This removes the pnp_resource_change use from the ALSA ISAPnP drivers. In 2.4 these were useful in providing an easy path to setting the resources, but in 2.6 they retain function as a layering violation only. This makes for a nice cleanup (-550 lines) of ALSA but moreover, ALSA is the only remaining user of pnp_init_resource_table(), pnp_resource_change() and pnp_manual_config_dev() (and, in fact, of 'struct pnp_resource_table') in the tree outide of drivers/pnp itself meaning it makes for more cleanup potential inside the PnP layer. Thomas Renninger acked their removal from that side, you did from the ALSA side (CC list just copied from that thread). Against current alsa-kernel HG. Many more potential cleanups in there, but this _only_ removes the pnp_resource_change code. Compile tested against current alsa-kernel HG and compile- and use-tested against 2.6.23.x (few offsets). Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2006-07-02[PATCH] irq-flags: sound: Use the new IRQF_ constantsThomas Gleixner1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27[PATCH] PNP: adjust pnp_register_card_driver() signature: als100Bjorn Helgaas1-4/+10
Remove the assumption that pnp_register_card_driver() returns the number of devices claimed. And fix a __init/__devinit issue. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Jaroslav Kysela <perex@suse.cz> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-03[ALSA] als100 - Add PM supportTakashi Iwai1-10/+41
Modules: ALS100 driver Add PM support to als100 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: ISA SB/AD-cloneTakashi Iwai1-4/+4
Modules: ALS100 driver,AZT2320 driver,DT019x driver,Sound Galaxy driver Remove xxx_t typedefs from the ISA SB/AD-clone drivers (als100, azt2320, dt019x, sgalaxy). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+336
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!