summaryrefslogtreecommitdiff
path: root/sound/oss
AgeCommit message (Collapse)Author
2010-09-23SOUND-OSS: Remove sh_dac_audioJohn Kacur
Remove the SH DAC oss driver since there is an equivalent alsa driver. oss has been deprecated for years. Furthermore this driver has BKL code which we are trying to remove. Rather than attempt to fix this, simply remove the driver. Signed-off-by: John Kacur <jkacur@redhat.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14sound: autoconvert trivial BKL users to private mutexArnd Bergmann
The usage of the BKL in the OSS sound drivers is trivial, and each of them only locks against itself, so it can be turned into per-driver mutexes. This is the script that was used for the conversion: file=$1 name=$2 if grep -q lock_kernel ${file} ; then if grep -q 'include.*linux.mutex.h' ${file} ; then sed -i '/include.*<linux\/smp_lock.h>/d' ${file} else sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file} fi sed -i ${file} \ -e "/^#include.*linux.mutex.h/,$ { 1,/^\(static\|int\|long\)/ { /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex); } }" \ -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \ -e '/[ ]*cycle_kernel_lock();/d' else sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \ -e '/cycle_kernel_lock()/d' fi Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07sound: Remove unnecessary casts of private_dataJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-28sound: oss: fix uninitialized spinlockAkinobu Mita
The spinlock lock in sound_timer.c is used without initialization. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-12sound: oss: sh_dac_audio.c removed duplicated #includeAndrea Gelmini
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06sound/oss: Adjust confusing if indentationJulia Lawall
Indent the branch of an if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06sound: oss: au1550_ac97.c removed duplicated #includeAndrea Gelmini
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29sound: oss: msnd: check request_region() return valueKulikov Vasiliy
request_region() may fail, if so return -EBUSY. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29sound: oss: midi_synth: check get_user() return valueKulikov Vasiliy
get_user() may fail, if so return -EFAULT. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26sound: oss: waveartist: simplify waveartist_sleep()Kulikov Vasiliy
waveartist_sleep() uses loop with schedule_timeout() to unconditionally wait for msec. Use schedule_timeout_uninteruptible() instead. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26sound: oss: au1550_ac97: simplify au1550_delay()Kulikov Vasiliy
au1550_delay() uses loop with schedule_timeout() to unconditionally wait for msec. Use schedule_timeout_uninteruptible() instead. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-21sound/oss: Remove dead CONFIG_SOFTOSS*Christian Dietrich
CONFIG_SOFTOSS* doesn't exist in Kconfig or somewhere else, therefore removing all references for it from the source code. Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-14sound/oss-msnd-pinnacle: ioctl needs the inodeArnd Bergmann
This broke in sound/oss: convert to unlocked_ioctl, when I missed one of the ioctl functions still using the inode pointer. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12sound/oss: convert to unlocked_ioctlArnd Bergmann
These are the final conversions for the ioctl file operation so we can remove it in the next merge window. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12sound: push BKL into open functionsArnd Bergmann
This moves the lock_kernel() call from soundcore_open to the individual OSS device drivers, where we can deal with it one driver at a time if needed, or just kill off the drivers. All core components in ALSA already provide adequate locking in their open()-functions and do not require the big kernel lock, so there is no need to add the BKL there. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-27sound: Add missing spin_unlockJulia Lawall
Add a spin_unlock missing on the error path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E1; @@ * spin_lock(E1,...); <+... when != E1 if (...) { ... when != E1 * return ...; } ...+> * spin_unlock(E1,...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-17m68k: amiga - Sound platform device conversionGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
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>
2010-03-21sound/oss/vidc.c: change the field used with DMA_ACTIVEJulia Lawall
The constant DMA_ACTIVE is defined with the dma_buffparams structure rather than with the audio_operations structure. Takashi Iwai suggested that the dmap_out field of the audio_operations structure should be used instead. This is not tested. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-18Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: sound: sequencer: clean up remove bogus check ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 ALSA: hda - Disable MSI for Nvidia controller ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220 ALSA: hda - Fix secondary ADC of ALC260 basic model ALSA: hda - Add an error message for invalid mapping NID ALSA: hda - New Intel HDA controller
2010-03-16sound: sequencer: clean up remove bogus checkDan Carpenter
A few lines earlier bend is limited to 2399. So semitones is always less than 24 here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits) ALSA: hdmi - show debug message on changing audio infoframe ALSA: hdmi - merge common code for intelhdmi and nvhdmi ALSA: hda - Add ASRock mobo to MSI blacklist ALSA: hda: uninitialized variable fix ALSA: hda: Use LPIB for a Biostar Microtech board ALSA: usb/audio.h: Fix field order ALSA: fix jazz16 compile (udelay) ALSA: hda: Use LPIB for Dell Latitude 131L ALSA: hda - Build hda_eld into snd-hda-codec module ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio ALSA: hda - Support max codecs to 8 for nvidia hda controller ALSA: riptide: clean up while loop ALSA: usbaudio - remove debug "SAMPLE BYTES" printk line ALSA: timer - pass real event in snd_timer_notify1() to instance callback ALSA: oxygen: change || to && ALSA: opti92x: use PnP data to select Master Control port ASoC: fix ak4104 register array access ASoC: soc_pcm_open: Add missing bailout tag ALSA: usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam ALSA: ua101: removing debugging code ...
2010-03-02sound/oss/coproc.h: Checkpatch cleanupAndrea Gelmini
sound/oss/coproc.h:7: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-02sound/oss/v_midi.h: Checkpatch cleanupAndrea Gelmini
sound/oss/v_midi.h:5: ERROR: code indent should use tabs where possible sound/oss/v_midi.h:7: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (252 commits) ASoC: Check progress when reporting periods from i.MX FIQ handler ASoC: Remove a unused variables from i.MX FIQ runtime data ALSA: hda - Add/fix ALC269 FSC and Quanta models ALSA: hda - Add ALC670 codec support OMAP4: PMIC: Add support for twl6030 codec ALSA: hda - remove unnecessary msleep on power state transitions usb/gadget/{f_audio,gmidi}.c: follow recent changes in audio.h ASoC: fsi: Modify over/under run error settlement ASoC: OMAP4: Add McPDM platform driver ASoC: OMAP4: Add support for McPDM ASoC: OMAP: data_type and sync_mode configurable in audio dma ALSA: hda - Add missing description in HD-Audio-Models.txt ALSA: add support for Macbook Air 2,1 internal speaker ALSA: usbaudio: consolidate header files ALSA: usbmixer: bail out early when parsing audio class v2 descriptors ALSA: usbaudio: implement basic set of class v2.0 parser ALSA: usbaudio: introduce new types for audio class v2 ALSA: usbaudio: parse USB descriptors with structs ALSA: hda - enable snoop for Intel Cougar Point ALSA: hda - Remove identical definitions for macmini3 model ...
2010-02-27MIPS: Alchemy: change dbdma to accept physical memory addressesManuel Lauss
DMA can only be done from physical addresses; move the "virt_to_phys" source/destination buffer address translation from the dbdma queueing functions (since the hardware can only DMA to/from physical addresses) to their respective users. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27MIPS: Alchemy: remove dbdma compat macrosManuel Lauss
Remove dbdma compat macros, move remaining users over to default queueing functions and -flags. (Queueing function signature has changed in order to give a build failure instead of silent functional changes due to the no longer implicitly specified DDMA_FLAGS_IE flag) Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-16Merge branch 'topic/misc' of ↵Jaroslav Kysela
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
2010-02-09sound: use DEFINE_PCI_DEVICE_TABLEAlexey Dobriyan
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-01-12sound_oss: remove use of old BKL ioctl pathAlan Cox
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-08Merge branch 'master' of ↵Jaroslav Kysela
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into fixes
2010-01-08sound: oss: off by one bugDan Carpenter
The problem is that in the original code sound_nblocks could go up to 1024 which would be an array overflow. This was found with a static checker and has been compile tested only. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-17sound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot()Roel Kluin
limit and jiffies are unsigned so the test did not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits) tree-wide: fix misspelling of "definition" in comments reiserfs: fix misspelling of "journaled" doc: Fix a typo in slub.txt. inotify: remove superfluous return code check hdlc: spelling fix in find_pvc() comment doc: fix regulator docs cut-and-pasteism mtd: Fix comment in Kconfig doc: Fix IRQ chip docs tree-wide: fix assorted typos all over the place drivers/ata/libata-sff.c: comment spelling fixes fix typos/grammos in Documentation/edac.txt sysctl: add missing comments fs/debugfs/inode.c: fix comment typos sgivwfb: Make use of ARRAY_SIZE. sky2: fix sky2_link_down copy/paste comment error tree-wide: fix typos "couter" -> "counter" tree-wide: fix typos "offest" -> "offset" fix kerneldoc for set_irq_msi() spidev: fix double "of of" in comment comment typo fix: sybsystem -> subsystem ...
2009-12-07Merge branch 'for-next' into for-linusJiri Kosina
Conflicts: kernel/irq/chip.c
2009-12-04Merge branch 'topic/misc' into for-linusTakashi Iwai
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-01Merge branch 'topic/pcm-dma-fix' into topic/core-changeTakashi Iwai
2009-12-01Merge branch 'topic/beep-rename' into topic/core-changeTakashi Iwai
2009-11-17Merge branch 'hostprogs-wmissing-prototypes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc * 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc: Makefile: Add -Wmising-prototypes to HOSTCFLAGS oss: Mark loadhex static in hex2hex.c dtc: Mark various internal functions static dtc: Set "noinput" in the lexer to avoid an unused function drm: radeon: Mark several functions static in mkregtable arch/sparc/boot/*.c: Mark various internal functions static arch/powerpc/boot/addRamDisk.c: Mark several internal functions static arch/alpha/boot/tools/objstrip.c: Mark "usage" static Documentation/vm/page-types.c: Declare checked_open static genksyms: Mark is_reserved_word static kconfig: Mark various internal functions static kconfig: Make zconf.y work with current bison
2009-11-16sound: OSS: keep index within bounds of midi_devs[]Roel Kluin
When the {orig,midi}_dev equals num_midis, that's one too large already. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-15oss: Mark loadhex static in hex2hex.cJosh Triplett
Nothing outside of hex2hex.c references loadhex. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-14Merge branch 'fix/misc' into topic/miscTakashi Iwai
2009-11-12sound: OSS: fix error return in dma_ioctl()Roel Kluin
The returned error should stay negative Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-09Kconfig: Remove useless and sometimes wrong commentsMichael Roth
Additionally, some excessive newlines removed. Signed-off-by: Michael Roth <mroth@nessie.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-07sound: Replace old style lock initializerThomas Gleixner
SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05sound: Use KERN_WARNING instead of KERN_WARN, which does not existRandy Dunlap
Reported-by: Andrew Lyon <andrew.lyon@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-01Merge branch 'fix/misc' into topic/miscTakashi Iwai
2009-10-30sound: remove OSS Ensoniq SoundScape driverKrzysztof Helt
The OSS driver for Ensoniq SoundScape cards is broken after conversion to mutexes and a new ALSA snd-sscape driver handles all devices handled by the OSS one. The ALSA driver was tested with these cards: Spea V7 MediaFX Ensoniq Soundscape Elite Ensoniq Soundscape VIVO (this card is not handled by the OSS driver) Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30ALSA: Cleanup redundant tests on unsignedRoel Kluin
The variables are unsigned so the test `>= 0' is always true, the `< 0' test always fails. In these cases the other part of the test catches wrapped values. In dac_audio_write() there does not occur a test for wrapped values, but the test appears redundant. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>