aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2018-12-31 17:23:39 -0200
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 13:06:18 -0200
commit7ff9cde3fc45014c6b0457a846d5902b1fbfe5b0 (patch)
tree2d9a7a08cf4b1f9c410d21157f56b9eff556e08b /src
parent13e11fea99849b34ba4fe2f06475c71c81fd8e59 (diff)
pcm: Remove prepare before start
Prepare is done in pcm_open(). Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 3900ee6..b453c6f 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -1205,20 +1205,13 @@ int pcm_prepare(struct pcm *pcm)
}
/** Starts a PCM.
- * If the PCM has not been prepared,
- * it is prepared in this function.
* @param pcm A PCM handle.
* @return On success, zero; on failure, a negative number.
* @ingroup libtinyalsa-pcm
*/
int pcm_start(struct pcm *pcm)
{
- int prepare_error = pcm_prepare(pcm);
- if (prepare_error)
- return prepare_error;
-
- /* if pcm is linked, it may be already started by other pcm */
- /* check pcm state is not in running state */
+ /* set appl_ptr and avail_min in kernel */
pcm_sync_ptr(pcm, 0);
if (pcm->mmap_status->state != PCM_STATE_RUNNING) {