summaryrefslogtreecommitdiff
path: root/sound/isa/cmi8328.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-19ALSA: cmi8328: Allocate resources with device-managed APIsTakashi Iwai1-21/+10
This patch converts the resource management in ISA cmi8328 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-60-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-01-26isa: Make the remove callback for isa drivers return voidUwe Kleine-König1-2/+1
The driver core ignores the return value of the remove callback, so don't give isa drivers the chance to provide a value. Adapt all isa_drivers with a remove callbacks accordingly; they all return 0 unconditionally anyhow. Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for drivers/net/can/sja1000/tscan1.c Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Acked-by: Wolfram Sang <wsa@kernel.org> # for drivers/i2c/ Reviewed-by: Takashi Iway <tiwai@suse.de> # for sound/ Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for drivers/media/ Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20210122092449.426097-4-uwe@kleine-koenig.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05ALSA: cmi8328: More constificationsTakashi Iwai1-12/+12
Apply const prefix to the static resource tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-44-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-21treewide: Add SPDX license identifier for more missed filesThomas Gleixner1-0/+1
Add SPDX license identifiers to all files which: - Have no license information of any form - Have MODULE_LICENCE("GPL*") inside which was used in the initial scan/conversion to ignore the file These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@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>
2018-04-23ALSA: cmi8328: array_find() can be statickbuild test robot1-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17ALSA: cmi8238: Use IS_ENABLED()Takashi Iwai1-1/+1
Simplify the ifdef conditions with IS_ENABLED() macro. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-20Annotate hardware config module parameters in sound/isa/David Howells1-6/+6
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/isa/. 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
2016-06-01ALSA: cmi8328: Utilize the module_isa_driver macroWilliam Breathitt Gray1-12/+1
This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-02ALSA: wss: Remove (almost) always NULL parametersLars-Peter Clausen1-2/+2
Most callers of snd_wss_pcm(), snd_wss_timer() and snd_cs4236_pcm() pass NULL as the last parameter, some callers pass a pointer but never use it after the function has been called and only a few callers pass a pointer and actually use it. The later is only the case for snd_wss_pcm() for snd_cs4236_pcm() and it is possible to get the same PCM object by accessing the pcm field of the snd_wss struct that was passed as the first parameter. This function removes the last parameters from the functions mentioned above and updates the callers which used it to use chip->pcm instead. This allows us to slightly simplify the functions since they don't have to check and set the last parameter anymore which makes the code slightly 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/+2
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06ALSA: cmi8328: Fix compile warnings without CONFIG_PMTakashi Iwai1-0/+2
Just add an ifdef CONFIG_PM to shut up the warnings: sound/isa/cmi8328.c:129:13: warning: ‘snd_cmi8328_cfg_save’ defined but not used [-Wunused-function] sound/isa/cmi8328.c:136:13: warning: ‘snd_cmi8328_cfg_restore’ defined but not used [-Wunused-function] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-29ALSA: ISA: Remove superfluous *_set_drvdata(NULL) callsTakashi Iwai1-1/+0
Similarly like the previous commit for PCI drivers, remove dev_set_drvdata(NULL) and pnp_set_drvdata(NULL) calls in ISA drivers now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: isa: remove __dev* attributesBill Pemberton1-4/+4
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-24ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=nTakashi Iwai1-1/+2
sound/isa/cmi8328.c: In function 'snd_cmi8328_remove': sound/isa/cmi8328.c:416:24: error: 'cmi' undeclared (first use in this function) sound/isa/cmi8328.c:416:24: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [sound/isa/cmi8328.o] Error 1 Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-21ALSA: introduce snd-cmi8328: C-Media CMI8328 driverOndrej Zary1-0/+482
Introduce snd-cmi8328 driver for C-Media CMI8328-based sound cards, such as AudioExcel AV500. It supports PCM playback and capture (full-duplex) through wss_lib, gameport, OPL3 and MPU401. The AV500 card has onboard Dream wavetable synth connected to the MPU401 port and Aux 1 input internally which works too. The CDROM interface is not supported (as the drivers for these CDROMs were removed from the kernel some time ago). A separate driver is needed because CMI8328 is completely different chip to CMI8329/CMI8330. It's configured by magic registers (there's no PnP). Sound is provided by a real WSS codec (CS4231A) and the SB part is just a SB Pro emulation (for DOS games, useless for Linux). When SB is enabled, the CMI8328 chip disables access to the WSS codec, emulates SoundBlaster on one side and outputs sound data to the codec - so SB and WSS can't work together with this card. The WSS codec can do full duplex by itself so there's no need for crazy things like snd-cmi8330 does (combining SB and WSS parts into one driver). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>