Commit Graph

56 Commits

Author SHA1 Message Date
Georg Chini 3daadf3301 [SOUND] CS4231 SBus: Two fixes.
Remove unnecessary sbus_dma_reset function and change sbus_dma_enable
to avoid occasional system crashes when stopping recording.

Signed-off-by: Georg Chini <georg.chini@triaton-webhosting.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-03 14:08:33 -07:00
Takashi Iwai a43ae90543 [ALSA] Fix compilation error in sparc/cs4231.c
Removed the unnecessary line I forgot in the last clean-up patch
wrt snd_pcm_group_for_each_entry().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:44 +02:00
Takashi Iwai ef991b95aa [ALSA] Add snd_pcm_group_for_each_entry() for code cleanup
Added a new macro snd_pcm_group_for_each_entry() just for code cleanup.
Old macros, snd_pcm_group_for_each() and snd_pcm_group_substream_entry(),
are removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:42 +02:00
Robert P. J. Day beb7dd86a1 Fix misspellings collected by members of KJ list.
Fix the misspellings of "propogate", "writting" and (oh, the shame
:-) "kenrel" in the source tree.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 07:14:03 +02:00
Stephen Rothwell 3198514d2d [SPARC/64] constify of_get_property return: sound
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26 01:54:32 -07:00
Krzysztof Helt ca40587087 [ALSA] sparc dbri comment fix
This is a comment fix to avoid misleading about locking in the
dbri_cmdsend.

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>
2007-02-09 09:02:37 +01:00
David S. Miller f9af1d9dea [SOUND] Sparc CS4231: Use 64 for period_bytes_min
This matches what the ISA cs4231 driver uses.

Tested by Georg Chini.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:51:54 -08:00
Georg Chini d35a1b9e10 [SOUND] Sparc CS4231: Fix IRQ return value and initialization.
SBUS: Change IRQ-handler return value from 0 to IRQ_HANDLED and
fix some initialisation problems.

Change period_bytes_min from 4096 to 256 to allow driver to work with
low latency (VOIP) applications. Hope this does not break EBUS.

Signed-off-by: Georg Chini <georg.chini@triaton-webhosting.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-01-03 18:37:26 -08: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
Tobias Klauser 6c2d8b5dca [PATCH] sound/sparc/dbri: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0])

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:14 -07:00
David S. Miller be5b6d3d6c [SOUND] sparc/amd7930: Use __devinit and __devinitdata as needed.
Fixes section-mismatch errors.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-25 16:39:58 -07:00
Al Viro ae97dd9af1 [PATCH] NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24 15:55:03 -07:00
Krzysztof Helt ea543f1ee6 [ALSA] sparc dbri: SMP fixes
The dbri driver hangs when used in kernel compiled with SMP
support due to inproper locking. The patch fixes it.

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>
2006-09-23 10:45:57 +02:00
Krzysztof Helt 1f14d167f0 [ALSA] sparc dbri: OSS layer fix
This patch removes setting of incorrect stop_threshold value
inside the driver. After the change, playback through the OSS
layer works correctly.

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>
2006-09-23 10:44:40 +02:00
Krzysztof Helt 99dabfe716 [ALSA] dbri sparc: fixes TS leak
This patch fixes time slot leak in the dbri driver.

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>
2006-09-23 10:44:35 +02:00
Krzysztof Helt aaad3653a5 [ALSA] sparc dbri: recording is back
This patch fixes sound recording after the driver convertion to
ring buffered version. It also contains small clean ups to the
driver.

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>
2006-09-23 10:44:31 +02:00
Krzysztof Helt ab93c7ae54 [ALSA] sparc dbri: hardware constrains added
This patch adds ALSA hardware constrains so stereo is possible
only with 16-bit format. It contains small cleanups to ring
buffered code as well.

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>
2006-09-23 10:42:38 +02:00
Krzysztof Helt 1be54c824b [ALSA] sparc dbri: ring buffered version
It is a complete rework of low level layer to work on ring
buffers for comands and data descriptors. This removes annoying
noise due to delay in data buffer switching.

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>
2006-09-23 10:42:33 +02:00
Krzysztof Helt 294a30dc8c [ALSA] sparc dbri: simplifed linking time slot function
A simplified routines to link and unlink time slots.

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>
2006-09-23 10:42:28 +02:00
Krzysztof Helt d1fdf07e22 [ALSA] sparc dbri: fixed setting of burst size after reset
A proper way to set DBRI's burst size. The size must be set after
each chip reset.

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>
2006-09-23 10:42:24 +02:00
Krzysztof Helt 470f1f1a1c [ALSA] sparc dbri: more driver cleanup
A general clean up and redudant code removal.

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>
2006-09-23 10:42:19 +02:00
Krzysztof Helt c27354460b [ALSA] sparc dbri: removal of dri_desc struct
The structure is in big part redudant.

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>
2006-09-23 10:42:15 +02:00
Krzysztof Helt 16727d94ad [ALSA] sparc dbri: removal of redudant volatile keywords
It removes redudant volatile keywords.

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>
2006-09-23 10:41:28 +02:00
Krzysztof Helt 5fc3a2b250 [ALSA] sparc dbri: removal of unused struct members
It removes unused or rarely used members of defined structures.

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>
2006-09-23 10:41:23 +02:00
Krzysztof Helt 6fb9828035 [ALSA] sparc dbri removal of DBRI_NO_INTS
This patch removes define DBR_NO_INTS and all code related to
handling more than one dbri irq statuses block.

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>
2006-09-23 10:40:56 +02:00
Krzysztof Helt 42fe764791 [ALSA] dbri driver cleanup
This is a small clean up of the dbri driver for sparc machines.
It contains also a fix to DBRI interrupt queue initialization.

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>
2006-09-23 10:40:51 +02:00
Andrew Morton 5863aa651b [PATCH] sparc: resource warning fix
sound/sparc/amd7930.c: In function 'amd7930_attach_common':
sound/sparc/amd7930.c:1040: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

sound/sparc/cs4231.c:2043: warning: format '%016lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

sound/sparc/dbri.c: In function 'dbri_attach':
sound/sparc/dbri.c:2650: warning: format '%016lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:00 -07: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
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Adrian Bunk d254c8f70a typo fixes: specfic -> specific
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 18:29:51 +02:00
Greg Kroah-Hartman aa0a2ddc54 [PATCH] 64bit resource: fix up printks for resources in sound drivers
This is needed if we wish to change the size of the resource structures.

Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:23:58 -07:00
David S. Miller 69b5c4f18b [SOUND] sparc: Port amd7930 to new SBUS device layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-23 23:15:52 -07:00
David S. Miller 690c8fd31f [SPARC64]: Use in-kernel PROM tree for EBUS and ISA.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-23 23:15:28 -07:00
Takashi Iwai 6581f4e74d [ALSA] Remove zero-initialization of static variables
Removed zero-initializations of static variables.
A tiny optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:45 +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
David S. Miller c6387a48cf [SPARC]: Kill __irq_itoa().
This ugly hack was long overdue to die.

It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels.  These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.

The idea now is that we will increase NR_IRQS a little bit and use a
virtual<-->real IRQ number mapping scheme similar to PowerPC.

That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-20 01:21:29 -07:00
Eric Sesterhenn 817dd6eed4 BUG_ON() Conversion in sound/sparc/cs4231.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-24 18:49:12 +01:00
Ingo Molnar 12aa757905 [ALSA] semaphore -> mutex (Archs, misc buses)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:25:43 +01:00
David S. Miller 4f3f2f6f3e [SOUND]: sparc/cs4231: Fix some typos which wrecked the build.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-17 15:55:58 -08:00
Takashi Iwai be9b7e8c02 [ALSA] Remove xxx_t typedefs: SPARC CS4231
Remove xxx_t typedefs from the SPARC CS4231 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 13:43:12 +01:00
Takashi Iwai 8cb7b63f5b [ALSA] dbri - Don't return errors without CONFIG_PROC_FS
Modules: SPARC DBRI driver

Don't return errors if the proc file can't be created (for the case
without CONFIG_PROC_FS).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:06 +01:00
Takashi Iwai ebfbd2b83d [ALSA] Remove snd_card_generic_dev()
Remove the obsolete snd_card_generic_dev().
CONFIG_SND_GENERIC_DRIVER is also removed from Kconfig.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:28:50 +01:00
Takashi Iwai 475675d693 [ALSA] Remove xxx_t typedefs: SPARC DBRI
Modules: SPARC DBRI driver

Remove xxx_t typedefs from the SPARC DBRI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:20:08 +01:00
Takashi Iwai dcc94db783 [ALSA] Remove xxx_t typedefs: SPARC AMD7930
Modules: SPARC AMD7930 driver

Remove xxx_t typedefs from the SPARC AMD7930 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:20:06 +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
Adrian Bunk 0b57ee9e55 [SPARC]: introduce a SPARC Kconfig symbol
Introduce a Kconfig symbol SPARC that is defined on both the sparc and
sparc64 architectures.

This symbol makes some dependencies more readable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22 23:09:54 -08:00
Georg Chini b128254fdb [SPARC]: More abstractions and cleanups of dma handling in cs4231.
From: Georg Chini <georg.chini@triaton-webhosting.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-07 14:09:19 -08:00
Georg Chini 5a820fa7e1 [SPARC]: Make SBUS dma code similar to EBUS
From: Georg Chini <georg.chini@triaton-webhosting.com>

Introduce some sbus_dma routines similar to the
ebus_dma stuff to make the code look nearly the same
for both cases.

Thanks to Christopher for testing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-07 14:08:25 -08:00
Takashi Iwai 063859c854 [ALSA] Remove obsolete chip_t
Modules: Documentation,MIPS AU1x00 driver,PPC Beep,SPARC DBRI driver

Removed the use of chip_t, which was obsoleted.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:18:51 +01:00
Christopher Zimmermann a131430c20 [SPARC] cs4231: Fix SBUS support in this driver.
From: Christopher Zimmermann <madroach@zakweb.de>

This patch enables SBus support for the cs4231 sound driver.
It is tested on an Ultra2. Capture and playback both work.
I experienced lags and crashes using certain threaded
players like ogg123 and mp3blaster, while the former is
lagging far more. This behavior may be specific to SMP
systems. It is reproducable using the dummy sound card
driver. Sox works flawlessly.

Setting up the calculation of ptr in snd_cs4231_playback_pointer 
was a bit strange. I got it to work by not incrementing the
[pc]_periods_sent counter when starting DMA the first time
in cs4231_dma_trigger. Therefore this dummy thing.

[ I did some minor cleanups -DaveM ]

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-21 00:41:22 -07:00