[alsa-devel] [PATCH 1/2] ASoC: cs4270: introduce CS4270_I2C_INCR

Mark Brown broonie at sirena.org.uk
Wed May 6 10:44:34 CEST 2009


On Wed, May 06, 2009 at 01:19:24AM +0200, Daniel Mack wrote:

> All high-level i2c functions to write block data, namely
> i2c_smbus_write_block_data() and i2c_smbus_write_i2c_block_data(), put
> the length of the data being sent inside the block sent on the wire. I
> couldn't believe it myself, but even my hardware I2C analyzer clearly
> shows that. The API seems to assume that communication to I2C devices
> always wants data to be sent with a leading command, followed by the
> number of data bytes attached and then the data itself. Correct me if
> I'm wrong on that.

That's not the I2C API, that's the SMBus API.  SMBus is more restricted
than I2C - it essentially defines a protocol on top of I2C.  If the
device doesn't implement SMBus then you should use the I2C API directly.


More information about the Alsa-devel mailing list