summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-alsa.c
AgeCommit message (Collapse)Author
2007-02-19compat: Add -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-11-21saa7134-alsa improvementsHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> The change does the following: - At device open, it sets the recording source to the current input instead of LINE2. So it is no longer necessary to set the recording source with a mixer application. - Connects the mixer volume control to the input sensitivity selection of the analog sound inputs. This allows only one 6db step. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2006-10-21IRQ: Maintain regs pointer globally rather than passing to IRQ handlersMauro Carvalho Chehab
Kernel-sync: This patch is required to allow compilation of the tree with kernel 2.6.19. This is the original description of the original patch, signed by David Howells <dhowells@redhat.com>: 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: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-06Unmute/mute saa7134 when opening/closing the audio capture device.Ricardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> This patch should enable unmuting the audio device when opening it (and posterior muting when closing it), doing away with the need for unmute ioctls or v4lctl usage. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2006-07-19[PATCH] irq-flags: media: Use the new IRQF_ constantsMauro Carvalho Chehab
From: Thomas Gleixner <tglx@linutronix.de> 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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-15Saa7134: rename dmasound_{init, exit}Mauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> Two different exports with the same name are not a good idea: $ grep -r EXPORT_SYMBOL\(dmasound_init\) * drivers/media/video/saa7134/saa7134-core.c:EXPORT_SYMBOL(dmasound_init); sound/oss/dmasound/dmasound_core.c:EXPORT_SYMBOL(dmasound_init); $ This patch renames the saa7134 dmasound_{init,exit} to saa7134_dmasound_{init,exit}. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-20Whitespace cleanupsMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-11Since we are not using CVS, $Id makes no sense anymoreMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-28Wrong version testing... fixed.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-28Make code sync with recent ALSA changes on -gitMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-15Merging from mchehab vivi branchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> merge: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-13BUG_ON() Conversion in drivers/video/mediaMauro Carvalho Chehab
From: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-10Make video_buf more genericMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-12Fixed saa7134 ALSA initialization with multiple cardsRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> When multiple cards were installed, only the first card would have audio initialized, because only the first position in the array parameter defaulted to "1" To make things worse, the "enable" parameter wasn't enabled, so there was no workaround. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-12-26Make late module load fix looking the same as kernel version.Mauro Carvalho Chehab
kernel-sync. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-21Changes saa7134 DMA sound modules to late_initcall() to prevent oopsRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> Replaced module_init() with late_initcall() so sound core can be loaded before these modules, to prevent an oops when booting with them statically compiled into the kernel. Signed-off-by:
2005-12-20Fix saa7134 ALSA/OSS collisionsRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> When ALSA or OSS are loaded, check if the other is present Fixed hotplug notifiers cleanup on module removal Signed-off-by:
2005-12-18Fix compilation failure with gcc 2.95.3.Mauro Carvalho Chehab
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-17Reverted latest two patchesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-17Fix compilation failure with gcc 2.95.3 and corrected set video stdMauro Carvalho Chehab
From:: Jean Delvare <khali@linux-fr.org> - Fix compilation failure with gcc 2.95.3. - Corrected a bug at video std check at cx25840 module Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-20This patch makes needlessly global code static.Mauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-16Fix hotplugging issues with saa7134Ricardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> - Fixed issue with hotplugging and DMA sound (sound was lost when replugging a card) - Added notifiers to main saa7134 module to let the sound sub-modules know when a card has been inserted or removed Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-11Applied saa7134-alsa changes suggested by ALSA's Takashi IwaiRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> CC: Takashi Iwai <tiwai@suse.de> - Merged parts of a patch from Takashi for an older version of the module Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-09Fixed saa7134-alsa spinlock bugRicardo Cerqueira
From: Signed-off-by:
2005-11-09Moves 32 bit ioctl compat handler to V4L sybsystemMauro Carvalho Chehab
From: Arnd Bergmann <arnd@arndb.de> This moves the 32 bit ioctl compatibility handlers for Video4Linux into a new file and adds explicit calls to them to each v4l device driver. Unfortunately, there does not seem to be any code handling the v4l2 ioctls, so quite often the code goes through two separate conversions, first from 32 bit v4l to 64 bit v4l, and from there to 64 bit v4l2. My patch does not change that, so there is still much room for improvement. Also, some drivers have additional ioctl numbers, for which the conversion should be handled internally to that driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-09Cleanups in saa7134-alsaRicardo Cerqueira
From: - Removed some superfluous/redundant code in saa7134-alsa Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-09Finish split of DMA sound code from main saa7134 moduleRicardo Cerqueira
From: - saa7134-oss is now a standalone module as well - remaining DMA sound code has been removed from core the module - Lots of small cleanups and variable renames to get more consistency between the OSS and ALSA drivers Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-08Removed superfluous stop_dma() from saa7134-alsa IRQ handlerRicardo Cerqueira
From: Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-08 * ../linux/drivers/media/video/saa7134/saa7134-alsa.c:Nickolay V. Shmyrev
Fix compilation with 2.6.8. Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
2005-11-08 * ../linux/drivers/media/video/saa7134/saa7134-alsa.c:Nickolay V. Shmyrev
* ../v4l/compat.h: Fix compilation with older kernels. Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
2005-11-08- SAA7134/ALSA IRQ management improvementsRicardo Cerqueira
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-08 - distclean now cleans also .orig and .rej filesMauro Carvalho Chehab
- make update updates from CVS - make snapshot now distcleans and updates. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-08- Fix multiple board support in saa7134-alsaRicardo Cerqueira
- Minor comment updates Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-07- Fix nasty IRQ hook bug.Ricardo Cerqueira
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-07- DMA sound struct has been renamed from "oss" to "dmasound" to betterRicardo Cerqueira
reflect the fact that it is common to both OSS and ALSA Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-07- More ALSA-proposed changesRicardo Cerqueira
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-07- Applied some of the changes proposed by the ALSA teamRicardo Cerqueira
- dsp_nr replaced by ALSA's index[] Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-07- saa7134-alsa is now a standalone moduleRicardo Cerqueira
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-10-25 * ../linux/drivers/media/video/saa7134/saa7134-alsa.c:Nickolay V. Shmyrev
- Fix compilation with 2.6.8. Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
2005-10-18 - Cleanup some unnecessary ALSA memory (de/)allocationsMauro Carvalho Chehab
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-16- Whitespaces Cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-16- Whitespace Cleanups.Mauro Carvalho Chehab
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-09From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>Mauro Carvalho Chehab
- Lots of small changes to allow compiling with kernel 2.4. Compilation result not tested yet. - After this patch, .version should be removed, since its syntax has changed. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-08 * saa7134-alsa.c: (snd_saa7134_capsrc_put),Nickolay V. Shmyrev
(alsa_card_saa7134_create): * saa7134-core.c: (saa7134_initdev): * saa7134.h: - Fixed a bug that caused some saa7133 code to run on saa7134 boards - dsp_nr (to force a given audio card number) from OSS now works for ALSA as well. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-10-07 * saa7134-alsa.c: (saa7134_dma_stop),Nickolay V. Shmyrev
(snd_card_saa7134_capture_prepare), (snd_card_saa7134_capture_pointer), (snd_card_saa7134_capture_close), (snd_card_saa7134_capture_open), (snd_card_saa7134_pcm), (snd_saa7134_capsrc_info), (snd_saa7134_capsrc_put), (snd_card_saa7134_new_mixer), (alsa_card_saa7134_create): - Fixed kernel oops when hotswapping PC Cards - Fixed capture source switch issue in mixer - Removed some unnecessary wrappers - Minor code cleanups - Added a few comments to document the purpose of the major functions. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-10-06removed trailing whitespaceMichael Krufky
2005-10-06 * Makefile:Nickolay V. Shmyrev
* saa7134-alsa.c: (saa7134_dma_stop), (saa7134_dma_start), (saa7134_irq_alsa_done), (snd_card_saa7134_capture_trigger), (dsp_buffer_conf), (dsp_buffer_init), (snd_card_saa7134_pcm_prepare), (snd_card_saa7134_capture_prepare), (snd_card_saa7134_pointer), (snd_card_saa7134_capture_pointer), (snd_card_saa7134_runtime_free), (snd_card_saa7134_hw_params), (snd_card_saa7134_hw_free), (dsp_buffer_free), (saa7134_cap_close), (saa7134_cap_open), (snd_card_saa7134_capture_open), (snd_card_saa7134_capture_close), (snd_card_saa7134_pcm), (snd_saa7134_volume_info), (snd_saa7134_volume_get), (snd_saa7134_volume_put), (snd_saa7134_capsrc_info), (snd_saa7134_capsrc_get), (snd_saa7134_capsrc_put), (snd_card_saa7134_new_mixer), (snd_saa7134_free), (snd_saa7134_dev_free), (alsa_card_saa7134_create), (alsa_card_saa7134_exit): * saa7134-core.c: (saa7134_irq), (saa7134_initdev), (saa7134_finidev): * saa7134-oss.c: (dsp_rec_start): * saa7134-reg.h: * saa7134.h: - Alsa support for saa7134 that should work. Wonderful patch from Ricardo. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-10-05Corrected settings for SECAM-LNickolay V. Shmyrev