From: Oleg I. V. <ol...@cs...> - 2006-03-06 10:17:00
|
Hi, Fr=C3=A9d=C3=A9ric, we should avoid writing kernel modules. The reaso= n is that=20 this would complicate ddccontrol installation. Have you considered using libusb to access USB devices? This library = is=20 specially designed to access usb devices from the userspace. Check this=20 link: http://libusb.sourceforge.net/ This library is currently ported to=20 several platforms, including MacOS X. Nicolas: as for ddccontrol integration. Perhaps, it's good idea to=20 create something like a ddcusb application which should provide interface= s=20 similar to ddcpci and add usb: namespace to the ddccontrol. Regards, Oleg. ----- Original Message -----=20 From: "Fr=C3=A9d=C3=A9ric Leroy" <fr...@st...> To: "Nicolas Boichat" <ni...@bo...> Cc: <ddc...@li...> Sent: Saturday, March 04, 2006 1:46 AM Subject: Re: [ddccontrol-devel] [RFC] A common platform usb/ddc/anythinge= lse=20 ? > Le vendredi 03 mars 2006 =C3=A0 21:26 +0100, Nicolas Boichat a =C3=A9cr= it : >> Hi Fr=C3=A9d=C3=A9ric, >> >> On Tue, 2006-02-28 at 22:12 +0100, Fr=C3=A9d=C3=A9ric Leroy wrote: >> > Hello, >> > >> > I own an Apple Studio display without button to control it (which >> > integrates an usb hub) . >> > Long ago, I tried ddcci, without success. It was at alpha stage,=20 >> > without >> > graphical user interface, but the monitor didn't seem to support ddc >> > interface. >> >> It would be nice if you could check quickly that it still doesn't >> work .-) Just in case... So we are sure we don't do useless work .-) > I read nowhere it is capable of that. But, meanwhile, I had new hardwar= e > so I'll try again and keep you in touch. > >> Nice, btw, do you know this document: >> http://www.usb.org/developers/devclass_docs/usbmon10.pdf . It could be >> useful. > I have this document thanks to your project :). I made some research on > usbmon, vcp, mccs ... but I didn't found anything interesting. > On vesa.org the standard can be buy for 350$+70$shipping IIRC ... > *ouch* ! > Once the project is good enough to have audience, maybe we could set up > a paypal page to buy it and level up the vesa controls. > >> As far as I know, controlling monitors using USB or DDC/CI is very >> similar (the only problem I see is caps string, but it's not a major >> issue). It also uses controls, and the protocols are very near, so we >> could keep the database, and most of the current program. So I think i= t >> is feasible to integrate USB support directly into ddccontrol, without >> having 2 sets of tools. > In usbmon, IIRC, it is written that vesa control page are made to=20 > standardize controls, for any bus access. > There always be some minor difference in implementation, but basically, > as I understand usbmon, vcp are the same for ddc/ci, usb, whatever. > Then, It was obvious for me to contact you :) > >> I already played a little with HID usb devices, but I don't remember >> very well the details. I don't know where you got so far, but here are >> some questions: >> Could you explain how do you interact with the monitor? Do you need a >> specific driver, or HID usb module is enough? Do you need a library >> (libusb? libhid?), or could you directly open a device (/dev/hiddev* >> devices?)? Is it possible for a non-root user to write to the device (= by >> setting the permissions to device?)? > Long ago, I tried first to use /dev/hiddev, without success. > Today, I just have some quick hacks in libhid and the test program to d= o > only one settings. So, basically, I have no code, but I know it is > working. > > Since yesterday, I'am reading linux kernel litterature and kernel sourc= e > to make a kernel driver. After all, it's an hid device, and thus, must > have it own kernel driver. > > I plan to do a kernel driver totally integrated with usb, hid device. > To use the control, I would use only sysfs, as I don't see how it can b= e > an input driver. > > So, something like : > /sys/.../display/displayname/brightness_min # minimal value > /sys/.../display/displayname/brightness_max # maximal value > /sys/.../display/displayname/brightness # setting > and maybe > /sys/.../display/displayname/unsupported_vcp/0xfe # meaning missing ... > /sys/.../display/displayname/vcp/0x10 # link to /sys/.../brigthnes= s > to /sys/.../brigthness > > Permission for controls are my big problem. I'm weak on this. > basically, the files above would have these permission, accorded to the > settings : > /sys/.../degauss root:vcp --w--w--- > /sys/.../brightness root:vcp -rw-rw--- > /sys/.../horizontal_frequency root:vcp -r--r---- > >> Needing a non-standard kernel module should be avoided, as it >> complicates installation (and packagers' work too). Using a standard >> kernel module like usbhid is ok. > I totally agree > >> Needing a standard library like libusb is ok, libhid looks non-standar= d >> as far as I can tell (it is not even included in Gentoo), so avoid it = if >> you can. > libhid is very young and not very easy to deal with (I have to be root = to=20 > grab the usb device). > But, it's for me a nonsense to use libusb, as I will have > to borrow the parser of libhid ... so if I make a user interface, I wil= l=20 > use and contribute to libhid. > The big advantage is to have it working on Linux, Mac osX, Bsd (put you= r > favorite os here) ... > >> I would be happy to help you add support for USB devices. When you hav= e >> working code, it would be nice if you could send to the list some >> example programs (get monitor ID (or the complete EDID), read or write >> from a control, enumerate supported controls (all these are essential >> features), and everything else you found out that you think is >> interesting), and some example output. > I'll need your help also. I have only one monitor to test. > I would be happy if user who own an usb monitor, sends me the hid repor= t=20 > descriptor. > lsusb -vvv don't work because the monitor is grabbed by linux hid layer= ,=20 > it needs to unload > usbhid driver first I guess :( If someone has an easy solution to get > the report, tell me ! > Or I can make a quick and dirty prog to do this. > >> Then we will discuss how to integrate it in ddccontrol, and I'll give >> you a CVS access so you can work more freely. > I post to this list because I believe these two project are linked. I > prefer to discuss first and code after :) At least, warn you that I'll > maybe come back with something to integrate. > I code quite slowly, so it will take some time before I come back with > an alpha version of the kernel driver. In any case, I'will post my work > on this list. And once it's mature enough, on kernel usb mailing list > (unless I use only libhid). > >> Thanks for your interest in this project, > It's natural ... > >> Meilleures salutations, > Les formules de politesses ne sont pas mon fort, mais le coeur y est ! > I hope your project to be successful. > > Fr=C3=A9d=C3=A9ric > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 > language > that extends applications into web and mobile media. Attend the live=20 > webcast > and join the prime developer group breaking into this new coding=20 > territory! > http://sel.as-us.falkag.net/sel?cmd____________________________________= ___________ > ddccontrol-devel mailing list > ddc...@li... > https://lists.sourceforge.net/lists/listinfo/ddccontrol-devel=20 |