lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ALSA: compress: document the compress audio state machine
HI Pierre,

On 19-06-20, 09:22, Pierre-Louis Bossart wrote:
>
> > +
> > + +----------+
> > + | |
> > + | OPEN |
> > + | |
> > + +----------+
> > + |
> > + |
> > + | compr_set_params()
> > + |
> > + V
> > + +----------+
> > + compr_drain_notify() | |
> > + +------------------------>| SETUP |
> > + | | |
> > + | +----------+
> > + | |
> > + | |
> > + | | compr_write()
> > + | |
> > + | V
> > + | +----------+
> > + | | |
> > + | | PREPARE |
> > + | | |
> > + | +----------+
> > + | |
> > + | |
> > + | | compr_start()
> > + | |
> > + | V
> > + +----------+ +----------+ compr_pause() +----------+
> > + | | | |----------------------->| |
> > + | DRAIN |<-------------------| RUNNING | | PAUSE |
> > + | | | |<-----------------------| |
> > + +----------+ +----------+ compr_resume() +----------+
> > + | |
> > + | |
> > + | | compr_free()
> > + | |
> > + | V
> > + | +----------+
> > + | compr_free() | |
> > + +------------------------>| |
> > + | STOP |
> > + | |
> > + +----------+
>
>
> The STOP state doesn't seem quite right to me, sorry.

We should call it free, Will update

> the direction of the DRAIN-STOP comp_free() arrow seems wrong? Of if it is
> correct, then something's missing to exit the STOP state so that the stream
> can be opened again.

Once stream is freed, it can't be opened again.

But we have trigger stop which is not comprehended here, I will add
compr_stop() above which would transition to SETUP state. And a stopped
stream can be freed up as well, so one more transition from SETUP to
FREE.

Thanks for reviewing
--
~Vinod

\
 
 \ /
  Last update: 2020-06-22 07:33    [W:0.055 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site