V4L/DVB (8797): A simple state machine was added to saa7134_ts.

A simple state machine was added to saa7134_ts. It has three states:

        SAA7134_TS_STOPPED
        SAA7134_TS_BUFF_DONE
        SAA7134_TS_STARTED

When buffer_setup is run we start the TS initialization: set SAA7134_TS_STOPPED.
When all buffers are prepared we write data into DMA register and set
SAA7134_TS_BUFF_DONE.
When the first buffer is active start TS and set SAA7134_TS_STARTED.
When ts_release is called stop TS and set SAA7134_TS_STOPPED.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2 files changed