mirror of
https://github.com/openharmony/third_party_tinyalsa.git
synced 2026-07-19 23:33:30 -04:00
pcm: Remove prepare before start
Prepare is done in pcm_open(). Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user