diff options
author | Uri Shkolnik <uris@siano-ms.com> | 2009-05-19 11:28:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:14:41 -0400 |
commit | 4db989f7745778f9f0a4f823bd5932f108dd76ba (patch) | |
tree | 9651241d33a91a6e7c3ac57a93ed381e38362928 /drivers/media/dvb/siano/smsdvb.c | |
parent | 07f56002c11897d663f6b1e74a564d821d4086a2 (diff) |
V4L/DVB (11889): Siano: smsdvb - add DVB v3 events
Add various DVB-API v3 events, those events will trig
target (card) events.
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/siano/smsdvb.c')
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index c845b79ed713..3ee1c3902c56 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -66,6 +66,54 @@ MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); | |||
66 | /* Events that may come from DVB v3 adapter */ | 66 | /* Events that may come from DVB v3 adapter */ |
67 | static void sms_board_dvb3_event(struct smsdvb_client_t *client, | 67 | static void sms_board_dvb3_event(struct smsdvb_client_t *client, |
68 | enum SMS_DVB3_EVENTS event) { | 68 | enum SMS_DVB3_EVENTS event) { |
69 | |||
70 | struct smscore_device_t *coredev = client->coredev; | ||
71 | switch (event) { | ||
72 | case DVB3_EVENT_INIT: | ||
73 | sms_debug("DVB3_EVENT_INIT"); | ||
74 | sms_board_event(coredev, BOARD_EVENT_BIND); | ||
75 | break; | ||
76 | case DVB3_EVENT_SLEEP: | ||
77 | sms_debug("DVB3_EVENT_SLEEP"); | ||
78 | sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); | ||
79 | break; | ||
80 | case DVB3_EVENT_HOTPLUG: | ||
81 | sms_debug("DVB3_EVENT_HOTPLUG"); | ||
82 | sms_board_event(coredev, BOARD_EVENT_POWER_INIT); | ||
83 | break; | ||
84 | case DVB3_EVENT_FE_LOCK: | ||
85 | if (client->event_fe_state != DVB3_EVENT_FE_LOCK) { | ||
86 | client->event_fe_state = DVB3_EVENT_FE_LOCK; | ||
87 | sms_debug("DVB3_EVENT_FE_LOCK"); | ||
88 | sms_board_event(coredev, BOARD_EVENT_FE_LOCK); | ||
89 | } | ||
90 | break; | ||
91 | case DVB3_EVENT_FE_UNLOCK: | ||
92 | if (client->event_fe_state != DVB3_EVENT_FE_UNLOCK) { | ||
93 | client->event_fe_state = DVB3_EVENT_FE_UNLOCK; | ||
94 | sms_debug("DVB3_EVENT_FE_UNLOCK"); | ||
95 | sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); | ||
96 | } | ||
97 | break; | ||
98 | case DVB3_EVENT_UNC_OK: | ||
99 | if (client->event_unc_state != DVB3_EVENT_UNC_OK) { | ||
100 | client->event_unc_state = DVB3_EVENT_UNC_OK; | ||
101 | sms_debug("DVB3_EVENT_UNC_OK"); | ||
102 | sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); | ||
103 | } | ||
104 | break; | ||
105 | case DVB3_EVENT_UNC_ERR: | ||
106 | if (client->event_unc_state != DVB3_EVENT_UNC_ERR) { | ||
107 | client->event_unc_state = DVB3_EVENT_UNC_ERR; | ||
108 | sms_debug("DVB3_EVENT_UNC_ERR"); | ||
109 | sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); | ||
110 | } | ||
111 | break; | ||
112 | |||
113 | default: | ||
114 | sms_err("Unknown dvb3 api event"); | ||
115 | break; | ||
116 | } | ||
69 | } | 117 | } |
70 | 118 | ||
71 | static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) | 119 | static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) |