[mythtv-users] HDPVR IR blaster slow
Joseph Fry
joe at thefrys.com
Sat Jun 20 17:07:51 UTC 2015
On Sat, Jun 20, 2015 at 12:55 PM, Gary Buhrmaster <gary.buhrmaster at gmail.com
> wrote:
> On Sat, Jun 20, 2015 at 4:23 PM, Joseph Fry <joe at thefrys.com> wrote:
> .....
> > In the function description you see that it says it returns a negative
> error
> > number, or the number of bytes written. If you look at the actual return
> > statement, it's returning the count (or the error from i2c_transfer).
> >
> > I think I need to patch lirc_zilog:
> >
> > for (i = 0; i < 10; i++) {
> > ret = i2c_master_send(tx->c, buf, 1);
> > - if (ret == 1)
> > + if (ret > 0)
> > break;
> > udelay(100);
> > }
> >
> > Can anyone confirm my conclusion? My programming skills are limited to
> > scripts... so this is new territory for me.
>
> Since the return is the count, and you only send 1 character,
> a "successful" send would be the count passed in, or 1.
>
> So, while you may be on the right track, this does not seem
> to be the bug you are looking for (and btw, if you write <n>
> bytes, if the return is not <n>, you need to handle the short
> write case in some form, as the code immediately above
> does for a return not equal to the 2 case.).
I just tested this... and indeed your right. I added in some debug output
and see that the pause is occuring after the "sent code..." message. And I
was able to confirm that i2c_master_send is returning 1 every time.
so... time to keep digging.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150620/10f4166d/attachment.html>
More information about the mythtv-users
mailing list