diff options
Diffstat (limited to 'drivers/media')
-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) |