aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/siano/smscoreapi.c
diff options
context:
space:
mode:
authorUri Shkolnik <uris@siano-ms.com>2009-05-12 12:28:46 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 19:14:29 -0300
commit793786d19a35c59a9379cb75da5b5d6bd052820d (patch)
tree0f7384f23a77505630db3ba6a5ea4152ad76af13 /drivers/media/dvb/siano/smscoreapi.c
parentba79bb2c381f01224786270d0914d46f31667cf0 (diff)
downloadkernel_samsung_smdk4412-793786d19a35c59a9379cb75da5b5d6bd052820d.zip
kernel_samsung_smdk4412-793786d19a35c59a9379cb75da5b5d6bd052820d.tar.gz
kernel_samsung_smdk4412-793786d19a35c59a9379cb75da5b5d6bd052820d.tar.bz2
V4L/DVB (11782): Siano: smsdvb - use 'push' status mechanism
This patch replace the old method of pulling the device status by sending "get_statistics" request, to push mode. This make status update much faster, and reduce various operation time (UHF scan now takes 15s instead of 2m). In order to make the change the following modification have been applied: 1) core header - update statistics headers. 2) dvb adapter - omit the statistics request, add handling of status indications. 3) core 'onresponse' - re-route messages addressed to other adapter to the dvb adapter. 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/smscoreapi.c')
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index f3e1cc7..398e219 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -904,14 +904,11 @@ smscore_client_t *smscore_find_client(struct smscore_device_t *coredev,
*
*/
void smscore_onresponse(struct smscore_device_t *coredev,
- struct smscore_buffer_t *cb)
-{
- struct SmsMsgHdr_ST *phdr =
- (struct SmsMsgHdr_ST *)((u8 *) cb->p + cb->offset);
- struct smscore_client_t *client =
- smscore_find_client(coredev, phdr->msgType, phdr->msgDstId);
+ struct smscore_buffer_t *cb) {
+ struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p
+ + cb->offset);
+ struct smscore_client_t *client;
int rc = -EBUSY;
-
static unsigned long last_sample_time; /* = 0; */
static int data_total; /* = 0; */
unsigned long time_now = jiffies_to_msecs(jiffies);
@@ -929,6 +926,16 @@ void smscore_onresponse(struct smscore_device_t *coredev,
}
data_total += cb->size;
+ /* Do we need to re-route? */
+ if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) ||
+ (phdr->msgType == MSG_SMS_TRANSMISSION_IND)) {
+ if (coredev->mode == DEVICE_MODE_DVBT_BDA)
+ phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID;
+ }
+
+
+ client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId);
+
/* If no client registered for type & id,
* check for control client where type is not registered */
if (client)