History log of /sound/core/oss/mixer_oss.c
Revision Date Author Comments
fea952e5cc23ea94b4677ca20774cdc3cea014e2 14-Feb-2011 Clemens Ladisch <clemens@ladisch.de> ALSA: core: sparse cleanups

Change the core code where sparse complains. In most cases, this means
just adding annotations to confirm that we indeed want to do the dirty
things we're doing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
838c364ff05c143fd1810e8ad1469935d6c23a7a 08-Oct-2010 Jaroslav Kysela <perex@perex.cz> ALSA: OSS mixer emulation - fix locking

Fix mutex release and cleanup some locking code.

Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9fe856e47e1751204faf3d604c6d20ab24bd3b93 05-Sep-2010 Joe Perches <joe@perches.com> sound: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
02f4865fa415a87de28cc8c2e4d798ff46be1cf8 13-Apr-2010 Takashi Iwai <tiwai@suse.de> ALSA: core - Define llseek fops

Set no_llseek to llseek file ops of each sound component (but for hwdep).
This avoids the implicit BKL invocation via generic_file_llseek() used
as default when fops.llseek is NULL.

Also call nonseekable_open() at each open ops to ensure the file flags
have no seek bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ad1cd745060ae2f24026b3b3d09da3426df6ab36 04-Nov-2009 Jaroslav Kysela <perex@perex.cz> ALSA: rename "PC Speaker" controls to "Speaker"

To unify control names, rename "PC Speaker" to "Speaker" for PPC ALSA drivers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
d355c82a0191d5a3e971bd5af96cc81fe3ed25b9 03-Nov-2009 Jaroslav Kysela <perex@perex.cz> ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"

To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.

Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4f7454a9970fa0f3e9f1a68201520e3df1bb5224 08-Sep-2009 Takashi Iwai <tiwai@suse.de> ALSA: Add const prefix to proc helper functions

Add appropriate const prefix to char * arguments in proc helper functions.
Also fixed the caller side to be proper const pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
d2e8e52976b9d0a34db529b06952d5187b78af8c 04-Apr-2009 Deepika Makhija <deepika.makhija@einfochips.com> ALSA: oss - volume control for CSWITCH and CROUTE

Added an else part to check
SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
in commit 36c7b833e5d2501142a371e4e75281d3a29fbd6b

Similarly, checks and volume control is required for
SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
as well.

Signed-off-by: Deepika Makhija <deepika.makhija@einfochips.com>
Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
36c7b833e5d2501142a371e4e75281d3a29fbd6b 10-Mar-2009 Viral Mehta <viral.mehta@einfochips.com> ALSA: oss-mixer - Fixes recording gain control

At the time of initialization, SNDRV_MIXER_OSS_PRESENT_PVOLUME bit is not
set for MIC (slot 7).
So, the same should not be checked when an application tries to do gain
control for audio recording devices.

Just check slot->present for SNDRV_MIXER_OSS_PRESENT_CVOLUME independently.
Verified with a simple application which opens /dev/dsp for recording and
/dev/mixer for volume control.

Have tested two usb audio mic devices.

Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf 08-Aug-2008 Takashi Iwai <tiwai@suse.de> ALSA: Kill snd_assert() in sound/core/*

Kill snd_assert() in sound/core/*, either removed or replaced with
if () with snd_BUG_ON().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6c4cc3a8ed15aacc06a5fd369639fef633cee2bc 04-Feb-2008 Takashi Iwai <tiwai@suse.de> [ALSA] Add more fallbacks to OSS PHONEOUT mixer map

Added more fallbacks to OSS PHONEOUT mixer mapping. This corresponds
to the speaker output in general, so now "Mono" and "Speaker" are
assigned.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9004acc70e8c49c50c4c7b652f906f1e0ed5709d 08-Jan-2008 Takashi Iwai <tiwai@suse.de> [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>
22a860a9e22fa077300e1e72170afb82bf695617 09-Jan-2008 Jean Delvare <khali@linux-fr.org> snd_mixer_oss_build_input(): fix for __you_cannot_kmalloc_that_much failure with gcc-3.2

Rework this functions so that gcc-3.2 can successfully perform
constant-folding.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c1017a4cdb68ae5368fbc9ee42c77f1f5dca8916 15-Oct-2007 Jaroslav Kysela <perex@perex.cz> [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz


Signed-off-by: Jaroslav Kysela <perex@perex.cz>
e63340ae6b6205fef26b40a75673d1c9c0c8bb90 08-May-2007 Randy Dunlap <randy.dunlap@oracle.com> header cleaning: don't include smp_lock.h when not used

Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9c2e08c592cd357a8330c34def1e8ecfdcf53275 12-Feb-2007 Arjan van de Ven <arjan@linux.intel.com> [PATCH] mark struct file_operations const 9

Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
5cbded585d129d0226cb48ac4202b253c781be26 13-Dec-2006 Robert P. J. Day <rpjday@mindspring.com> [PATCH] getting rid of all casts of k[cmz]alloc() calls

Run this:

#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
done

And then go through and reinstate those cases where code is casting pointers
to non-pointers.

And then drop a few hunks which conflicted with outstanding work.

Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
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>
c461482c8072bb073e6146db320d3da85cdc89ad 23-Jun-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Unregister device files at disconnection

Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
746d4a02e68499fc6c1f8d0c43d2271853ade181 23-Jun-2006 Takashi Iwai <tiwai@suse.de> [ALSA] Fix disconnection of proc interface

- Add the linked list to each proc entry to enable a single-shot
disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
59feddb25f9d925e86ee22596802405788bc050f 25-Jul-2006 Panagiotis Issaris <takis@issaris.org> [ALSA] Conversions from kmalloc+memset to k(z|c)alloc

sound: Conversions from kmalloc+memset to k(c|z)alloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
bf850204a71a97eb5a6afaf27263bb667f9cab0a 28-Apr-2006 Takashi Iwai <tiwai@suse.de> [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>
1a60d4c5a0c4028559585a74e48593b16e1ca9b2 16-Jan-2006 Ingo Molnar <mingo@elte.hu> [ALSA] semaphore -> mutex (core part)

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>
04f141a8800d022981f0405a8d307c98aba55105 01-Dec-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Optimize for config without PROC_FS (seq and oss parts)

Modules: ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer

Optimize the code when compiled without CONFIG_PROC_FS (in seq and oss
emulation parts).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
f87135f56cb266e031f5ec081dfbde7e43f55e80 20-Nov-2005 Clemens Ladisch <clemens@ladisch.de> [ALSA] dynamic minors (3/6): store device-specific object pointers dynamically

Instead of storing the pointers to the device-specific structures in an
array, put them into the struct snd_minor, and look them up dynamically.

This makes the device type modules independent of the minor number
encoding.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2af677fc884fc6dc79e65c99050ea607ac8bab9b 20-Nov-2005 Clemens Ladisch <clemens@ladisch.de> [ALSA] dynamic minors (1/6): store device type in struct snd_minor

Instead of a comment string, store the device type in the snd_minor
structure. This makes snd_minor more flexible, and has the nice side
effect that we don't need anymore to create a separate snd_minor
template for registering a device but can pass the file_operations
directly to snd_register_device().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
f956b4a3ae790e1bdde865ac42dd1b99b64a6256 17-Nov-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Remove xxx_t typedefs: Mixer OSS-emulation

Modules: ALSA<-OSS emulation

Remove xxx_t typedefs from the core mixer OSS-emulation codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
d3d579f84ebf701dedd22ba696d1738ed6759ef7 21-Oct-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Add missing KERN_* prefix

Modules: ALSA<-OSS emulation,USB generic driver,USB USX2Y

Added missing KERN_* prefix to printk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7c22f1aaa23370bf9ba2dd3abbccbed70dced216 10-Oct-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Remove snd_runtime_check() macro

Remove snd_runtime_check() macro.
This macro worsens the readability of codes. They should be either
normal if() or removable asserts.

Also, the assert displays stack-dump, instead of only the last caller
pointer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ca2c0966562cfbf9273167a5b60e8fddc24078d6 09-Sep-2005 Takashi Iwai <tiwai@suse.de> [ALSA] Replace with kzalloc() - core stuff

Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel
Timer Midlevel,ALSA<-OSS emulation
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
543537bd922692bc978e2e356fcd8bfc9c2ee7d5 23-Jun-2005 Paulo Marques <pmarques@grupopie.com> [PATCH] create a kstrdup library function

This patch creates a new kstrdup library function and changes the "local"
implementations in several places to use this function.

Most of the changes come from the sound and net subsystems. The sound part
had already been acknowledged by Takashi Iwai and the net part by David S.
Miller.

I left UML alone for now because I would need more time to read the code
carefully before making changes there.

Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!