diff options
author | Dmitry Belimov <d.belimov@gmail.com> | 2008-08-26 14:16:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 09:36:55 -0200 |
commit | 92c36147a7fdcead94f98c0a14f30d279653fa64 (patch) | |
tree | 450358d9eb4ce34ccdeb9a93392dc1fc333564bf /drivers/media/video/saa7134/saa7134.h | |
parent | 8809b9cc8658d27c17d4fc07811b0ebd3f74f20c (diff) |
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>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134.h')
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index a0884f639f6..a1e0dad1267 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -462,6 +462,12 @@ struct saa7134_mpeg_ops { void (*signal_change)(struct saa7134_dev *dev); }; +enum saa7134_ts_status { + SAA7134_TS_STOPPED, + SAA7134_TS_BUFF_DONE, + SAA7134_TS_STARTED, +}; + /* global device status */ struct saa7134_dev { struct list_head devlist; @@ -555,6 +561,8 @@ struct saa7134_dev { /* SAA7134_MPEG_* */ struct saa7134_ts ts; struct saa7134_dmaqueue ts_q; + enum saa7134_ts_status ts_state; + unsigned int buff_cnt; struct saa7134_mpeg_ops *mops; struct i2c_client *mpeg_i2c_client; |