summaryrefslogtreecommitdiff
path: root/sound/drivers/dummy.c
AgeCommit message (Collapse)Author
2010-02-02ALSA: dummy driver - add model parameterJaroslav Kysela
This is a cleanup for the dummy driver. The model kernel module parameter is introduced to select the soundcard emulation. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-11-02ALSA: dummy - Fix descriptions of pcm_substreams parameterTakashi Iwai
Now up to 128 substreams are supported. Reported-by: Adrian Bridgett <adrian@smop.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30ALSA: sound: Move dereference after NULL test and drop unnecessary NULL testsJulia Lawall
In pcm.c, if the NULL test on pcm is needed, then the dereference should be after the NULL test. In dummy.c and ali5451.c, the context of the calls to snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice, respectively cannot be NULL. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128Takashi Iwai
Increase the limit of PCM substreams to 128. The default value is unchanged; only the max accept value is increased. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08ALSA: dummy - Add debug proc fileTakashi Iwai
Added the debug proc file to see or change the snd_pcm_hardware fields to emulate. The parameters can be changed by writing to a proc file like: # echo periods_min 4 > /proc/asound/card1/dummy_pcm Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07ALSA: dummy - Fake buffer allocationsTakashi Iwai
Instead of allocating the real buffers, use a fake buffer and ignore read/write in the dummy driver so that we can save the resources. For mmap, a single page (unique to the direction, though) is reused to all buffers. When the app requires to read/write the real buffers, pass fake_buffer=0 module option at loading time. This will get back to the old behavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-04ALSA: dummy - Fix the timer calculation in systimer modeTakashi Iwai
Fix the expire-time calculation in the systimer mode when the buffer size isn't aligned to the period size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03ALSA: dummy - Better jiffies handlingTakashi Iwai
In the system-timer mode, snd-dummy driver issues each tick to update the position. This is highly inefficient and even inaccurate if the timer can't be triggered at each tick. Now rewritten to wake up only at the period boundary. The position is calculated from the current jiffies. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03ALSA: dummy - Support high-res timer modeTakashi Iwai
Allow snd-dummy driver to use high-res timer as its timing source instead of the system timer. The new module option "hrtimer" is added to turn on/off the high-res timer support. It can be switched even dynamically via sysfs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in other sound/*Takashi Iwai
Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-19ALSA: misc typo fixesMariusz Kozlowski
Fixed typos in disabled codes via #if 0. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-15ALSA: dummy driver - do not use assignment in if conditionJaroslav Kysela
checkpatch.pl does not like assignment in if condition Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-15sound: Fix esoteric double free in the dummy sound driver.Daniel THOMPSON
The dummy driver uses runtime->private_free but still frees its pcm structures on error paths. This is esoteric because the error paths in question are unreachable. Thus the bug is only a problem when someone copies this code into other drivers. Signed-off-by: Daniel R Thompson <daniel.thompson@st.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13ALSA: Kill snd_assert() in other placesTakashi Iwai
Kill snd_assert() in other places, 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>
2008-04-24[ALSA] sound/drivers/dummy.c: fix negative snd_pcm_format_width() checkRoel Kluin
bps is unsigned, a negative snd_pcm_format_width() return value is not noticed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] snd-dummy - better realtime app supportAhmet İnan
when the time interval for a period is smaller than kernel HZ, then snd-aloop and snd-dummy cannot call snd_pcm_period_elapsed as fast enough annymore. this happens for example with games. but the app still needs to see, that the buffer actually did go further, which is provided by these patches. Signed-off-by: Ahmet İnan <ainan <at> mathematik.uni-freiburg.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] snd-dummy - improved timing, silence on prepareAhmet İnan
Signed-off-by: Ahmet İnan <ainan <at> mathematik.uni-freiburg.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
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>
2007-10-16[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] more section mismatchesRandy Dunlap
Something about __init_or_module isn't working as expected (?). CONFIG_HOTPLUG=y CONFIG_MODULES=n Fix shared init/exit code helper: WARNING: sound/built-in.o(.exit.text+0x243): Section mismatch: reference to .init.text: (between 'alsa_card_mpu401_exit' and 'ac97_bus_exit') WARNING: sound/built-in.o(.exit.text+0x21b): Section mismatch: reference to .init.text: (between 'alsa_card_dummy_exit' and 'alsa_card_serial_exit') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14[ALSA] Fix __devinit and __devexit issues with sound driversPrarit Bhargava
Fix __devinit and __devexit issues with sound drivers. Resolves MODPOST warnings similar to: WARNING: sound/drivers/snd-dummy.o - Section mismatch: reference to .init.text:snd_dummy_probe from .data.rel.local between 'snd_dummy_driver' (at offset 0x0) and 'snd_dummy_controls' WARNING: sound/drivers/snd-mtpav.o - Section mismatch: reference to .init.text:snd_mtpav_probe from .data.rel.local between 'snd_mtpav_driver' (at offset 0x0) and 'snd_mtpav_input' WARNING: sound/drivers/snd-virmidi.o - Section mismatch: reference to .init.text:snd_virmidi_probe from .data.rel.local after 'snd_virmidi_driver' (at offset 0x0) Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] Add even more 'const' to everything related to TLVTakashi Iwai
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>
2006-09-23[ALSA] Add dB scale information to dummy driverTakashi Iwai
Added the dB scale information to dummy driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Fix some typos in snd-dummy driverTakashi Iwai
Fixed some typos in snd-dummy driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-22[ALSA] unregister platform device again if probe was unsuccessfulRene Herman
This second one unregisters the platform device again when the probe is unsuccesful for sound/drivers, sound/arm/sa11xx-uda1341.c and sound/ppc/powermac.c. This gets them all. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27[ALSA] continue on IS_ERR from platform device registrationRene Herman
I previously only concerned myself with sound/isa. When I now checked for more platform_device_register_simple() usages in ALSA I found a couple more drivers that needed the same patches as already submitted for all the ISA drivers. This first one is the continue-on-iserr patch for sound/drivers. This gets them all. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] Fix check of enable module optionTakashi Iwai
Fix the check of enable module option in probe of platform_device drivers. It shouldn't break the loop but just ignore if enable[i] is false. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-04[ALSA] dummy driver - added CA0106 emulation definesJaroslav Kysela
Modules: Generic drivers Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-01-03[ALSA] unregister platform devicesClemens Ladisch
Call platform_device_unregister() for all platform devices that we've registered. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] Fix possible races in timer callbacksTakashi Iwai
Fix possible races in timer callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] dummy - Use platform_deviceTakashi Iwai
Modules: Generic drivers Rewrite the probe/remove code using platform_device. Added the suspend/resume support, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Generic driversTakashi Iwai
Modules: Generic drivers Remove xxx_t typedefs from the generic drivers (dummy, mtpav, serial-u16550 and virmidi). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] snd-dummy - Code clean-upTakashi Iwai
Modules: Generic drivers Clean up snd-dummy driver code. - Make common PCM callbacks - Simplify open callback - Remove unnecessary irqsave in control callbacks Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] Replace with kzalloc() - othersTakashi Iwai
Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers AK4114 receiver,AK4117 receiver,PDAudioCF driver,PPC PMAC driver SPARC AMD7930 driver,SPARC cs4231 driver,Synth,Common EMU synth USB generic driver,USB USX2Y Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] Add snd_card_set_generic_dev() callTakashi Iwai
ARM,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,MIPS MIPS AU1x00 driver,PPC,PPC PowerMac driver,SPARC,SPARC AMD7930 driver SPARC cs4231 driver,SPARC DBRI driver - Added snd_card_set_generic_dev() call. - Added SND_GENERIC_DRIVER to Kconfig. - Clean up the error path in probe if necessary. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
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!