[mythtv-users] HDPVR IR blaster slow

Gary Buhrmaster gary.buhrmaster at gmail.com
Sat Jun 20 16:55:51 UTC 2015


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.).


More information about the mythtv-users mailing list