Commit graph

55 commits

Author SHA1 Message Date
Jean Delvare 6473d160b4 PCI: Cleanup the includes of <linux/pci.h>
I noticed that many source files include <linux/pci.h> while they do
not appear to need it. Here is an attempt to clean it all up.

In order to find all possibly affected files, I searched for all
files including <linux/pci.h> but without any other occurence of "pci"
or "PCI". I removed the include statement from all of these, then I
compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
false positives manually.

My tests covered 66% of the affected files, so there could be false
positives remaining. Untested files are:

arch/alpha/kernel/err_common.c
arch/alpha/kernel/err_ev6.c
arch/alpha/kernel/err_ev7.c
arch/ia64/sn/kernel/huberror.c
arch/ia64/sn/kernel/xpnet.c
arch/m68knommu/kernel/dma.c
arch/mips/lib/iomap.c
arch/powerpc/platforms/pseries/ras.c
arch/ppc/8260_io/enet.c
arch/ppc/8260_io/fcc_enet.c
arch/ppc/8xx_io/enet.c
arch/ppc/syslib/ppc4xx_sgdma.c
arch/sh64/mach-cayman/iomap.c
arch/xtensa/kernel/xtensa_ksyms.c
arch/xtensa/platform-iss/setup.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-mpc.c
drivers/media/video/saa711x.c
drivers/misc/hdpuftrs/hdpu_cpustate.c
drivers/misc/hdpuftrs/hdpu_nexus.c
drivers/net/au1000_eth.c
drivers/net/fec_8xx/fec_main.c
drivers/net/fec_8xx/fec_mii.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/fs_enet/mac-fcc.c
drivers/net/fs_enet/mac-fec.c
drivers/net/fs_enet/mac-scc.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/lasi_82596.c
drivers/parisc/hppb.c
drivers/sbus/sbus.c
drivers/video/g364fb.c
drivers/video/platinumfb.c
drivers/video/stifb.c
drivers/video/valkyriefb.c
include/asm-arm/arch-ixp4xx/dma.h
sound/oss/au1550_ac97.c

I would welcome test reports for these files. I am fine with removing
the untested files from the patch if the general opinion is that these
changes aren't safe. The tested part would still be nice to have.

Note that this patch depends on another header fixup patch I submitted
to LKML yesterday:
  [PATCH] scatterlist.h needs types.h
  http://lkml.org/lkml/2007/3/01/141

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 19:02:35 -07:00
Takashi Iwai c6d6eeeacc [ALSA] ca0106 - Add missing sysfs device assignment
Added the missing device assignment before creating sysfs tree.
This caused the insufficient device permissions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:04:03 +01:00
Takashi Iwai 0cb29ea0d4 [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>
2007-02-09 09:03:19 +01:00
James Courtier-Dutton 7c157069bc [ALSA] ca0106: Fix sound capture on Audigy LS via AC97.
Fixes ALSA bug#2286

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:23 +01:00
James Courtier-Dutton e6327cf90b [ALSA] snd-ca0106: Updated Enum control names.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:25 +01:00
James Courtier-Dutton d5f6a38d98 [ALSA] snd-ca0106: Fix typos.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:56:09 +01:00
James Courtier-Dutton e4f55d8010 [ALSA] snd-ca0106: Add new card variant.
Fixed ALSA bug#2326

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:56:08 +01: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
Takashi Iwai 01f681da49 [ALSA] Fix invalid assignment of PCI revision
Fix the type of PCI revision to char from int and avoid invalid
assignment with pointer cast.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:55 +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 7cf0a95310 [ALSA] Fix compile errors with older gcc
Fixed compile errors with older gcc for initialization of a union.
sound/pci/ca0106/ca0106_mixer.c: At top level:
sound/pci/ca0106/ca0106_mixer.c:499: unknown field 'p' specified in initializer
sound/pci/ca0106/ca0106_mixer.c:499: warning: missing braces around initializer
sound/pci/ca0106/ca0106_mixer.c:499: warning: (near initialization for 'snd_ca0106_volume_ctls[0].tlv')

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:41:19 +02:00
James Courtier-Dutton fff36e472b [ALSA] snd-ca0106: Fix dB gain TLVs.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:38:26 +02:00
Jaroslav Kysela 302e9c5af4 [ALSA] HDA codec & CA0106 - add/fix TLV support
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:36 +02:00
Jaroslav Kysela 42750b04c5 [ALSA] Control API - TLV implementation for additional information like dB scale
This patch implements a TLV mechanism to transfer an additional information
like dB scale to the user space. The types might be extended in future.
Acked-by: Takashi Iwai <tiwai@suse.de>

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:42 +02: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
James Courtier-Dutton 5839889566 [ALSA] snd-ca0106: Update playback to 24bit. Fix typo is comment.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:34:18 +02:00
Takashi Iwai bf850204a7 [ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:09 +02:00
James Courtier-Dutton be0b7b0113 [ALSA] ca0106: Fixes MSI K8N's SB Live 24 bit, no sound from line-in.
Fixed bug#1331

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:32:39 +02:00
James Courtier-Dutton 6129daaa0d [ALSA] ca0106: Add analog capture controls.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:32:35 +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
James Courtier-Dutton be3cd57aa6 [ALSA] snd-ca0106: Fixed ALSA bug#1600
Modules: CA0106 driver

Description:
Shuttle XPC SD11G5 which has an onboard Creative Labs
Sound Blaster Live! 24-bit EAX
high-definition 7.1 audio processor'.
Fixes ALSA bug#1600

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-22 16:23:58 +01:00
James Courtier-Dutton aad9095322 [ALSA] snd-ca0106: Fix SPI driver code. Fixes speaker output.
Modules: CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03 12:31:08 +01:00
James Courtier-Dutton a5875159dd [ALSA] snd-ca0106: Fixes sound output for Creative Audigy SE aka.SB0570.
Modules: CA0106 driver

Fixes ALSA bug#1636

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03 12:30:58 +01:00
James Courtier-Dutton 39596dc898 [ALSA] snd-ca0106: update SPDIF to IEC958 in mixer control names.
Modules: CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03 12:30:57 +01:00
Takashi Iwai adf1b3d25e [ALSA] Optimize for config without PROC_FS (pci drivers)
Optimize the code when compiled without CONFIG_PROC_FS for some pci drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:08 +01:00
Takashi Iwai e4a3d14545 [ALSA] Remove xxx_t typedefs: PCI CA0106
Modules: CA0106 driver

Remove xxx_t typedefs from the PCI CA0106 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:19:01 +01:00
Takashi Iwai 95a98265eb [ALSA] ca0106 - Code clean up
Modules: CA0106 driver

Clean up snd-ca0106 driver code:

- Fix spaces and indents
- Remove unnecessary spinlocks
- Clean up the mixer callbacks using private_value
- Clean up mixer constructors using an array

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:17:01 +01:00
Takashi Iwai c3e6f7d876 [ALSA] Remove superfluous pcm_free callbacks
Remove superflous pcm_free callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:16:21 +01:00
Greg Kroah-Hartman 249bb070f5 [PATCH] PCI: removed unneeded .owner field from struct pci_driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:17 -08:00
James Courtier-Dutton 7b4260f2cc [ALSA] ca0106: Added copyright messages.
Modules: CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-11-04 13:19:39 +01:00
James Courtier-Dutton 7cf4783b31 [ALSA] ca0106: Cosmetic changes.
Modules: CA0106 driver

Just tidying up the code. Making more functions static.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-11-04 13:19:37 +01:00
James Courtier-Dutton 8a5afd29dc [ALSA] snd-ca0106: Add midi support.
Modules: PCI drivers,CA0106 driver

Author: Tilman Kranz <tilde@tk-sls.de>

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-11-04 13:19:26 +01:00
Takashi Iwai 99b359ba10 [ALSA] Add missing KERN_* suffix to printk
Add missing KERN_* suffix to printk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:19:23 +01:00
Takashi Iwai b1d5776d86 [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>
2005-11-04 13:18:00 +01:00
Takashi Iwai e560d8d836 [ALSA] Replace with kzalloc() - pci stuff
AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:48:16 +02:00
James Courtier-Dutton 025cd2f6b1 [ALSA] snd-ca0106, snd-emu10k1: Add symlink in the sys tree.
CA0106 driver,EMU10K1/EMU10K2 driver
A thread appeared on the LKML. This patch implements the fix.

Question:
in sysfs, /sys/bus/*/drivers lists the driver names, with their exported .name (eg. '.name = 'EMU10K1_Audigy'' in the module code, from now on 'driver name'). In /sys/modules, the kernel modules are listed with their module name, eg. snd_emu10k1. However, it seems to me that in sysfs, there is no way in particular to tell, which module has which .name. That is, that snd_emu10k1 is EMU10K1_Audigy and vice versa.

I wonder whether it wouldn't be possible to add a symlink to the particular module from the driver, and/or from the module to the driver, so the list of devices handled by the module and the module name would be accessible. This way, I would know which driver name corresponds to which module name and vice versa.

Answer:
For PCI drivers, just add the line:
	.owner = THIS_MODULE,

to their struct pci_driver definition and you will get the symlink
created for you.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-09-12 10:41:07 +02:00
James Courtier-Dutton 9f566cfde1 [ALSA] snd-ca0106: Tidy up volume controls
CA0106 driver
Playback volume controls were appearing in both the playback and capture
displays of alsamixer. Now those playback controls only appear in the
playback display.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-09-12 10:23:55 +02:00
James Courtier-Dutton 1b05962e8b [ALSA] Add new ID. Fixes ALSA bug #1298
CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-08-30 08:45:35 +02:00
Clemens Ladisch 5549d54992 [ALSA] use PCM interface for IEC958 controls
Digigram VX core,ENS1370/1+ driver,CA0106 driver,EMU10K1/EMU10K2 driver
RME HDSP driver,RME9652 driver
For consistency, use the PCM interface instead of MIXER for IEC958
default/mask/stream mixer controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-08-30 08:43:39 +02:00
James Courtier-Dutton c82bf829c0 [ALSA] ca0106: Fix 96000 Hz audio playback.
CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22 12:28:18 +02:00
Jesper Juhl 4d572776d4 [ALSA] Remove redundant NULL checks before kfree
Timer Midlevel,ALSA sequencer,ALSA<-OSS sequencer,Digigram VX core
I2C tea6330t,GUS Library,VIA82xx driver,VIA82xx-modem driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,YMFPCI driver
Digigram VX Pocket driver,Common EMU synth,USB generic driver,USB USX2Y
Checking a pointer for NULL before calling kfree() on it is redundant,
kfree() deals with NULL pointers just fine.
This patch removes such checks from sound/

This patch also makes another, but closely related, change.
It avoids casting pointers about to be kfree()'ed.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-06-22 12:27:43 +02:00
Tobias Klauser 299676b1d7 [ALSA] sound/pci/ca0106: Use the DMA_32BIT_MASK constant
CA0106 driver
Use the DMA_32BIT_MASK constant from dma-mapping.h
when calling pci_set_dma_mask() or pci_set_consistent_dma_mask()
See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-06-22 12:27:24 +02:00
James Courtier-Dutton 8fabab15dc [ALSA] Be more specific with which I2C channel to use.
CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22 12:27:14 +02:00
James Courtier-Dutton 883130b476 [ALSA] Implement S32_LE(24bit) and 96000 capture rates etc.
CA0106 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22 12:27:12 +02:00
James Courtier-Dutton ed144f3cdc [ALSA] Add Mic capture support.
CA0106 driver
Notes: This adds a new mixer item to switch between Mic and Line-in.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22 12:27:09 +02:00
James Courtier-Dutton 7199acdc74 [ALSA] Implement support for Line-in capture on SB Live 24bit.
CA0106 driver
Notes: MIC capture not tested yet.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22 12:27:06 +02:00
James Courtier-Dutton 1baa705b75 [ALSA] Tidy up card recognition.
CA0106 driver


Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29 10:11:35 +02:00
James Courtier-Dutton 8f55fbb0fd [ALSA] When the alsamixer says 'SPDIF Out [Off]', SPDIF output should be off and Analog output should be on.
CA0106 driver
         This fixes a bug whereby when the snd-ca0106 module first loads,
         alsamixer says 'SPDIF Out [Off]' but no analog sound comes from the speakers.

         This covers any bug reports that said things like
         'mixer fails to remember analog output on, when the system is rebooted.'

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29 10:11:32 +02:00
James Courtier-Dutton 1f82941e82 [ALSA] Implement surround71 outputs on SB Live 24bit.
CA0106 driver
Notes: Requires updated alsa-lib.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29 10:11:29 +02:00