sms1xxx: restore GPIO functionality for all Hauppauge devices
Mauro,
This changeset is not in your git tree for Linus, but it fixes a regression in the 2.6.31 kernel -- can you push this to Linus as well?
Thanks & regards,
Mike
Quoted 158 lines · Patch from Michael Krufky
The patch number 12446 was added via Michael Krufky <[email protected]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>------
From: Michael Krufky <[email protected]>
sms1xxx: restore GPIO functionality for all Hauppauge devicesPrevious changesets broke Hauppauge devices and their GPIO configurations.
This changeset restores the LED & LNA functionality.
Priority: high
Signed-off-by Michael Krufky <[email protected]>---
linux/drivers/media/dvb/siano/smsdvb.c | 44 +++++++++++++++++++++++++
1 file changed, 44 insertions(+)diff -r
70c2efcd6b4a-rf2deba9c23d6linux/drivers/media/dvb/siano/smsdvb.clinux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 22:30:14 2009 -0400 renamed from linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 17:25:45 2009 -0400 +14
-0@@ -325,6 +325,16 @@ 0 : -ETIME; } +static inline int led_feedback(struct smsdvb_client_t *client) +{ + if (client->fe_status & FE_HAS_LOCK) + return sms_board_led_feedback(client->coredev, + (client->sms_stat_dvb.ReceptionData.BER + == 0) ? SMS_LED_HI : SMS_LED_LO); + else + return sms_board_led_feedback(client->coredev, SMS_LED_OFF); +} + static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat) { struct smsdvb_client_t *client;@@ -332,6 +342,8 @@ *stat = client->fe_status; + led_feedback(client); + return 0; }@@ -342,6 +354,8 @@ *ber = client->sms_stat_dvb.ReceptionData.BER; + led_feedback(client); + return 0; }@@ -359,6 +373,8 @@(client->sms_stat_dvb.ReceptionData.InBandPwr
+ 95) * 3 / 2;+
led_feedback(client);
+
return 0;
}linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 22:30:14 2009 -0400 renamed from linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 17:25:45 2009 -0400 +23
-0@@ -369,6 +385,8 @@ *snr = client->sms_stat_dvb.ReceptionData.SNR; + led_feedback(client); + return 0; }@@ -379,6 +397,8 @@ *ucblocks = client->sms_stat_dvb.ReceptionData.ErrorTSPackets; + led_feedback(client); + return 0; }@@ -404,6 +424,8 @@ u32 Data[3]; } Msg; + int ret; + client->fe_status = FE_HAS_SIGNAL; client->event_fe_state = -1; client->event_unc_state = -1;@@ -429,6 +451,23 @@ case BANDWIDTH_AUTO: return -EOPNOTSUPP; default: return -EINVAL; } + /* Disable LNA, if any. An error is returned if no LNA is present */ + ret = sms_board_lna_control(client->coredev, 0); + if (ret == 0) { + fe_status_t status; + + /* tune with LNA off at first */ + ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), + &client->tune_done); + + smsdvb_read_status(fe, &status); + + if (status & FE_HAS_LOCK) + return ret; + + /* previous tune didnt lock - enable LNA and tune again */ + sms_board_lna_control(client->coredev, 1); + } return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), &client->tune_done);@@ -454,6 +493,8 @@struct
smsdvb_client_t*client =container_of(fe, struct smsdvb_client_t, frontend);+
sms_board_power(client->coredev, 1); +
sms_board_dvb3_event(client,DVB3_EVENT_INIT); return 0;
}linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 22:30:14 2009 -0400 renamed from linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 17:25:45 2009 -0400 +0
-0@@ -463,6 +504,9 @@struct
smsdvb_client_t*client =container_of(fe, struct smsdvb_client_t, frontend);+
sms_board_led_feedback(client->coredev, SMS_LED_OFF);
+sms_board_power(client->coredev, 0);
+
sms_board_dvb3_event(client,DVB3_EVENT_SLEEP);return 0;
---
Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/f2deba9c23d68c9b46812c76b5aebee189f36b20
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
Quoted 8 lines
Mauro,
This changeset is not in your git tree for Linus, but it fixes a regression in the 2.6.31 kernel -- can you push this to Linus as well?
Thanks & regards,
Mike
Fixes for Hauppauge/Pinnacle devices are never ignored.
http://linuxtv.org/hg/v4l-dvb/rev/f2deba9c23d6
http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-08/msg04800.html
It might be related to this.
http://lkml.indiana.edu/hypermail/linux/kernel/0908.1/02080.html
You eventually might get some noise, if there are no fixes for more than one year, but never the other way round.
:)
Cheers,
Hermann
Quoted 156 lines
Quoted 153 lines · Patch from Michael Krufky
The patch number 12446 was added via Michael Krufky <[email protected]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>------
From: Michael Krufky <[email protected]>
sms1xxx: restore GPIO functionality for all Hauppauge devicesPrevious changesets broke Hauppauge devices and their GPIO configurations.
This changeset restores the LED & LNA functionality.
Priority: high
Signed-off-by Michael Krufky <[email protected]>---
linux/drivers/media/dvb/siano/smsdvb.c | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+)diff -r
70c2efcd6b4a-rf2deba9c23d6linux/drivers/media/dvb/siano/smsdvb.clinux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 22:30:14 2009 -0400 renamed from linux/drivers/media/dvb/siano/smsdvb.c Sun Jul 12 17:25:45 2009 -0400 +44
-1@@ -325,6 +325,16 @@ 0 : -ETIME; } +static inline int led_feedback(struct smsdvb_client_t *client) +{ + if (client->fe_status & FE_HAS_LOCK) + return sms_board_led_feedback(client->coredev, + (client->sms_stat_dvb.ReceptionData.BER + == 0) ? SMS_LED_HI : SMS_LED_LO); + else + return sms_board_led_feedback(client->coredev, SMS_LED_OFF); +} + static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat) { struct smsdvb_client_t *client;@@ -332,6 +342,8 @@ *stat = client->fe_status; + led_feedback(client); + return 0; }@@ -342,6 +354,8 @@ *ber = client->sms_stat_dvb.ReceptionData.BER; + led_feedback(client); + return 0; }@@ -359,6 +373,8 @@ (client->sms_stat_dvb.ReceptionData.InBandPwr + 95) * 3 / 2; + led_feedback(client); + return 0; }@@ -369,6 +385,8 @@ *snr = client->sms_stat_dvb.ReceptionData.SNR; + led_feedback(client); + return 0; }@@ -379,6 +397,8 @@ *ucblocks = client->sms_stat_dvb.ReceptionData.ErrorTSPackets; + led_feedback(client); + return 0; }@@ -404,6 +424,8 @@ u32 Data[3]; } Msg; + int ret; + client->fe_status = FE_HAS_SIGNAL; client->event_fe_state = -1; client->event_unc_state = -1;@@ -429,6 +451,23 @@ case BANDWIDTH_AUTO: return -EOPNOTSUPP; default: return -EINVAL; } + /* Disable LNA, if any. An error is returned if no LNA is present */ + ret = sms_board_lna_control(client->coredev, 0); + if (ret == 0) { + fe_status_t status; + + /* tune with LNA off at first */ + ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), + &client->tune_done); + + smsdvb_read_status(fe, &status); + + if (status & FE_HAS_LOCK) + return ret; + + /* previous tune didnt lock - enable LNA and tune again */ + sms_board_lna_control(client->coredev, 1); + } return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), &client->tune_done);@@ -454,6 +493,8 @@ struct smsdvb_client_t *client = container_of(fe, struct smsdvb_client_t, frontend); + sms_board_power(client->coredev, 1); + sms_board_dvb3_event(client, DVB3_EVENT_INIT); return 0; }@@ -463,6 +504,9 @@ struct smsdvb_client_t *client = container_of(fe, struct smsdvb_client_t, frontend); + sms_board_led_feedback(client->coredev, SMS_LED_OFF); + sms_board_power(client->coredev, 0); + sms_board_dvb3_event(client, DVB3_EVENT_SLEEP); return 0; ---Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/f2deba9c23d68c9b46812c76b5aebee189f36b20
Quoted 20 lines · hermann pitton
Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
Quoted 8 lines
Mauro,
This changeset is not in your git tree for Linus, but it fixes a regression in the 2.6.31 kernel -- can you push this to Linus as well?
Thanks & regards,
Mike
Fixes for Hauppauge/Pinnacle devices are never ignored.
http://linuxtv.org/hg/v4l-dvb/rev/f2deba9c23d6
http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-08/msg04800.htmlIt might be related to this.
http://lkml.indiana.edu/hypermail/linux/kernel/0908.1/02080.html
Quoted 7 lines
You eventually might get some noise, if there are no fixes for more than one year, but never the other way round.
:)
Cheers,
Hermann
Thanks for your input, Hermann, but you're not entirely accurate -- Mauro's pull request contains the changeset to fix the broken Hauppauge devices, but it does not mention the fix to restore the GPIO functionality.
I am aware that he "forgot to push" -- I was actually referring to his pull request, which included, "sms1xxx: fix broken Hauppauge devices" but did not include, "sms1xxx: restore GPIO functionality for all Hauppauge devices"
Mauro,
Thank you in advance for handling this :-)
Cheers,
Mike
Em Fri, 14 Aug 2009 13:41:47 -0400
Michael Krufky <[email protected]> escreveu:
Quoted 35 lines · hermann pitton
Quoted 20 lines
Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
Quoted 8 lines
Mauro,
This changeset is not in your git tree for Linus, but it fixes a regression in the 2.6.31 kernel -- can you push this to Linus as well?
Thanks & regards,
Mike
Fixes for Hauppauge/Pinnacle devices are never ignored.
http://linuxtv.org/hg/v4l-dvb/rev/f2deba9c23d6
http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-08/msg04800.htmlIt might be related to this.
http://lkml.indiana.edu/hypermail/linux/kernel/0908.1/02080.html
Quoted 7 lines
You eventually might get some noise, if there are no fixes for more than one year, but never the other way round.
:)
Cheers,
HermannThanks for your input, Hermann, but you're not entirely accurate -- Mauro's pull request contains the changeset to fix the broken Hauppauge devices, but it does not mention the fix to restore the GPIO functionality.
Quoted 8 lines
I am aware that he "forgot to push" -- I was actually referring to his pull request, which included, "sms1xxx: fix broken Hauppauge devices" but did not include, "sms1xxx: restore GPIO functionality for all Hauppauge devices"
Mauro,
Thank you in advance for handling this :-)
This will be on a next GIT pull request, since I handled this after the last upstream push
Cheers,
Mauro