This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: parse_az6007.pl: Move the I2C read decode hack to the proper place Author: Mauro Carvalho Chehab <[email protected]> Date: Sun Jul 24 08:05:12 2011 -0300 The removal of the extra bytes should be done only at the payload. Also, moving it to the logic that handles the I2C subaddress makes the code more readable. Signed-off-by: Mauro Carvalho Chehab <[email protected]> contrib/az6007/parse_az6007.pl | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=73243e4a9d4b20909cd295f451413089fb0f360e diff --git a/contrib/az6007/parse_az6007.pl b/contrib/az6007/parse_az6007.pl index 29939f6..5970605 100755 --- a/contrib/az6007/parse_az6007.pl +++ b/contrib/az6007/parse_az6007.pl @@ -2250,6 +2250,12 @@ sub i2c_decode($$$$$) $write = 1 if (!($reqtype & 0x80)); + if ($n >= 6 && !$write) { + # This is how az6007 returns reads + $n -= 6; + $data = substr($data, 3 * 5, $n * 3); + } + $addr = $wvalue & 0xff; if ($wvalue > 255) { @@ -2284,12 +2290,6 @@ while (<>) { if ($req == 0xb9 || $req == 0xbd) { my ($addr, $data, $write, $n) = i2c_decode($reqtype, $wvalue, $windex, $wlen, $payload); - if ($n > 6 && !$write) { - # This is how az6007 returns reads - $n -= 6; - $data = substr($data, 3 * 5, $n * 3); - } - if ($addr == 0x52) { parse_drxk_addr($timestamp, $addr, $n, $data, $write) if ($show_drxk); } elsif ($addr == 0xc0) { _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
