Skip to contentSkip to conversation

[09051_47] Siano: smsdvb - add DVB v3 events

PATCH Uri Shkolnik 2 participants 2 messages May 19, 2009 – May 20, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw
Quoted 200 lines · Michael Krufky

From: Michael Krufky <[email protected]>
Subject: Re: [PATCH] [09051_47] Siano: smsdvb - add DVB v3 events
To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>, "Mauro Carvalho Chehab" <[email protected]>
Date: Tuesday, May 19, 2009, 9:16 PM

Quoted 4 lines · Uri Shkolnik

--- On Tue, 5/19/09, Michael Krufky <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines

From: Michael Krufky <[email protected]>
Subject: Re: [PATCH] [09051_47] Siano: smsdvb -

add DVB v3 events

Quoted 2 lines
Quoted 2 lines

To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>,

"Mauro Carvalho Chehab" <[email protected]>

Quoted 9 lines
Quoted 9 lines

Date: Tuesday, May 19, 2009, 7:18 PM

Quoted 5 lines · Uri Shkolnik

# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1242747164 -10800
# Node ID

971d4cc0d4009650bd4752c6a9fc09755ef77baf

Quoted 1 line
Quoted 1 line
Quoted 1 line

# Parent

 98895daafb42f8b0757fd608b29c53c80327520e

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

[09051_47] Siano: smsdvb - add DVB v3 events

From: Uri Shkolnik <[email protected]>

Add various DVB-API v3 events, those events

will trig

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

target (card) events.

Priority: normal

diff -r 98895daafb42 -r 971d4cc0d400

linux/drivers/media/dvb/siano/smsdvb.c

Quoted 1 line

--- a/linux/drivers/media/dvb/siano/smsdvb.c

   Tue

Quoted 2 lines
Quoted 2 lines
May 19 18:27:38 2009 +0300
Quoted 1 line

+++ b/linux/drivers/media/dvb/siano/smsdvb.c

   Tue

Quoted 2 lines
Quoted 2 lines
May 19 18:32:44 2009 +0300

Review MODULE_PARM_DESC(debug,

Quoted 1 line
(quoted diff) +0 -0
@@ -66,6 +66,54 @@ MODULE_PARM_DESC(debug,

"set debug

Quoted 2 lines
Quoted 2 lines

level

Quoted 1 line
(quoted diff) +0 -0
  /* Events that may come from DVB v3 adapter

*/

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

 static void sms_board_dvb3_event(struct

smsdvb_client_t *client,

Quoted 1 line

               enum SMS_DVB3_EVENTS

event) {

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

+
+       struct smscore_device_t *coredev

=

Quoted 4 lines
Quoted 4 lines

client->coredev;

Quoted 3 lines

+       switch (event) {
+       case DVB3_EVENT_INIT:
+

sms_debug("DVB3_EVENT_INIT");

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

sms_board_event(coredev,

Quoted 4 lines
Quoted 4 lines

BOARD_EVENT_BIND);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_SLEEP:
+

sms_debug("DVB3_EVENT_SLEEP");

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

sms_board_event(coredev,

Quoted 6 lines
Quoted 6 lines

BOARD_EVENT_POWER_SUSPEND);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_HOTPLUG:
+

sms_debug("DVB3_EVENT_HOTPLUG");

Quoted 1 line

+

sms_board_event(coredev,

Quoted 4 lines
Quoted 4 lines

BOARD_EVENT_POWER_INIT);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_FE_LOCK:
+               if

(client->event_fe_state

Quoted 11 lines
Quoted 11 lines

!= DVB3_EVENT_FE_LOCK) {

Quoted 1 line

+

client->event_fe_state = DVB3_EVENT_FE_LOCK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_FE_LOCK");

Quoted 1 line

+

sms_board_event(coredev, BOARD_EVENT_FE_LOCK);

Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_FE_UNLOCK:
+               if

(client->event_fe_state

Quoted 11 lines
Quoted 11 lines

!= DVB3_EVENT_FE_UNLOCK) {

Quoted 1 line

+

client->event_fe_state = DVB3_EVENT_FE_UNLOCK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_FE_UNLOCK");

Quoted 1 line

+

sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK);

Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_UNC_OK:
+               if

(client->event_unc_state

Quoted 7 lines
Quoted 7 lines

!= DVB3_EVENT_UNC_OK) {

Quoted 1 line

+

client->event_unc_state = DVB3_EVENT_UNC_OK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_UNC_OK");

Quoted 1 line

+

sms_board_event(coredev,

BOARD_EVENT_MULTIPLEX_OK);

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_UNC_ERR:
+               if

(client->event_unc_state

Quoted 7 lines
Quoted 7 lines

!= DVB3_EVENT_UNC_ERR) {

Quoted 1 line

+

client->event_unc_state = DVB3_EVENT_UNC_ERR;

Quoted 1 line

+

sms_debug("DVB3_EVENT_UNC_ERR");

Quoted 1 line

+

sms_board_event(coredev,

BOARD_EVENT_MULTIPLEX_ERRORS);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

+               }
+               break;
+
+       default:
+               sms_err("Unknown dvb3

api

Quoted 6 lines
Quoted 6 lines

event");

Quoted 5 lines

+               break;
+       }
 }

 static int smsdvb_onresponse(void *context,

struct

Quoted 14 lines
Quoted 14 lines

smscore_buffer_t *cb)

Quoted 6 lines

--
To unsubscribe from this list: send the line

"unsubscribe linux-media" in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 3 lines
Quoted 3 lines

Uri,

I don't understand what prompts you to call these

"DVB v3

Quoted 4 lines
Quoted 4 lines

events" ...
what does this have to do with DVB API v3 at all?
Your idea seems to
be in the right direction, but this "DVBV3"

nomenclature is

Quoted 4 lines
Quoted 4 lines

a total
misnomer.

I think something along the lines of

SMSBOARD_EVENT_FOO is

Quoted 10 lines
Quoted 6 lines

more appropriate.

Regards,

Mike

Mike,

Within the DVB version 3 adapter, there is events

manager, and the name we put on it is  "dvb3_event", I think its OK....

Quoted 7 lines

Uri

--
To unsubscribe from this list: send the line

"unsubscribe linux-media" in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 9 lines

I disagree.  Your naming implies that these structures are on the
subsystem level, and they have nothing to do with DVB3 anyway -- these
are board related events.  "dvb3_event" is a total misnomer.

-Mike

If its really really important, I can change it to SMS_DVB3_EVENT...

Uri

#1 lore raw

Em Tue, 19 May 2009 11:20:44 -0700 (PDT)
Uri Shkolnik <[email protected]> escreveu:

Quoted 212 lines
Quoted 207 lines · Michael Krufky

From: Michael Krufky <[email protected]>
Subject: Re: [PATCH] [09051_47] Siano: smsdvb - add DVB v3 events
To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>, "Mauro Carvalho Chehab" <[email protected]>
Date: Tuesday, May 19, 2009, 9:16 PM

Quoted 4 lines · Uri Shkolnik

--- On Tue, 5/19/09, Michael Krufky <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines

From: Michael Krufky <[email protected]>
Subject: Re: [PATCH] [09051_47] Siano: smsdvb -

add DVB v3 events

Quoted 2 lines
Quoted 2 lines

To: "Uri Shkolnik" <[email protected]>
Cc: "LinuxML" <[email protected]>,

"Mauro Carvalho Chehab" <[email protected]>

Quoted 9 lines
Quoted 9 lines

Date: Tuesday, May 19, 2009, 7:18 PM

Quoted 5 lines · Uri Shkolnik

# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1242747164 -10800
# Node ID

971d4cc0d4009650bd4752c6a9fc09755ef77baf

Quoted 1 line
Quoted 1 line
Quoted 1 line

# Parent

 98895daafb42f8b0757fd608b29c53c80327520e

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

[09051_47] Siano: smsdvb - add DVB v3 events

From: Uri Shkolnik <[email protected]>

Add various DVB-API v3 events, those events

will trig

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

target (card) events.

Priority: normal

diff -r 98895daafb42 -r 971d4cc0d400

linux/drivers/media/dvb/siano/smsdvb.c

Quoted 1 line

--- a/linux/drivers/media/dvb/siano/smsdvb.c

   Tue

Quoted 2 lines
Quoted 2 lines
May 19 18:27:38 2009 +0300
Quoted 1 line

+++ b/linux/drivers/media/dvb/siano/smsdvb.c

   Tue

Quoted 2 lines
Quoted 2 lines
May 19 18:32:44 2009 +0300

Review MODULE_PARM_DESC(debug,

Quoted 1 line
(quoted diff) +0 -0
@@ -66,6 +66,54 @@ MODULE_PARM_DESC(debug,

"set debug

Quoted 2 lines
Quoted 2 lines

level

Quoted 1 line
(quoted diff) +0 -0
  /* Events that may come from DVB v3 adapter

*/

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

 static void sms_board_dvb3_event(struct

smsdvb_client_t *client,

Quoted 1 line

               enum SMS_DVB3_EVENTS

event) {

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

+
+       struct smscore_device_t *coredev

=

Quoted 4 lines
Quoted 4 lines

client->coredev;

Quoted 3 lines

+       switch (event) {
+       case DVB3_EVENT_INIT:
+

sms_debug("DVB3_EVENT_INIT");

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

sms_board_event(coredev,

Quoted 4 lines
Quoted 4 lines

BOARD_EVENT_BIND);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_SLEEP:
+

sms_debug("DVB3_EVENT_SLEEP");

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

sms_board_event(coredev,

Quoted 6 lines
Quoted 6 lines

BOARD_EVENT_POWER_SUSPEND);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_HOTPLUG:
+

sms_debug("DVB3_EVENT_HOTPLUG");

Quoted 1 line

+

sms_board_event(coredev,

Quoted 4 lines
Quoted 4 lines

BOARD_EVENT_POWER_INIT);

Quoted 3 lines

+               break;
+       case DVB3_EVENT_FE_LOCK:
+               if

(client->event_fe_state

Quoted 11 lines
Quoted 11 lines

!= DVB3_EVENT_FE_LOCK) {

Quoted 1 line

+

client->event_fe_state = DVB3_EVENT_FE_LOCK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_FE_LOCK");

Quoted 1 line

+

sms_board_event(coredev, BOARD_EVENT_FE_LOCK);

Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_FE_UNLOCK:
+               if

(client->event_fe_state

Quoted 11 lines
Quoted 11 lines

!= DVB3_EVENT_FE_UNLOCK) {

Quoted 1 line

+

client->event_fe_state = DVB3_EVENT_FE_UNLOCK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_FE_UNLOCK");

Quoted 1 line

+

sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK);

Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_UNC_OK:
+               if

(client->event_unc_state

Quoted 7 lines
Quoted 7 lines

!= DVB3_EVENT_UNC_OK) {

Quoted 1 line

+

client->event_unc_state = DVB3_EVENT_UNC_OK;

Quoted 1 line

+

sms_debug("DVB3_EVENT_UNC_OK");

Quoted 1 line

+

sms_board_event(coredev,

BOARD_EVENT_MULTIPLEX_OK);

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+               }
+               break;
+       case DVB3_EVENT_UNC_ERR:
+               if

(client->event_unc_state

Quoted 7 lines
Quoted 7 lines

!= DVB3_EVENT_UNC_ERR) {

Quoted 1 line

+

client->event_unc_state = DVB3_EVENT_UNC_ERR;

Quoted 1 line

+

sms_debug("DVB3_EVENT_UNC_ERR");

Quoted 1 line

+

sms_board_event(coredev,

BOARD_EVENT_MULTIPLEX_ERRORS);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

+               }
+               break;
+
+       default:
+               sms_err("Unknown dvb3

api

Quoted 6 lines
Quoted 6 lines

event");

Quoted 5 lines

+               break;
+       }
 }

 static int smsdvb_onresponse(void *context,

struct

Quoted 14 lines
Quoted 14 lines

smscore_buffer_t *cb)

Quoted 6 lines

--
To unsubscribe from this list: send the line

"unsubscribe linux-media" in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 3 lines
Quoted 3 lines

Uri,

I don't understand what prompts you to call these

"DVB v3

Quoted 4 lines
Quoted 4 lines

events" ...
what does this have to do with DVB API v3 at all?
Your idea seems to
be in the right direction, but this "DVBV3"

nomenclature is

Quoted 4 lines
Quoted 4 lines

a total
misnomer.

I think something along the lines of

SMSBOARD_EVENT_FOO is

Quoted 10 lines
Quoted 6 lines

more appropriate.

Regards,

Mike

Mike,

Within the DVB version 3 adapter, there is events

manager, and the name we put on it is  "dvb3_event", I think its OK....

Quoted 7 lines

Uri

--
To unsubscribe from this list: send the line

"unsubscribe linux-media" in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

I disagree.  Your naming implies that these structures are on the
subsystem level, and they have nothing to do with DVB3 anyway -- these
are board related events.  "dvb3_event" is a total misnomer.

Quoted 4 lines
Quoted 2 lines

-Mike

If its really really important, I can change it to SMS_DVB3_EVENT...

I'm ok with any nomenclature you choose, provided that they'll be confined inside the siano driver. It is a very good idea to have your local symbols starting with the name of the driver (in this case, SMS or sms), as recommended by some docs at Linux Documentation dir.

If I have to vote for a name, I would get the smaller one that starts with SMS. Something like SMS_EVENT_foo will be perfect, but this is just my 2 cents.

Cheers,
Mauro