History log of /linux-master/sound/isa/cmi8328.c
Revision Date Author Comments
# d9fd7397 15-Jul-2021 Takashi Iwai <tiwai@suse.de>

ALSA: cmi8328: Allocate resources with device-managed APIs

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>


# 30e88d01 22-Jan-2021 Uwe Kleine-König <uwe@kleine-koenig.org>

isa: Make the remove callback for isa drivers return void

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>


# f3c09169 05-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: cmi8328: More constifications

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>


# 09c434b8 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier for more missed files

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>


# 28394f0e 11-Jan-2019 Takashi Iwai <tiwai@suse.de>

ALSA: isa: Remove superfluous snd_pcm_suspend*() calls

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>


# c4e4a8fb 22-Apr-2018 kbuild test robot <lkp@intel.com>

ALSA: cmi8328: array_find() can be static

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88faa384 12-May-2017 Takashi Iwai <tiwai@suse.de>

ALSA: cmi8238: Use IS_ENABLED()

Simplify the ifdef conditions with IS_ENABLED() macro.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e992ef57 04-Apr-2017 David Howells <dhowells@redhat.com>

Annotate hardware config module parameters in sound/isa/

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


# 042c576c 31-May-2016 William Breathitt Gray <vilhelm.gray@gmail.com>

ALSA: cmi8328: Utilize the module_isa_driver macro

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>


# fa60c065 01-Jan-2015 Lars-Peter Clausen <lars@metafoo.de>

ALSA: wss: Remove (almost) always NULL parameters

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>


# 4323cc4d 29-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: isa: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 77ed16cc 06-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: cmi8328: Fix compile warnings without CONFIG_PM

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>


# 8b5a1f9c 28-May-2013 Takashi Iwai <tiwai@suse.de>

ALSA: ISA: Remove superfluous *_set_drvdata(NULL) calls

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>


# 1bff292e 05-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ALSA: isa: remove __dev* attributes

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>


# 56244d08 23-Aug-2012 Takashi Iwai <tiwai@suse.de>

ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=n

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>


# f9933487 20-Aug-2012 Ondrej Zary <linux@rainbow-software.org>

ALSA: introduce snd-cmi8328: C-Media CMI8328 driver

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>