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

ALSA: opl3sa2: Allocate resources with device-managed APIs

This patch converts the resource management in ISA opl3sa2 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-69-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b3bd108 08-Jun-2021 Takashi Iwai <tiwai@suse.de>

ALSA: opl3sa2: Fix assignment in if condition

ISA OPL3SA2 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-10-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>


# fdd1f6fd 03-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: isa: Constify snd_kcontrol_new items

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-36-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d3e163bf 09-Dec-2019 Takashi Iwai <tiwai@suse.de>

ALSA: opl3sa2: Support PCM sync_stop

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


# 607b5d7f 17-Aug-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_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>


# 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


# 6cbbfe1c 28-Jan-2015 Takashi Iwai <tiwai@suse.de>

ALSA: Include linux/io.h instead of asm/io.h

Nowadays it's recommended. Replace all in a shot.

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>


# 65a77217 15-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

sound: fix drivers needing module.h not moduleparam.h

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>


# 88e24c3a 22-Sep-2011 Yong Zhang <yong.zhang0@gmail.com>

sound: irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>


# b595076a 01-Nov-2010 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

tree-wide: fix comment/printk typos

"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 5a0e3ad6 24-Mar-2010 Tejun Heo <tj@kernel.org>

include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>


# 1661c615 24-Mar-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: opl3sa2: add ZV port control

Add ZV port control switch.

This patch is done after solution
given in the ALSA bug #2872 report.
The patch resolves the issue.

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


# dde332b6 16-Mar-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: opl3sa2 - Fix NULL dereference when suspending snd_opl3sa2

Fix the OOPS during a opl3sa2 card suspend
and resume if the driver is loaded but the card
is not found.

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


# 1713c0d5 27-Feb-2009 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: opl3sa2 fix irq releasing and short name of card

Two simple fixes:

1. Use the same pointer for the free_irq() and
the request_irq() calls.

2. A short name of card is appended with '2' or '3'
character depending on a detected chip. Remove
the '2' character from the short name.

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


# 4c9f1d3e 05-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: isa/*: Add missing KERN_* prefix to printk

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>


# f87426e0 19-Aug-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: opl3sa2: replace nd_opl3sa2_info_xxx() with snd_wss_info_xxx()

Replace snd_opl3sa2_info_xxx() with snd_wss_info_xxx().
Drop check of card->private_data which cannot be NULL
if card is not NULL (spotted by Rene Herman).

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>


# 503c10d8 17-Aug-2008 Krzysztof Helt <krzysztof.h1@wp.pl>

ALSA: opl3sa2: drop snd_card pointer from the snd_opl3sa2 structure

Remove card pointer from the snd_opl3sa2
structure and break circular reference
snd_card->snd_opl3sa2->snd_card.

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


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

ALSA: wss_lib: rename cs4321_foo to wss_foo

Rename functions and structures from the former
cs4321_lib to names more corresponding with the
new name: wss_lib.

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>


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

ALSA: wss_lib: rename cs4231.h into wss.h

Rename file include/sound/cs4231.h
into include/sound/wss.h

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>


# 109c53f84 30-Nov-2007 Rene Herman <rene.herman@gmail.com>

[ALSA] sound/isa: kill pnp_resource_change

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>


# c1017a4c 15-Oct-2007 Jaroslav Kysela <perex@perex.cz>

[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz


Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e2340465 26-Jul-2007 Paul Vojta <vojta@math.berkeley.edu>

[ALSA] Fix bugs in mode change/recalibration for opl3sa2 driver

The mode change / recalibration doesn't work always with opl3sa2 devices,
e.g. the first time it's played back. The patch fixes the problem.

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4700418c 04-Jul-2007 Paul Vojta <vojta@math.berkeley.edu>

[ALSA] opl3sa2 - Add Neomagic MagicWave 3D ISA PnP ID

Add Neomagic MagicWave 3D to list of supported devices for opl3sa2
driver.

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ea7fc333 27-Jun-2007 Randy Dunlap <randy.dunlap@oracle.com>

ALSA: use __devexit_p

Change __devexit to __devexit_p:
sound/isa/opl3sa2.c:956: error: expected expression before '__attribute__'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 609d7694 15-May-2007 Rene Herman <rene.herman@gmail.com>

[ALSA] Fix probe of non-PnP ISA devices

isa_register_driver() returns an error if no device is found
and it's no fatal error for the drivers with pnp support.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 83c51c0a 20-Mar-2007 Rene Herman <rene.herman@gmail.com>

[ALSA] isa_bus device/driver naming

isa_bus: delete snd_ prefix from the (sysfs visible) device/driver names.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5e24c1c1 21-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Port the rest of ALSA ISA drivers to isa_driver

Port the rest of ALSA ISA drivers to use isa_driver framework
instead of platform_driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 788c6043 13-Feb-2007 Prarit Bhargava <prarit@redhat.com>

[ALSA] Fix __devinit and __devexit issues with sound drivers

Fix __devinit and __devexit issues with sound drivers.
Resolves MODPOST warnings similar to:
WARNING: sound/drivers/snd-dummy.o - Section mismatch: reference to .init.text:snd_dummy_probe from .data.rel.local between 'snd_dummy_driver' (at offset 0x0) and 'snd_dummy_controls'
WARNING: sound/drivers/snd-mtpav.o - Section mismatch: reference to .init.text:snd_mtpav_probe from .data.rel.local between 'snd_mtpav_driver' (at offset 0x0) and 'snd_mtpav_input'
WARNING: sound/drivers/snd-virmidi.o - Section mismatch: reference to .init.text:snd_virmidi_probe from .data.rel.local after 'snd_virmidi_driver' (at offset 0x0)

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0cb29ea0 29-Jan-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Add even more 'const' to everything related to TLV

Mark TLV data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7d12e780 05-Oct-2006 David Howells <dhowells@redhat.com>

IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)


# a1c7a7d8 22-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add dB scale information to opl3sa2 driver

Added the dB scale information to opl3sa2 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 65ca68b3 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de>

[PATCH] irq-flags: sound: Use the new IRQF_ constants

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>


# 2e74eba3 09-Jun-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix invalid __init in ALSA ISA drivers

Replaced invalid __init with __devinit in snd-sbawe and snd-opl3sa2
drivers.

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


# 6581f4e7 17-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove zero-initialization of static variables

Removed zero-initializations of static variables.
A tiny optimization.

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


# dcccdd93 11-Apr-2006 Rene Herman <rene.herman@keyaccess.nl>

[ALSA] unregister platform device again if probe was unsuccessful

Unregister the platform device again if the probe was unsuccessful.

This restores the behaviour of not loading the driver on probe() failure.

Signed-off-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d0ac642d 11-Apr-2006 Rene Herman <rene.herman@keyaccess.nl>

[ALSA] continue on IS_ERR from platform device registration

Continue with the next one on error from device registration.

This would seem the correct thing to do, even if it's not the probe()
error that we're getting.

Signed-off-by: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c59c4a2 27-Mar-2006 Bjorn Helgaas <bjorn.helgaas@hp.com>

[PATCH] pnp: opl3sa2: adjust pnp_register_driver signature

Remove the assumption that pnp_register_driver() returns the number of devices
claimed.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 8278ca8f 20-Feb-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix check of enable module option

Fix the check of enable module option in probe of platform_device drivers.
It shouldn't break the loop but just ignore if enable[i] is false.

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


# 1d79716a 25-Jan-2006 Alexey Dobriyan <adobriyan@gmail.com>

[ALSA] Fix adding second dma channel

Modules: OPL3SA2 driver,GUS Classic driver

dma2 is a global array. sprintf below suggests there was a typo.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 62af9905 20-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] opl3sa2 - Fix conflict of driver name on sysfs

Modules: OPL3SA2 driver

Fix the conflict of driver name 'opl3sa2' on sysfs with OSS driver.

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


# 59b1b34f 04-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix compilation without CONFIG_PNP

Fix compilation of some ISA drivers without CONFIG_PNP.

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


# f7a9275d 07-Dec-2005 Clemens Ladisch <clemens@ladisch.de>

[ALSA] unregister platform devices

Call platform_device_unregister() for all platform devices that we've
registered.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>


# 73e77ba0 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Add error messages

Add error messages in the critial error path to be more verbose.

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


# 704e0520 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] opl3sa2 - Use platform_device

Modules: OPL3SA2 driver

Rewrite the probe/remove with platform_device.

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


# ec6c5ae3 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove xxx_t typedefs: ISA OPL3SA2

Modules: OPL3SA2 driver

Remove xxx_t typedefs from the ISA OPL3SA2 driver.

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


# b1d5776d 10-Oct-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove vmalloc wrapper, kfree_nocheck()

- Remove vmalloc wrapper
- Add release_and_free_resource() to remove kfree_nocheck() from each driver
and simplify the code

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


# 06f619cc 12-Sep-2005 Daniel Ritz <daniel.ritz@gmx.ch>

[ALSA] snd_opl3sa2: add missing pnp_unregister_driver() calls

OPL3SA2 driver

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9e76a76e 09-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Replace with kzalloc() - isa stuff

ES18xx driver,OPL3SA2 driver,AD1816A driver,AD1848 driver,CS4231 driver
ES1688 driver,GUS Library,Opti9xx drivers,EMU8000 driver
SB16/AWE driver,SB drivers
Replace kcalloc(1,..) with kzalloc().

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


# 43bcd973 05-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Add snd_card_set_generic_dev() call to ISA drivers

ISA,CMI8330 driver,ES18xx driver,OPL3SA2 driver,Sound Galaxy driver
Sound Scape driver,AD1848 driver,CS4231 driver,CS4236+ driver
ES1688 driver,GUS Classic driver,GUS Extreme driver,GUS MAX driver
AMD InterWave driver,Opti9xx drivers,SB16/AWE driver,SB8 driver
Wavefront drivers
- Added snd_card_set_generic_dev() call.
- Added SND_GENERIC_DRIVER to Kconfig.
- Clean up the error path in probe if necessary.

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


# cff79742 15-Aug-2005 Jaroslav Kysela <perex@suse.cz>

[ALSA] opl3sa2 - use different name for PnP BIOS driver

OPL3SA2 driver
- use different name (opl3sa2-pnpbios) for PnP BIOS driver
- don't print warning when manual config of resources fails (PnP BIOS)

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 53b26663 12-Aug-2005 Jaroslav Kysela <perex@suse.cz>

[ALSA] opl3sa2 - fixed typo in PnP BIOS IDs (YMF0021 -> YMH0021)

OPL3SA2 driver

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 1265509c 12-Aug-2005 Jaroslav Kysela <perex@suse.cz>

[ALSA] opl3sa2 driver - added support for PnP BIOS devices

OPL3SA2 driver
The driver has been extended to support also PnP BIOS devices.
The detection path is:

1) detect PnP BIOS devices
2) detect ISA PnP devices

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

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!