aboutsummaryrefslogtreecommitdiff
path: root/tinycap.c
AgeCommit message (Collapse)Author
2015-09-15Merge pull request #62 from gkasten/pcm_config_zeroSimon Wilson
initialize pcm_config to zero
2015-09-02initialize pcm_config to zeroHaynes Mathew George
sw_params ioctl() is failing with 'invalid parameter' error since pointer to pcm_config passed from tinyplay is not zero initialized, hence invalid values are passed for some parameters. authored-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org> Bug: 23525433 Change-Id: I841f29c82ec3fb7646ad8c47fca25963b5f77945
2013-08-13tinycap: support streaming captured PCM to stdoutRichard Fitzgerald
It is sometimes useful for testing to be able to stream the captured PCM to another tool instead of being forced to save it to a WAV file. Using '--' instead of the target filename will send the raw PCM to stdout (without any header). Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
2013-07-17tinycap: support 24 bit captureSimon Wilson
2013-04-30tinycap: convert size from frames to bytesceskobassman
2012-11-09Add -Wall to Makefile and fix warningsSimon Wilson
2012-07-03Report correct chunk size per RIFF format requirementsPeter Malkin
Change-Id: I72948868c4da88556b022ca2c583a351c5019022
2012-04-05tinycap: Fix byte_rate and block_align valuesMisael Lopez Cruz
'byte_rate' and 'block_align' sections of the WAV header were calculated using an invalid 'bits_per_sample' value. 'bits_per_sample' is now set before it gets used by other fields. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
2012-03-08tinycap: add missing options to usage stringSimon Wilson
2012-02-08tinycap, tinyplay, tinymix: Add extra parameters.Gabriel M. Beddingfield
Command-line arguments are added for: tinyplay and tinycap: -D n -- card number -p n -- period size -n n -- number of periods per buffer tinymix: -D n -- card number Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
2012-02-08tinycap, tinyplay: Check *argv before dereferencing.Gabriel M. Beddingfield
In several places, argv is incremented and *argv is dereferenced without checking to see if it is valid to do so. This could lead to a buffer overrun if the user provides invalid parameters. This patch generally changes this: if (strcmp(*argv, "-r") == 0) { argv++; rate = atoi(*argv); } argv++; To this: if (strcmp(*argv, "-r") == 0) { argv++; if (*argv) rate = atoi(*argv); } if (*argv) argv++; Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>
2011-08-05Ensure threasholds are zeroed before opening pcmSimon Wilson
Fixes tinyplay and tinycap after a recent change to allow threasholds to be set in the pcm module.
2011-07-19tinycap: remove extra parameter from strcmpSimon Wilson
2011-07-14Add tinycap utility to capture PCM riff/wave filesSimon Wilson
This adds a utility to capture audio with a specified number of parameters. Capturing continues until a signal is received (ctrl-c). Contains some contributions from Chris Kelly <c-kelly@ti.com>