tvp5150 new style i2c driver
Hi,
i need to interface with a TI tvp5150 (video codec), wired via i2c on my custom board.
i'm on kernel 2.6.27git and i found there's a driver for the codec... but i get the 'SMBus not supported' error when i try to enable it. So old style coding... I was trying to convert it to new-style when i found on the ML Archive someone had some similar problem....
do somebody have some pre-coded patch for me?
After i made it work, how to communicate with it?
thanks,
Luca Santini
p.s. i have no idea how previous post fallen into the wrong thread !
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
Hi Luca,
Quoted 2 lines · Luca Santini
i need to interface with a TI tvp5150 (video codec), wired via i2c on my custom board.
Which board is that? In particular, which i2c bus drivers are you using?
Quoted 3 lines
i'm on kernel 2.6.27git and i found there's a driver for the codec... but i get the 'SMBus not supported' error when i try to enable it.
I can't find the error message "SMBus not supported" anywhere in the kernel tree, what is the exact error message?
Quoted 1 line
So old style coding...
New-style i2c drivers don't have much to do with what the underlying i2c bus driver supports. Legacy vs. new-style is about how the devices are created.
Quoted 4 lines
I was trying to convert it to new-style when i found on the ML Archive someone had some similar problem....
do somebody have some pre-coded patch for me?
Which mailing list archive? I can't remember any post related to the tvp5150 driver before yours on the i2c list.
Quoted 1 line
After i made it work, how to communicate with it?
Not a question for this mailing list. Better ask the v4l people.
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
Hi Luca,
Please keep the i2c list Cc'd.
Quoted 5 lines · Luca Santini
My board is a custom board based on a Renesas SH4 cpu (sh7760). This uP has 2 i2c channels where i have a tvp5150 video codec, a wm8731 audio codec , a realtime clock and a renesas h8 connected to; so my i2c bus is
drivers/i2c/busses/i2c-sh7760.c.
Quoted 7 lines
my goal - regarding tvp5150 - is to initialize it and set it's input (to composite, for the moment).
The digital video output is 'directly' (there's only a mux controlled by H8 beetween) connected to GPU (fujitsu lime). (...)
"SMBus Quick command not supported, " indrivers/i2c/i2c-core.csorry for previous imprecision.
Indeed, the i2c-sh7760 driver doesn't support the SMBus Quick command. This means that devices on that bus can't be probed. You can still use legacy i2c drivers on that bus; all you have to do is load them with the "force" parameter:
modprobe tvp5150 force=0,0x5c
(Adjust for the actual bus number and device address on your system.)
Admittedly, with a new-style i2c driver you would no longer have to do that. That being said, that's only a small part of your problem. The other part is that you need some glue code to register a video device through which you can control your TVP5150 chip.
Quoted 2 lines
(...)
http://lists.lm-sensors.org/pipermail/i2c/2007-June/001462.html
Ah, right. Well, did you try contacting Jorge Luis Zapata Muga about this? If someone did some work on the tvp5150 driver, that would be him. I plan to convert all i2c drivers in the kernel tree to new-style drivers eventually, but I have no plan to work on the tvp5150 driver in a near future.
Quoted 1 line
so my interface will be something like
/dev/video?
Yes.
Quoted 1 line
I'll be able to change i.e. sources by this?
I do not understand your question, sorry.
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
Quoted 18 lines · Jean Delvare
Hi Luca,
Please keep the i2c list Cc'd.
Quoted 5 lines · Luca Santini
My board is a custom board based on a Renesas SH4 cpu (sh7760). This uP has 2 i2c channels where i have a tvp5150 video codec, a wm8731 audio codec , a realtime clock and a renesas h8 connected to; so my i2c bus is
drivers/i2c/busses/i2c-sh7760.c.Quoted 7 lines
my goal - regarding tvp5150 - is to initialize it and set it's input (to composite, for the moment).
The digital video output is 'directly' (there's only a mux controlled by H8 beetween) connected to GPU (fujitsu lime). (...)
"SMBus Quick command not supported, " indrivers/i2c/i2c-core.csorry for previous imprecision.
Quoted 9 lines
Indeed, the i2c-sh7760 driver doesn't support the SMBus Quick command. This means that devices on that bus can't be probed. You can still use legacy i2c drivers on that bus; all you have to do is load them with the "force" parameter:
modprobe tvp5150 force=0,0x5c
(Adjust for the actual bus number and device address on your system.)
Ok, it's helpful.
Quoted 5 lines
Admittedly, with a new-style i2c driver you would no longer have to do that. That being said, that's only a small part of your problem. The other part is that you need some glue code to register a video device through which you can control your TVP5150 chip.
Oh... ok. Some example? glue code beetween the codec and...? can i bypass v4l ?
Quoted 6 lines
Quoted 2 lines
(...)
http://lists.lm-sensors.org/pipermail/i2c/2007-June/001462.htmlAh, right. Well, did you try contacting Jorge Luis Zapata Muga about this? If someone did some work on the tvp5150 driver, that would be him.
I'll try, thanks.
I plan to convert all i2c drivers in the kernel tree to new-style
Quoted 11 lines
drivers eventually, but I have no plan to work on the tvp5150 driver in a near future.
Quoted 1 line
so my interface will be something like
/dev/video?Yes.
Quoted 1 line
I'll be able to change i.e. sources by this?
I do not understand your question, sorry.
My short-term goal is only initialize the codec and set the input source to composite ('sources' was in this sense.).
I think - as a quick and dirty solution - i'll copy the init code from the kernel driver and do this in userspace using /dev/i2c-X interface. But that's very ugly... ...but on the other hand i don't need (and i don't know how to use) a full v4l interface...
cheers,
Luca
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
Quoted 1 line · Luca Santini
Oh... ok. Some example? glue code beetween the codec and...?
I am not aware of an example (of embedded platform with a video decoder chip on a generic I2C bus) in the kernel at this point. But it shouldn't be too different from regular v4l code. The only difference being that the I2C bus code will be in a separate module, so you need to get a reference to the i2c_adapter your chip is on. Presumably you know the bus numbers in advance so you should be able to use i2c_get_adapter() for that.
Quoted 1 line
can i bypass v4l ?
You can certainly bypass v4l if you want. It might make sense if you can't afford the overhead. But on the other hand, implementing the standard v4l interface has the huge benefit that you can then use all the standard tools, and I doubt the overhead is that much.
Quoted 7 lines
(...)
My short-term goal is only initialize the codec and set the input source to composite ('sources' was in this sense.).
I think - as a quick and dirty solution - i'll copy the init code from the kernel driver and do this in userspace using/dev/i2c-Xinterface. But that's very ugly... ...but on the other hand i don't need (and i don't know how to use) a full v4l interface...
Using i2c-dev should work fine, even though I agree it's not particularly elegant.
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c