pcm: Do prepare action in pcm_open()

This eliminates the need for prepare in transfer functions
and pcm_start().

Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
This commit is contained in:
Ricardo Biehl Pasquali
2018-08-22 16:10:45 -03:00
parent e6c9e35c11
commit 5a66a188ee
+4
View File
@@ -1129,6 +1129,10 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
}
#endif
/* prepare here so the user does not need to do this later */
if (pcm_prepare(pcm))
goto fail;
pcm->underruns = 0;
return pcm;