aboutsummaryrefslogtreecommitdiff
path: root/pcm.c
AgeCommit message (Collapse)Author
2016-10-01voided unused parameterTaylor Holberton
2016-10-01added support for more signed typesTaylor Holberton
2016-09-16fixed bracket placementTaylor Holberton
2016-09-16Merge pull request #74 from dimkr/masterTaylor Holberton
include time.h, to prevent use of struct timespec before definition
2016-08-03Added get_file_descriptor()Taylor Holberton
2016-03-05include time.h, to prevent use of struct timespec before definitionDima Krasner
In some old (2.6.32.x) kernel headers, asound.h does not include linux time.h when __KERNEL__ is undefined, which may break userspace. The build failures caused by this are similar to those fixed by c8333f8c. Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2015-09-15Merge pull request #48 from vinodkoul/wait_delaySimon Wilson
Wait delay
2015-09-15Merge pull request #37 from StevenNAN/patch-1Simon Wilson
avail issue
2014-08-12tinyalsa: add pcm_get_subdevice()David Wagner
The users of tinyalsa had no way of knowing on which subdevice a stream had been created. A new API, "unsigned int pcm_get_subdevice(struct *pcm)" returns it. This information is filled during the pcm_open() Change-Id: Ie866e10e06ce6691ede09e2ca46a24441723ea8b Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12Tinyalsa: add pcm_delay()Hardik T Shah
ALSA supports reporting of pcm_delay, make that availble to the users of tinyalsa too Change-Id: Ic460f5c55137d263fdf7b142503d3bd52c4b7ebd Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Apelete Seketeli <apeletex.seketeli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-08-12Tinyalsa: allow pcm_wait to wait on POLLIN eventsApelete Seketeli
Tinyalsa pcm_wait() function does not wait on POLLIN events, preventing it to be used when recording audio data. This allows pcm_wait to wait on POLLIN events. Change-Id: I2e4bd0f4f57415add37213f8785a3602897f2c8a Signed-off-by: Apelete Seketeli <apeletex.seketeli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-06-03Update tinypcminfo to display format informationAndy Hung
Change-Id: I0e6a04da5a4b122a3748b16c7eb01c4a224c3d84 Signed-off-by: Andy Hung <hunga@google.com>
2014-06-03Merge pull request #34 from elaurent/masterSimon Wilson
add support for mmap read
2014-05-08Merge pull request #33 from gkasten/CL_avsyncSimon Wilson
pcm_get_htimestamp can now use CLOCK_MONOTONIC
2014-04-29tinyalsa: add separate call for pcm prepareOmair Mohammed Abdullah
Tinyalsa combines PREPARE and START calls to the driver in the pcm_start() function. Typically, this is needed for making a driver allocating hardware resources that are not related to a PCM stream. Change-Id: Ic83fad784936bbebab28e8e425debd449182db88 Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-Tracking-BZ: 73509
2014-03-17Update pcm.cStevenNAN
avail will be wrong when avail is same with pcm->boundary.
2013-09-27add support for mmap readEric Laurent
2013-09-03pcm_get_htimestamp can now use CLOCK_MONOTONICGlenn Kasten
Previously the timebase was not documented. Now a new pcm_open flag can be used to specify the clock. If flag PCM_MONOTONIC is specified, then pcm_open uses SNDRV_PCM_IOCTL_TTSTAMP with parameter SNDRV_PCM_TSTAMP_TYPE_MONOTONIC to request timestamps in CLOCK_MONOTONIC. Change-Id: I40ce359cb38d686cbb2521fb0602a8a17ab4f925
2013-07-17pcm: support S24_LE formatSimon Wilson
S24_LE is 24 bit audio in a 32 bit sample size. Also make the pcm_format_to_bits() function part of the API since it will be required for tinycap.
2012-12-03pcm: add pcm_get_params APISimon Wilson
This enables the capabilities of any given PCM to be queried. Created with input from Priyesh Bisla and Gabriel Beddingfield.
2012-11-09Add -Wall to Makefile and fix warningsSimon Wilson
2012-10-22Fix several 'symbol defined but not used' warnings.Gabriel M. Beddingfield
2012-10-22pcm: Add support for S8 and S24LE formats.Gabriel M. Beddingfield
2012-09-18pcm: fix default capture start thresholdEric Laurent
Default start threshold was set to the same value (half of the buffer size) for playback and capture in pcm_open(). The normal default value for capture should be 1 frame.
2012-05-10add error check for pcm_startKeunyoung
- Otherwise, read will be tried even after pcm_start is failed. This leads into blocking inside the read ioctl forever. pcm_start can fail, for example in full-speed USB audio device, in some H/W, due to the lack of bandwidth in USB bus,
2012-05-04pcm: Add PCM_NORESTART flagJohn Grossman
Add a flag which can be passed to pcm_open (called PCM_NORESTART). When set on a playback stream, calls to pcm_write will not automatically attempt to restart an ALSA device in the case of an underflow. Instead, it will propagate the first EPIPE error up to the application to allow it to handle the underflow situation. Subsequent calls to pcm_write will attempt to start the pipeline.
2012-02-11pcm: Factor out pcm_start() from pcm_read()Mark Brown
When starting the stream we're doing the same as a start()
2012-02-10Merge pull request #11 from broonie/const-writetinyalsa
pcm: Constify write buffers
2012-02-10pcm: Constify write buffersMark Brown
Mark the write buffers as const - they won't be modified and this is friendlier to applications.
2012-02-08pcm: Fix integer size error.Gabriel M. Beddingfield
The following code: while (pcm->boundary * 2 <= LONG_MAX - pcm->buffer_size) pcm->boundary *= 2; Creates an infinite loop on systems where LONG_MAX != INT_MAX (e.g. 64-bit systems). pcm->boundary is an unsigned int, and so INT_MAX is the proper value to use.
2012-01-30pcm: fix pcm capture dropping samplesEric Laurent
Commit ee9ba87d modified the stop threshold for capture and playback and caused pcm samples to be dropped during capture. Restore initial stop threshold for capture and leave new value for playback.
2011-11-17pcm: more state checking in pcm_get_htimestamp()Eric Laurent
pcm_get_htimestamp() should return an error if stream state is not running or draining as the time stamp returned by the driver is not valid in other states. Change-Id: Icdfe9554b26f57119d7a8d762a6ea6e8e3eaf370
2011-11-16pcm: fix underrun detectionEric Laurent
The changes made for mmap mode broke the underrun detection by pushing the stop_threshold beyong the buffer size. This caused the hw_ptr to go past the app_ptr and pcm_get_htimestamp() to report wrong values in case of underrun. Change-Id: Ic671fdd09f3afb8a301a391b48788fd9bc99322d
2011-10-13pcm: add mmap playback and no periodic IRQ support.Liam Girdwood
Add mmap playback and no period IRQ support to pcm core.
2011-07-27pcm: add control for ASLA thresholds to pcm_openJohn Grossman
Add the ability to explicitly set start, stop and silence thresholds during tinyalsa's pcm_open. Setting any of these values to 0 in your pcm_config structure will cause the system to use its old defaults.
2011-07-25pcm: add pcm_get_htimestamp() functionEric Laurent
pcm_get_htimestamp() returns the number of available frames in the kernel driver buffers as well as the corresponding high resolution time stamp.
2011-06-24pcm: add pcm_start/stop() functions for streamsSimon Wilson
This is essential for streams such as loopback devices that do not transfer data.
2011-06-15pcm: fix TODOs for 32 bit supportSimon Wilson
2011-06-07Fix error cases and some spurious whitespaceSimon Wilson
2011-06-02Support multiple cards and devicesSimon Wilson
2011-05-30pcm: fix minor code errorsSimon Wilson
2011-05-25Initial contributionSimon Wilson