From patchwork Tue May 19 15:28:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uri Shkolnik X-Patchwork-Id: 24745 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4JFSLZJ003737 for ; Tue, 19 May 2009 15:28:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbZESP2D (ORCPT ); Tue, 19 May 2009 11:28:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753060AbZESP2C (ORCPT ); Tue, 19 May 2009 11:28:02 -0400 Received: from web110815.mail.gq1.yahoo.com ([67.195.13.238]:47068 "HELO web110815.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752497AbZESP2B (ORCPT ); Tue, 19 May 2009 11:28:01 -0400 Received: (qmail 2511 invoked by uid 60001); 19 May 2009 15:28:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242746882; bh=ILESfjtXut5aS2zGUZH0q69GvSzBp9aO0BaNEmQVZh0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=YdMn9+P5ngin8FNoXM1OwWuLiQCh4oBJiTgPsj4muTkt5QaGrQLxELWCHpGx2HfKV/eLhx9rfHvs1n6yXPN8QT3aSoOhIYRNbAWFolJz+OTIoBvgq7DkzIWcF/ZEDz95YgXG1XCNhx8D/fNRKOhhBgQCIKClQSe58k5Z2MRPXf8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=lpdnGRwZi49bYbczFhyzHKyUnbQsbd/ntChJZTDPU5QLzIsbZNZw66bE3EvtENHqsOUVc79PYVab/vae9pwX9MKUUTCLteNlSa3pIvnE5v4YgeEKyS4UQCqzfS8a3dCHugVHqsDNm3faY4PvIckDhpLE4h7iU+/oDrSYY5F856s=; Message-ID: <713142.1655.qm@web110815.mail.gq1.yahoo.com> X-YMail-OSG: Q4ohf98VM1nqC_4KHEh.emvFiJ9TzxsR.LmmmTBWWvPNU3Fh8I.uNn9HvSMNZ1aBLmmwKqgWjaioI2bUAUqLn22N2N10TV6zKbH6c7mACfco4GrTusO1i3XWcHd.IgslRV4VuZnDu_ZZiakHGUoiM5pNOIb68XMh6VArK9iIqNzxLX6_9k7_K_.oeHf45pIcZbsI6xpYp5JTscEvkOLCu73sI.bpgRGYJLAblWB6FWEeXZ24zsgeu0idVgjZCHMss_cphFYGgRqBol4mslqEGdKaeFuPkPxAT2IyUUcLE5N0lJUEqIOpHpdi7BxTH_H73P1UjZlkptXxsVg13tudIsjsmFpNCX1iICeCswjgVuDCDyTJXbpfjv_hVQ-- Received: from [199.203.99.233] by web110815.mail.gq1.yahoo.com via HTTP; Tue, 19 May 2009 08:28:02 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Tue, 19 May 2009 08:28:02 -0700 (PDT) From: Uri Shkolnik Subject: [PATCH] [09051_47] Siano: smsdvb - add DVB v3 events To: LinuxML MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org # HG changeset patch # User Uri Shkolnik # Date 1242747164 -10800 # Node ID 971d4cc0d4009650bd4752c6a9fc09755ef77baf # Parent 98895daafb42f8b0757fd608b29c53c80327520e [09051_47] Siano: smsdvb - add DVB v3 events From: Uri Shkolnik Add various DVB-API v3 events, those events will trig target (card) events. Priority: normal Signed-off-by: Uri Shkolnik --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r 98895daafb42 -r 971d4cc0d400 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.c Tue May 19 18:27:38 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.c Tue May 19 18:32:44 2009 +0300 @@ -66,6 +66,54 @@ MODULE_PARM_DESC(debug, "set debug level /* Events that may come from DVB v3 adapter */ static void sms_board_dvb3_event(struct smsdvb_client_t *client, enum SMS_DVB3_EVENTS event) { + + struct smscore_device_t *coredev = client->coredev; + switch (event) { + case DVB3_EVENT_INIT: + sms_debug("DVB3_EVENT_INIT"); + sms_board_event(coredev, BOARD_EVENT_BIND); + break; + case DVB3_EVENT_SLEEP: + sms_debug("DVB3_EVENT_SLEEP"); + sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); + break; + case DVB3_EVENT_HOTPLUG: + sms_debug("DVB3_EVENT_HOTPLUG"); + sms_board_event(coredev, BOARD_EVENT_POWER_INIT); + break; + case DVB3_EVENT_FE_LOCK: + if (client->event_fe_state != DVB3_EVENT_FE_LOCK) { + client->event_fe_state = DVB3_EVENT_FE_LOCK; + sms_debug("DVB3_EVENT_FE_LOCK"); + sms_board_event(coredev, BOARD_EVENT_FE_LOCK); + } + break; + case DVB3_EVENT_FE_UNLOCK: + if (client->event_fe_state != DVB3_EVENT_FE_UNLOCK) { + client->event_fe_state = DVB3_EVENT_FE_UNLOCK; + sms_debug("DVB3_EVENT_FE_UNLOCK"); + sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); + } + break; + case DVB3_EVENT_UNC_OK: + if (client->event_unc_state != DVB3_EVENT_UNC_OK) { + client->event_unc_state = DVB3_EVENT_UNC_OK; + sms_debug("DVB3_EVENT_UNC_OK"); + sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); + } + break; + case DVB3_EVENT_UNC_ERR: + if (client->event_unc_state != DVB3_EVENT_UNC_ERR) { + client->event_unc_state = DVB3_EVENT_UNC_ERR; + sms_debug("DVB3_EVENT_UNC_ERR"); + sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); + } + break; + + default: + sms_err("Unknown dvb3 api event"); + break; + } } static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)