The Advanced Linux Sound Architecture (ALSA) - library
Find a file
Andrey Mazo 4081be0b87 pcm_file: don't touch infile on playback and output file on capture.
Commit 1d80c5b901 message describes
behaviour in case of specified infile option as
'No file writes will take place in this case'.
But this is clearly not the case as output file gets truncated while
running `arecord -Dtestin >/dev/null`, where "testin" is defined as
pcm.testin {
	type file
	slave.pcm null
	file "/tmp/qqqq.out"
	infile "/tmp/qqqq.in"
	format "raw"
}

Besides that, the existing behaviour is rather counterintuitive,
requiring both output and input files to exist and making access to them
regardless of playback or capture intention.
Also, it's very confusing to get output file truncated while trying to
just capture from the device.

Current changeset introduces the following behaviour:
 - output file ("file" option) is only (p)open()'ed for writing
   only on playback to the device
 - any data is written to the output file descriptor
   (provided with "file" option) only on playback to the device
 - input file ("infile" option) is only open()'ed for reading only on
   capture from the device
 - any data is read from the input file descriptor
   (provided with the "infile" option) only on capture from the device

Signed-off-by: Andrey Mazo <mazo@telum.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-17 10:15:42 +01:00
alsalisp Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
aserver Make some static tables and strings constants. 2008-11-21 13:04:41 +01:00
doc all places: doxygen cleanups 2013-04-08 16:42:24 +02:00
include include/global.h - don't define timeval and timespec structures for !glibc 2013-11-08 12:34:44 +01:00
m4 Add the attributes.m4 macro file from xine/lscube. 2008-11-21 13:04:19 +01:00
modules alsa-lib: fixed coverity reported issues under "FORWARD_NULL" checker. 2011-05-04 09:11:46 +02:00
src pcm_file: don't touch infile on playback and output file on capture. 2013-11-17 10:15:42 +01:00
test test/chmap: Add missing usage text for -s option 2013-11-04 14:19:03 +01:00
utils build: Disable another compile chack with --disable-alsatest 2012-07-17 14:57:10 +02:00
.gitignore Update .gitignore 2012-09-22 09:39:12 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:52:17 +00:00
ChangeLog * update to libtool 1.3.3 1999-07-22 12:18:42 +00:00
configure.in remove unnecessary/obsolete compat/hsearch_r.c 2013-10-07 10:16:19 +02:00
COPYING Updated GNU GPL license (address). 2001-12-30 09:22:54 +00:00
gitcompile Introduce --with-pkgconfdir, add 64-bit defaults to gitcompile 2012-01-20 16:14:44 +01:00
INSTALL Add hgcompile script and fix INSTALL document 2006-05-12 15:33:44 +02:00
Makefile.am Add m4/attributes.m4 as dist file.. 2009-01-05 13:21:12 +01:00
MEMORY-LEAK Initial version 2003-02-04 14:56:07 +00:00
NOTES Change assert condition in error message handler 2007-10-24 12:53:08 +02:00
TODO Added snd_config_load_override(). 2002-01-09 21:28:15 +00:00