Re: Broken cx231xx-i2c.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 11, 2017 at 9:39 AM, Oleh Kravchenko <oleg@xxxxxxxxxx> wrote:
> Hello!
>
> So, I tried to split i2c send messages to 5, 8, 16 bytes - that cause error:
>     cx231xx 3-1:1.1: cx231xx_send_usb_command: failed with status --32
>
> This problem occurred only with Si2158 tuner,
> demodulator Si2168 eats up to 15 bytes per i2c message.
>
> I think problem in cx231xx_send_vendor_cmd() function.
> It's split reading, but not writing.
>
> PS: I use USB sniffer to capture traffic, please find it in attachment.

Do you have a logic analyzer so you can inspect the I2C bus state? I'm
speaking as someone who's done significant reverse engineering
projects on many pieces of hardware, you'll get a much better
understanding of platform specific I2C problems if you can see the bus
directly.

Any such issues tend to propagate upwards through micro-controller
interfaces (cx231xx) and its much more obvious to deal with the
controller problem when the state of the bus is absolutely known.

I have no objections to a I2C bus controller implementation splitting
reads and writes in a uniform and generic way, assuming windows is
doing the same thing, providing that approach applies to all attached
devices. We don't want board specific hacks infecting the various
drivers......... unless we're absolutely clear as to why...... and we
don't want to see I2C controller limitations infecting I2C demod/tuner
drivers where at all possible.

If its true that send_vendor_cmd() splits reads but not writes, fix
the function to be uniform for all boards. Don't do boards specific
overrides.

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux