History log of /linux-master/sound/isa/sc6000.c
Revision Date Author Comments
# d7245807 11-Apr-2022 Takashi Iwai <tiwai@suse.de>

ALSA: sc6000: Fix the missing snd_card_free() call at probe error

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() on the error from the
probe callback using a new helper function.

Fixes: 111601ff76e9 ("ALSA: sc6000: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220412102636.16000-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f976e8a9 20-Jul-2021 Takashi Iwai <tiwai@suse.de>

ALSA: sc6000: Use explicit cast for __iomem pointer

The recent optimization to store an iomem pointer in card's
private_data field caused sparse warnings. Although they are
practically harmless, add the explicit cast for avoiding the spurious
warnings.

Fixes: 9b7843d1e125 ("ALSA: sc6000: Assign vport directly on card's private_data")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202107210511.SnFqlZMa-lkp@intel.com
Link: https://lore.kernel.org/r/20210720224902.7169-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b7843d1 20-Jul-2021 Takashi Iwai <tiwai@suse.de>

ALSA: sc6000: Assign vport directly on card's private_data

sc6000 driver tries to allocate an extra pointer for keeping the vport
address and point it over card->private_data. But, this indirect
access is utterly superfluous, and we can keep the vport address
directly in card->private_data instead. This will simply the code and
avoid confusion.

Link: https://lore.kernel.org/r/20210720162837.6026-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dca18a94 20-Jul-2021 Colin Ian King <colin.king@canonical.com>

ALSA: sc6000: Fix incorrect sizeof operator

Static analysis is warning that the sizeof being used is should be
of *vport and not vport. Although these are the same size it is not
a portable assumption to assume this is true for all cases. Fix this
by using sizeof(*vport).

Addresses-Coverity: ("Sizeof not portable")
Fixes: 111601ff76e9 ("ALSA: sc6000: Allocate resources with device-managed APIs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210720161707.74197-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 111601ff 15-Jul-2021 Takashi Iwai <tiwai@suse.de>

ALSA: sc6000: Allocate resources with device-managed APIs

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 cleanup code was moved from
the remove callback to card->private_free, and then the remove
callback became superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-70-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6417f031 16-Mar-2021 Leon Romanovsky <leon@kernel.org>

module: remove never implemented MODULE_SUPPORTED_DEVICE

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>


# 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>


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

ALSA: sc6000: More constification

Apply const prefix to the static resource tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-53-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

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>


# 6a300dc9 02-May-2018 Colin Ian King <colin.king@canonical.com>

ALSA: sc6000: fix spelling mistake: "iomaped" -> "iomapped"

Trivial fix to spelling mistake in KERN_ERR error messages

Signed-off-by: Colin Ian King <colin.king@canonical.com>
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


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

ALSA: sc6000: 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>


# 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>


# a67ff6a5 14-Dec-2011 Rusty Russell <rusty@rustcorp.com.au>

ALSA: module_param: make bool parameters really bool

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>


# dba8b469 13-Sep-2011 Clemens Ladisch <clemens@ladisch.de>

ALSA: mpu401: clean up interrupt specification

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>


# b0ec3a30 03-May-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: sc6000: enable joystick port

Add module parameter to enable or disable
joystick port (gameport) on the SC6600 and
later cards.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0cfcdeda 23-Apr-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: sc6000: fix older card initialization

The last patch to handle newer cards like SC7000
broke initialization of the SC6000. Fix this.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c2828661 04-Apr-2009 Krzysztof Helt <krzysztof.h1@poczta.fm>

ALSA: sc6000: add support for SC-6600 and SC-7000

Add support for later cards based on CompuMedia ASC-9408 chipsets.
These cards were produced by Gallant.

This patch make the OSS aedsp16 driver redundant.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa9c293a 21-Jan-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: do not create OPL3 timers if there is no OPL3 irq wired

Most cards have OPL3 FM synthetiser but
they do not have OPL3 interrupt wired to
a sound chip or CPU.

Do not create OPL3 timers for such cards
as the timers are useless witthout interrupt.

This patch removes OPL3 timers for following
alsa drivers: snd-ad1816a, snd-opti93x,
snd-opti92x, snd-sc6000, snd-cmi8330.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c95eadd2 28-Dec-2008 Takashi Iwai <tiwai@alsa3.local>

ALSA: Convert to snd_card_create() in sound/isa/*

Convert from snd_card_new() to the new snd_card_create() function.

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


# 760fc6b8 31-Jul-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: wss_lib: use wss detection code instead of ad1848 one

Use the wss detection code and kill the ad1848 library.
The library is fully assimilated into the new wss library.

This required reworking of the AD1848 family code
so the code is changed to correctly detect chips from
the AD1848 and CS4231 families.

I have tested it on following cards:
Gallant SC-6600 (codec: AD1848, driver: snd-sc6600)
SoundScape VIVO/90 (codec: AD1845, driver: snd-sscape)
SG Waverider (codec: CS4231A, driver: Rene Herman's snd-galaxy)
Opti930 (codec: built-in - CS4231 compatible, driver: snd-opti93x)
Opti931 (codec: built-in - CS4231 compatible, driver: snd-opti93x)
Gallant SC-70P (chip/codec: CS4237B, driver: snd-cs4236)
Audio Plus 3D (chip/codec: CMI8330A, driver: snd-cmi8330)
Dell Latitude CP (chip/codec: cs4236, driver snd-cs4232)

Sound playback and recording works on all these cards.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ead893c0 31-Jul-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: wss_lib: use wss pcm code instead of ad1848 one

Use the wss pcm code and kill the ad1848 pcm code.

The AD1848 chip is much slower than CS4231 chips
so the waiting loop was increased 100x (10x is not
enough).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 5664daa1 31-Jul-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: wss_lib: use wss mixer code instead of ad1848 one

Use the wss mixer code and kill the ad1848 mixer code.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ece11c9b 31-Jul-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: wss_lib: use wss constants instead of ad1848 ones

Use wss constants for mode.
Move ad1848 hardware constants to the wss.h.
Move mixer tlv macros into the ad1848_lib.c from the ad1848.h.

Drop the MODE_RUNNING spurious IRQ guard on AD1848 as it doesn not seem
to be needed.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 241b3ee7 31-Jul-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: wss_lib: use struct snd_wss instead of snd_ad1848

The snd_wss is superset of the snd_ad1848 so kill
the latter and replace it with the snd_wss.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9004acc7 08-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove sound/driver.h

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>


# 4f1895b0 26-Nov-2007 Joe Perches <joe@perches.com>

[ALSA] sound/isa: Add missing 'space'


Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 1cf0bc7e 17-Sep-2007 Krzysztof Helt <krzysztof.h1@wp.pl>

[ALSA] sc6000: 2 minor fixes

This patch zeroes buffer for the card name and
fixes incorrect jump in the probe function.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 3a5bdee5 16-Sep-2007 Andrew Morton <akpm@linux-foundation.org>

[ALSA] sc6000 build fix

sound/isa/sc6000.c: In function 'sc6000_dsp_reset':
sound/isa/sc6000.c:270: error: implicit declaration of function 'udelay' sound/isa/sc6000.c: In function 'sc6000_init_mss':
sound/isa/sc6000.c:327: error: implicit declaration of function 'msleep'
{standard input}: Assembler messages:

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e307258d 11-Sep-2007 Krzysztof Helt <krzysztof.h1@wp.pl>

[ALSA] Gallant SC-6000 driver

This is port of the Gallant SC-6000 driver from the OSS aedsp16 driver.
This card was also sold as AudioExcel DSP 16 and Zoltrix AV302 (Audio
Plus True 16).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>