Addition of "infile" parameter (virtual mic) to the file plugin
Addition of "infile" parameter (virtual mic) to the file plugin

When this new parameter is specified, the behavior of opening a file PCM
for input is changed to the following: reads from the device, instead of
being passed down to the slave PCM, will read the raw data from the
specified file. No file writes will take place in this case. In the
absence of this parameter, previous behavior is unchanged.

The input file name and descriptor are kept in the snd_pcm_file_t struct
in a manner analogous to the already existing output file parameter.

TODO:

(1) Only interleaved reads (snd_pcm_file_readi) have been implemented
for now.

(2) File read()'s that return a number of bytes that's not a multiple of
the frame size will result in data loss (choppiness). The rbuf,
rbuf_size_bytes, and rbuf_used_bytes members of the snd_pcm_file_t
struct will be used to address this problem in the future.

(3) Mind whether the PCM was opened in blocking mode. If so, we'll have
to loop until the buffer has been filled with read()'s.

Signed-off-by: Juan Carlos Castro y Castro <39dc469c8dd1c13279509c1dc002ce7ae05b2099@vialink.com.br>

mikelima/alsa-lib,Distrotech/alsa-lib,Distrotech/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,lgirdwood/alsa-lib,lgirdwood/alsa-lib,zedongchen/alsa-lib,mikelima/alsa-lib,mikelima/alsa-lib,lgirdwood/alsa-lib,lgirdwood/alsa-lib,lgirdwood/alsa-lib,tiwai/alsa-lib,zedongchen/alsa-lib,tiwai/alsa-lib,mengdonglin/alsa-lib,Distrotech/alsa-lib,gittup/alsa-lib,zedongchen/alsa-lib,mikelima/alsa-lib,mengdonglin/alsa-lib,mengdonglin/alsa-lib,mikelima/alsa-lib,tiwai/alsa-lib,Distrotech/alsa-lib,zedongchen/alsa-lib,alsa-project/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,mengdonglin/alsa-lib,gittup/alsa-lib,Distrotech/alsa-lib,alsa-project/alsa-lib,tiwai/alsa-lib,zedongchen/alsa-lib,gittup/alsa-lib,takaswie/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib,gittup/alsa-lib,mengdonglin/alsa-lib