Check whether non-zero size TLV is really returned by comparing
with the pre-filled pattern. ALSA 1.0.12 driver doesn't notify
the error even if user TLV is empty, so the previous value is
passed bogusly.
This patch fixes a build issue on systems with Gnu assembler
prior to 2.15.92. Instead of having the inline assembler
translate the leal function on a 32 bit register, it is byte encoded.
Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
snd_hctl_wait() currently makes a lot of assumptions that fall outside
the defined API. snd_pcm_wait(), however, follows the API nicely so the
new version is based on that.
Signed-off-by: Pierre Ossman <ossman@cendio.se>
Some io plug-ins might want to adjust the reported delay value and not
strictly follow the current buffer usage (that's why we have two calls
after all).
Allow them to specify a delay() callback and use the previous behaviour
if they don't.
Signed-off-by: Pierre Ossman <ossman@cendio.se>
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 <jcastro@vialink.com.br>
Remove enum in structs from kernel API headers.
The enum is not always equivalent with int on some architectures.
From: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Add four new information flags SNDRV_SEQ_PORT_TYPE_HARDWARE, _SOFTWARE,
_SYNTHESIZER, _PORT for sequencer ports. This makes it easier for apps
like Rosegarden to make policy decisions based on the port type.
Add the internal start_pending state in the rate plugin for supporting
delayed start in the case no data is committed to slave PCM.
This fixes the problem of CPU hog with artsd.
Fixed the segfault in the error path of snd_pcm_hook_add_conf()
(calling invalid install_func pointer).
Also, added the missing snd_dlclose() to release the handle properly.