* CS4279 and hw_read_t/hw_write_t
@ 2008-07-21 15:06 Jon Smirl
2008-07-21 15:07 ` Timur Tabi
0 siblings, 1 reply; 5+ messages in thread
From: Jon Smirl @ 2008-07-21 15:06 UTC (permalink / raw)
To: ALSA-devel, Timur Tabi
>From soc/codecs/cs4270.c...
*
* Note that we don't use the hw_write function pointer of snd_soc_codec.
* That's because it's too clunky: the hw_write_t prototype does not match
* i2c_smbus_write_byte_data(), and it's just another layer of overhead.
*/
The prototype doesn't match because you are using
i2c_smbus_write_byte_data() instead of
i2c_master_send()/i2c_master_recv().
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CS4279 and hw_read_t/hw_write_t
2008-07-21 15:06 CS4279 and hw_read_t/hw_write_t Jon Smirl
@ 2008-07-21 15:07 ` Timur Tabi
2008-07-21 15:16 ` Jon Smirl
0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2008-07-21 15:07 UTC (permalink / raw)
To: Jon Smirl; +Cc: ALSA-devel
Jon Smirl wrote:
> From soc/codecs/cs4270.c...
>
> *
> * Note that we don't use the hw_write function pointer of snd_soc_codec.
> * That's because it's too clunky: the hw_write_t prototype does not match
> * i2c_smbus_write_byte_data(), and it's just another layer of overhead.
> */
>
> The prototype doesn't match because you are using
> i2c_smbus_write_byte_data() instead of
> i2c_master_send()/i2c_master_recv().
Should I be using i2c_master_send() instead? I remember reading somewhere that
I should be using the i2c smbus functions if possible.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CS4279 and hw_read_t/hw_write_t
2008-07-21 15:07 ` Timur Tabi
@ 2008-07-21 15:16 ` Jon Smirl
2008-07-21 15:18 ` Timur Tabi
0 siblings, 1 reply; 5+ messages in thread
From: Jon Smirl @ 2008-07-21 15:16 UTC (permalink / raw)
To: Timur Tabi; +Cc: ALSA-devel
On 7/21/08, Timur Tabi <timur@freescale.com> wrote:
> Jon Smirl wrote:
> > From soc/codecs/cs4270.c...
> >
> > *
> > * Note that we don't use the hw_write function pointer of snd_soc_codec.
> > * That's because it's too clunky: the hw_write_t prototype does not match
> > * i2c_smbus_write_byte_data(), and it's just another layer of overhead.
> > */
> >
> > The prototype doesn't match because you are using
> > i2c_smbus_write_byte_data() instead of
> > i2c_master_send()/i2c_master_recv().
>
>
> Should I be using i2c_master_send() instead? I remember reading somewhere that
> I should be using the i2c smbus functions if possible.
i2c_smbus... will work with either a smbus controller or an i2c
controller. Inside the routine it decides which type of controller and
then ends up calling i2c_master....
You're on an i2c bus, no need to the overhead.
You'd have to read the CS4270 datasheet in detail to see if can even
be hooked up to an smbus controller. smbus is a subset of full i2c.
>
>
> --
> Timur Tabi
> Linux kernel developer at Freescale
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CS4279 and hw_read_t/hw_write_t
2008-07-21 15:16 ` Jon Smirl
@ 2008-07-21 15:18 ` Timur Tabi
2008-07-21 15:25 ` Jon Smirl
0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2008-07-21 15:18 UTC (permalink / raw)
To: Jon Smirl; +Cc: ALSA-devel
Jon Smirl wrote:
> You'd have to read the CS4270 datasheet in detail to see if can even
> be hooked up to an smbus controller. smbus is a subset of full i2c.
There's no mention of SM Bus anywhere in the CS4270 datasheet. Can I assume
that it won't work?
I remember now trying to use a standard I2C-only function and it didn't work,
but that was a long time ago before I knew much about the hardware. I'll have
to try it again.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CS4279 and hw_read_t/hw_write_t
2008-07-21 15:18 ` Timur Tabi
@ 2008-07-21 15:25 ` Jon Smirl
0 siblings, 0 replies; 5+ messages in thread
From: Jon Smirl @ 2008-07-21 15:25 UTC (permalink / raw)
To: Timur Tabi; +Cc: ALSA-devel
On 7/21/08, Timur Tabi <timur@freescale.com> wrote:
> Jon Smirl wrote:
>
> > You'd have to read the CS4270 datasheet in detail to see if can even
> > be hooked up to an smbus controller. smbus is a subset of full i2c.
>
>
> There's no mention of SM Bus anywhere in the CS4270 datasheet. Can I assume
> that it won't work?
SMBus devices will work on an i2c controller. But i2c devices won't
always work on a smbus controller. i2c is a superset of smbus, it can
do things smbus can't.
SMbus (system management bus) is usually used for simple things like
fan and temperature monitors.
>From wikipedia on i2c:
"Pure I²C systems support arbitrary message structures. SMBus is
restricted to nine of those structures, such as "read word N" and
"write word N", involving a single slave."
>
> I remember now trying to use a standard I2C-only function and it didn't work,
> but that was a long time ago before I knew much about the hardware. I'll have
> to try it again.
>
>
> --
>
> Timur Tabi
> Linux kernel developer at Freescale
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-21 15:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 15:06 CS4279 and hw_read_t/hw_write_t Jon Smirl
2008-07-21 15:07 ` Timur Tabi
2008-07-21 15:16 ` Jon Smirl
2008-07-21 15:18 ` Timur Tabi
2008-07-21 15:25 ` Jon Smirl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.