1
0
Fork 0
Commit Graph

43 Commits (538b75341835e3c2041ff066408de10d24fdc830)

Author SHA1 Message Date
Benoit Taine 9baa3c34ac PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines.  This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// <smpl>

@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@

- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;

// </smpl>

[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-08-12 12:15:14 -06:00
Takashi Iwai 00980aa9c7 ALSA: cs5535audio: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26 16:45:25 +01:00
Takashi Iwai 60c5772b50 ALSA: pci: 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>
2014-02-12 11:17:52 +01:00
Julia Lawall ec06b2bea7 ALSA: cs5535audio: use named constants for pci_power_t values
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression pdev;
@@

pci_set_power_state(pdev,
- 3
+ PCI_D3hot
 )
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05 11:43:28 +01:00
Takashi Iwai 20a24225d8 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove
As drvdata is cleared to NULL at probe failure or at removal by the
driver core, we don't have to call pci_set_drvdata(pci, NULL) any
longer in each driver.

The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
hda_intel.c.  Since this function itself releases the card instance,
we need to clear drvdata here as well, so that it won't be released
doubly in the remove callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-29 12:37:32 +02:00
Bill Pemberton e23e7a1436 ALSA: pci: 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>
2012-12-07 07:20:55 +01:00
Takashi Iwai c7561cd804 ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP
Otherwise we may get compile warnings due to unused functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14 18:12:04 +02:00
Takashi Iwai 68cb2b5592 ALSA: Convert to new pm_ops for PCI drivers
Straightforward conversion to the new pm_ops from the legacy
suspend/resume ops.

Since we change vx222, vx_core and vxpocket have to be converted,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03 08:23:03 +02:00
Takashi Iwai e9f66d9b9c ALSA: pci: clean up using module_pci_driver()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-24 12:25:00 +02:00
Rusty Russell a67ff6a540 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>
2011-12-19 10:34:41 +01:00
Paul Gortmaker 65a772172b 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>
2011-10-31 19:31:19 -04:00
Takashi Iwai 934c2b6d0c ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*
The name argument of request_irq() appears in /proc/interrupts, and
it's quite ugly when the name entry contains a space or special letters.
In general, it's simpler and more readable when the module name appears
there, so let's replace all entries with KBUILD_MODNAME.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:36:37 +02:00
Takashi Iwai 3733e424c4 ALSA: Use KBUILD_MODNAME for pci_driver.name entries
The convention for pci_driver.name entry in kernel drivers seem to be
the module name or equivalent ones.  But, so far, almost all PCI sound
drivers use more verbose name like "ABC Xyz (12)", and these are fairly
confusing when appearing as a file name.

This patch converts the all pci_driver.name entries in sound/pci/* to
use KBUILD_MODNAME for more unified appearance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10 16:20:20 +02:00
Alexey Dobriyan cebe41d4b8 sound: use DEFINE_PCI_DEVICE_TABLE
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 11:08:33 +01:00
Andres Salomon 3c55494670 ALSA: cs5535audio: free OLPC quirks from reliance on MGEODE_LX cpu optimization
Previously, OLPC support for the mic extensions was only enabled in the
ALSA driver if CONFIG_OLPC and CONFIG_MGEODE_LX were both set.  This was
because the old geode GPIO code was written in a manner that assumed
CONFIG_MGEODE_LX.  With the new cs553x-gpio driver, this is no longer the
case; as such, we can drop the requirement on CONFIG_MGEODE_LX and instead
include a requirement on GPIOLIB.

We use the generic GPIO API rather than the cs553x-specific API.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:27 -08:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Takashi Iwai e0d2054fd3 Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
Takashi Iwai ee419653a3 ALSA: Fix missing KERN_* prefix to printk in sound/pci
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 16:11:31 +01:00
Takashi Iwai e58de7baf7 ALSA: Convert to snd_card_create() in sound/pci/*
Convert from snd_card_new() to the new snd_card_create() function
in sound/pci/*.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:20:55 +01:00
Andres Salomon b5ccc57b06 ALSA: cs5535audio: clean up OLPC code
- add copyright info to _olpc.c
 - minor layout fixes
 - make Makefile more concise
 - silence a warning

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:48 +01:00
Andres Salomon 3556d18465 ALSA: cs5535audio: invert EAPD for OLPC (newer than B3)
Fix an audible pop described in <http://dev.laptop.org/ticket/977>.  Originally
based upon fixes by Mitch Bradley and Chris Ball.

Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:40 +01:00
Jaya Kumar 57d4bf6d8e ALSA: cs5535audio: OLPC analog input support
This is a 2nd cut at adding support for OLPC analog input.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:39 +01:00
Jaya Kumar b035ce0f26 ALSA: cs5535audio: turn off PCM properly if closing the audio device
As per <http://dev.laptop.org/ticket/1420>, we need to properly turn off
the PCM if we're closing the device in order to save power.  This also
causes the MIC led to turn off properly.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:37 +01:00
Randy Dunlap 5be55be58c [ALSA] fix cs5535 section mismatch
snd_cs5535audio_mixer() is only called by __devinit snd_cs5535audio_probe(),
so the mixer function can also be __devinit.
WARNING: vmlinux.o(.text+0xfdbba0): Section mismatch: reference to .init.data:ac97_quirks (between 'snd_cs5535audio_mixer' and 'process_bm0_irq')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:30:12 +01:00
Takashi Iwai 9004acc70e [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>
2008-01-31 17:29:48 +01:00
Andres Salomon 4ea2416398 [ALSA] cs5535audio: drop unused bus master stuff
We really only care about the first two bus masters (playback and capture).
There's no need to have unused BM code lying around, so let's get rid of it.
If for some reason we trigger an IRQ for some BM that we're not using.. well,
that warrants spitting out an error message (imo).

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:54 +02:00
Takashi Iwai 437a5a4606 [ALSA] Remove IRQF_DISABLED for shared PCI irqs
Fix IRQ flags for PCI devices.
The shared IRQs for PCI devices shouldn't be allocated with
IRQF_DISABLED.  Also, when MSI is enabled, IRQF_SHARED shouldn't
be used.
The patch removes unnecessary cast in request_irq and free_irq,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:57 +01:00
David Howells 7d12e780e0 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)
2006-10-05 15:10:12 +01:00
Takashi Iwai f40b68903c [ALSA] Fix section mismatch errors in ALSA PCI drivers
Fixed 'section mismatch' errors in ALSA PCI drivers:
- removed invalid __devinitdata from pci id tables
- fix/remove __devinit of functions called in suspend/resume

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-12 20:08:01 +02:00
Thomas Gleixner 65ca68b300 [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>
2006-07-02 13:58:54 -07:00
Jaya Kumar 40a4f7a014 [ALSA] cs5535audio - trivial debug printk
Following is a trivial patch to get more info for boards where
the AC97_VENDOR_ID2 register (or others) time out.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:24 +02:00
Takashi Iwai 302e4c2f9e [ALSA] Change an arugment of snd_mpu401_uart_new() to bit flags
Change the 5th argument of snd_mpu401_uart_new() to bit flags
instead of a boolean.  The argument takes bits that consist of
MPU401_INFO_XXX flags.
The callers that used the value 1 there are replaced with
MPU401_INFO_INTEGRATED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:56 +02:00
Jaya Kumar 77389b4323 [ALSA] Single variables for cs5535audio
As per Takashi's feedback, this is a cleanup to make cs5535audio be
single device per system. The diff is against 2.6.17-rc4 with
Takashi's patch adding the module_params for index, id and enable.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:52 +02:00
Takashi Iwai 1dbfd8c56b [ALSA] cs5535audio - Add missing module_param*() and MODULE_PARM_DESC()
Added missing module_param*() and MODULE_PARM_DESC() for
cs5535audio driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:23 +02:00
Jaya Kumar 9ac25594e6 [ALSA] PM support for cs5535audio
Appended is my patch adding PM support to the cs5535audio driver.
I also added the ac97 quirk but it's not yet confirmed which
boards need to be in the quirk list. The patch also includes some
Kconfig and misc cleanup.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:32:49 +02:00
Henrik Kretzschmar 396c9b928d [ALSA] add __devinitdata to all pci_device_id
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:34 +02:00
David Vrabel 1037593c8b [ALSA] CS5535: shorter delays when accessing AC'97 codec registers
Modules: CS5535 driver

The 10 ms sleeps while waiting for AC'97 codec register reads/writes to
complete are excessive given the maxmium time is one AC'97 frame (~21 us).

With AC'97 codecs with integrated touchscreens (like the UCB1400) this
improves the interactive performance of the touchscreen.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:34:45 +01:00
Rene Rebe 363fa1d615 [ALSA] AMD cs5536 ID for cs5535audio
Modules: CS5535 driver

Added AMD CS5536 to the cs5535audio driver.

Signed-off-by: Rene Rebe <rene@exactcode.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-22 16:24:11 +01:00
Ben Gardner e329113ca4 [PATCH] i386: GPIO driver for AMD CS5535/CS5536
A simple driver for the CS5535 and CS5536 that allows a user-space program
to manipulate GPIO pins.  The CS5535/CS5536 chips are Geode processor
companion devices.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:24 -08:00
Clemens Ladisch ac09a9251d [ALSA] cs5535audio: move sound/driver.h to the top
Modules: CS5535 driver

Move the #include of <sound/driver.h> to the top which is
required for compilation on earlier kernels.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:11 +01:00
Takashi Iwai 66f8df6bdd [ALSA] Remove xxx_t typedefs: PCI CS5535
Modules: CS5535 driver

Remove xxx_t typedefs from the PCI CS5535 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:19:04 +01:00
Takashi Iwai 3e8731740e [ALSA] Minor clean up and fixes for CS5535 audio driver
Modules: Documentation,CS5535 driver

Minor clean up and fixes for CS5535 audio driver.
Added an entry in ALSA-Configuration.txt, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:16:29 +01:00
Jaya Kumar 9b4ffa48ae [ALSA] Add support for the CS5535 Audio device
Add support for the CS5535 Audio device.  I've fixed up some errors as per
Takashi's advice from the thread:

http://lkml.org/lkml/2005/9/15/119

 From: Alan Cox <alan@lxorguk.ukuu.org.uk>

        cs5535 is a 32bit x86 only device using weird CPU features

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:16:27 +01:00