All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices
       [not found] <E1Mauhe-0003WS-E6@mail.linuxtv.org>
@ 2009-08-13 21:03 ` Michael Krufky
  2009-08-14  1:11   ` hermann pitton
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Krufky @ 2009-08-13 21:03 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

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

On Tue, Aug 11, 2009 at 1:00 PM, Patch from Michael
Krufky<hg-commit@linuxtv.org> wrote:
> The patch number 12446 was added via Michael Krufky <mkrufky@kernellabs.com>
> 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 <linux-media@vger.kernel.org>
>
> ------
>
> From: Michael Krufky  <mkrufky@kernellabs.com>
> sms1xxx: restore GPIO functionality for all Hauppauge devices
>
>
> Previous changesets broke Hauppauge devices and their GPIO configurations.
>
> This changeset restores the LED & LNA functionality.
>
> Priority: high
>
> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
>
>
> ---
>
>  linux/drivers/media/dvb/siano/smsdvb.c |   44 +++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>
> diff -r 70c2efcd6b4a -r f2deba9c23d6 linux/drivers/media/dvb/siano/smsdvb.c
> --- a/linux/drivers/media/dvb/siano/smsdvb.c    Sun Jul 12 17:25:45 2009 -0400
> +++ b/linux/drivers/media/dvb/siano/smsdvb.c    Sun Jul 12 22:30:14 2009 -0400
> @@ -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
>
> _______________________________________________
> linuxtv-commits mailing list
> linuxtv-commits@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices
  2009-08-13 21:03 ` [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices Michael Krufky
@ 2009-08-14  1:11   ` hermann pitton
  2009-08-14 17:41     ` Michael Krufky
  0 siblings, 1 reply; 4+ messages in thread
From: hermann pitton @ 2009-08-14  1:11 UTC (permalink / raw)
  To: Michael Krufky; +Cc: Mauro Carvalho Chehab, linux-media


Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
> 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


> 
> On Tue, Aug 11, 2009 at 1:00 PM, Patch from Michael
> Krufky<hg-commit@linuxtv.org> wrote:
> > The patch number 12446 was added via Michael Krufky <mkrufky@kernellabs.com>
> > 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 <linux-media@vger.kernel.org>
> >
> > ------
> >
> > From: Michael Krufky  <mkrufky@kernellabs.com>
> > sms1xxx: restore GPIO functionality for all Hauppauge devices
> >
> >
> > Previous changesets broke Hauppauge devices and their GPIO configurations.
> >
> > This changeset restores the LED & LNA functionality.
> >
> > Priority: high
> >
> > Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
> >
> >
> > ---
> >
> >  linux/drivers/media/dvb/siano/smsdvb.c |   44 +++++++++++++++++++++++++
> >  1 file changed, 44 insertions(+)
> >
> > diff -r 70c2efcd6b4a -r f2deba9c23d6 linux/drivers/media/dvb/siano/smsdvb.c
> > --- a/linux/drivers/media/dvb/siano/smsdvb.c    Sun Jul 12 17:25:45 2009 -0400
> > +++ b/linux/drivers/media/dvb/siano/smsdvb.c    Sun Jul 12 22:30:14 2009 -0400
> > @@ -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
> >



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices
  2009-08-14  1:11   ` hermann pitton
@ 2009-08-14 17:41     ` Michael Krufky
  2009-08-16 22:51       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Krufky @ 2009-08-14 17:41 UTC (permalink / raw)
  To: hermann pitton; +Cc: Mauro Carvalho Chehab, linux-media

On Thu, Aug 13, 2009 at 9:11 PM, hermann pitton<hermann-pitton@arcor.de> wrote:
>
> Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
>> 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


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices
  2009-08-14 17:41     ` Michael Krufky
@ 2009-08-16 22:51       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2009-08-16 22:51 UTC (permalink / raw)
  To: Michael Krufky; +Cc: hermann pitton, linux-media

Em Fri, 14 Aug 2009 13:41:47 -0400
Michael Krufky <mkrufky@kernellabs.com> escreveu:

> On Thu, Aug 13, 2009 at 9:11 PM, hermann pitton<hermann-pitton@arcor.de> wrote:
> >
> > Am Donnerstag, den 13.08.2009, 17:03 -0400 schrieb Michael Krufky:
> >> 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
> 
> 
> 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 :-)

This will be on a next GIT pull request, since I handled this after the last
upstream push



Cheers,
Mauro

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-16 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1Mauhe-0003WS-E6@mail.linuxtv.org>
2009-08-13 21:03 ` [linuxtv-commits] [hg:v4l-dvb] sms1xxx: restore GPIO functionality for all Hauppauge devices Michael Krufky
2009-08-14  1:11   ` hermann pitton
2009-08-14 17:41     ` Michael Krufky
2009-08-16 22:51       ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.