I am testing your cm109 driver with my Genius G-Talk USB phone. It
identifies itself as a cm109 device (0d8c:000e C-Media Electronics,
Inc.). I compiled and loaded the cm109 module. However when I plug the
phone in the, the usbhid driver grabs the device rather than the cm109
driver. The following snippet is from /proc/bus/usb/devices and shows
the Class/Subclass/Protocol 3/0/0 device is nabbed by the usbhid
driver. Why isn't the cm109 driver grabbing the device?
Thanks for writing the driver, and I hope I can get it to work!
Shaun
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0d8c ProdID=000e Rev= 1.00
S: Product=Generic USB Audio Device
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=01(O) Atr=09(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=82(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=32ms
Hi Shaun,
the CM109 VID and PID are probably not included in the kernel's
blacklisted device list (see static array hid_blacklist in hid-core.c).
Just for your tests you can write a little tool to detach the usbhid
driver and then load the cm109 module manually using modprobe or insmod.
An example for this tool (not using libusb) can be found at
http://www.devbase.at/svn/view.cgi/yealink-tools/trunk/detach-yealink.c?revision=1&root=experimental&view=markup
or inside the EEPROM tool below.
BTW, there is still the issue with varying key mappings among different
models. The EEPROM contents might give a hint for distinguishing the
models, it would be interesting if you could read the EEPROM and tell us
what you see. The tool for this task can be found at
http://www.devbase.at/svn/view.cgi/cm109-tools/trunk/?root=experimental
Regards,
-Thomas
Shaun Jackman wrote:
I am testing your cm109 driver with my Genius G-Talk USB phone. It
identifies itself as a cm109 device (0d8c:000e C-Media Electronics,
Inc.). I compiled and loaded the cm109 module. However when I plug the
phone in the, the usbhid driver grabs the device rather than the cm109
driver. The following snippet is from /proc/bus/usb/devices and shows
the Class/Subclass/Protocol 3/0/0 device is nabbed by the usbhid
driver. Why isn't the cm109 driver grabbing the device?
Thanks for writing the driver, and I hope I can get it to work!
Shaun
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0d8c ProdID=000e Rev= 1.00
S: Product=Generic USB Audio Device
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=01(O) Atr=09(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=82(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=32ms
The detach-yealink tool worked well; thanks. I generalised it (now
called detach-usb) to take a vendor/product/interface argument on the
command line. The patch is attached.
The EEPROM dumping tool did not work. It failed with
cm109_eeprom_read: Mode check failed witch HID_IR0=0xc0
I tried commenting out the HID_IR0 test, but it then read only zeros.
Thanks!
Shaun
$ sudo ./dump-eeprom
Found device:
idVendor=0x0d8c
idProduct=0x000e
iSerialNumber=0x00
Found HID interface #3
Successfully claimed interface
Manufacturer: "?"
Product: "Generic USB Audio Device "
Serial#: "?"
cm109_eeprom_read: Mode check failed witch HID_IR0=0xc0
On 8/26/07, Thomas Reitmayr [off-list ref] wrote:
Hi Shaun,
the CM109 VID and PID are probably not included in the kernel's
blacklisted device list (see static array hid_blacklist in hid-core.c).
Just for your tests you can write a little tool to detach the usbhid
driver and then load the cm109 module manually using modprobe or insmod.
An example for this tool (not using libusb) can be found at
http://www.devbase.at/svn/view.cgi/yealink-tools/trunk/detach-yealink.c?revision=1&root=experimental&view=markup
or inside the EEPROM tool below.
BTW, there is still the issue with varying key mappings among different
models. The EEPROM contents might give a hint for distinguishing the
models, it would be interesting if you could read the EEPROM and tell us
what you see. The tool for this task can be found at
http://www.devbase.at/svn/view.cgi/cm109-tools/trunk/?root=experimental
Regards,
-Thomas
Shaun Jackman wrote:
quoted
I am testing your cm109 driver with my Genius G-Talk USB phone. It
identifies itself as a cm109 device (0d8c:000e C-Media Electronics,
Inc.). I compiled and loaded the cm109 module. However when I plug the
phone in the, the usbhid driver grabs the device rather than the cm109
driver. The following snippet is from /proc/bus/usb/devices and shows
the Class/Subclass/Protocol 3/0/0 device is nabbed by the usbhid
driver. Why isn't the cm109 driver grabbing the device?
Thanks for writing the driver, and I hope I can get it to work!
Shaun
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0d8c ProdID=000e Rev= 1.00
S: Product=Generic USB Audio Device
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=01(O) Atr=09(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=82(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=32ms
Shaun Jackman wrote:
I am testing your cm109 driver with my Genius G-Talk USB phone. It
identifies itself as a cm109 device (0d8c:000e C-Media Electronics,
Inc.). I compiled and loaded the cm109 module. However when I plug the
phone in the, the usbhid driver grabs the device rather than the cm109
driver. The following snippet is from /proc/bus/usb/devices and shows
the Class/Subclass/Protocol 3/0/0 device is nabbed by the usbhid
driver. Why isn't the cm109 driver grabbing the device?
I have made a new version of the CM109 driver which updates the
usb hid-quirks.c blacklist, please find it here:
http://aeh.db.org/patch/cm109-20070826.patch
(All versions here: http://aeh.db.org/patch/)
You can also try to unload the usbhid.ko module (while the USB phone
is plugged in), and then manually load the cm109.ko driver
Another outstanding issue with the CM109 driver is that it seems
like all phone vendors have different key-mappings. That means
that the keymapping defined in my version of the cm109 driver
works with the KIP-1000 USB phone. I have got reports from other
users with other phones, that the keymapping is different. It
would be very interesting to see which keymapping your phone
(Genius G-talk) has.
I am not sure how to fix this problem, does anyone on this list
have any good suggestions?
/alfred
Thanks for writing the driver, and I hope I can get it to work!
Shaun
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0d8c ProdID=000e Rev= 1.00
S: Product=Generic USB Audio Device
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=01(O) Atr=09(Isoc) MxPS= 200 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I: If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E: Ad=82(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=83(I) Atr=03(Int.) MxPS= 4 Ivl=32ms
On 8/26/07, Alfred E. Heggestad [off-list ref] wrote:
I have made a new version of the CM109 driver which updates the
usb hid-quirks.c blacklist, please find it here:
http://aeh.db.org/patch/cm109-20070826.patch
(All versions here: http://aeh.db.org/patch/)
In fact, I already tried adding the CM109 to the blacklist. Oddly
enough, the usbhid driver still grabs the CM109 HID device. I must be
doing something wrong...
$ grep -1 CMEDIA drivers/hid/usbhid/hid-quirks.c
#define USB_VENDOR_ID_CMEDIA 0x0d8c
#define USB_DEVICE_ID_CMEDIA_CM109 0x000e
--
{ USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CMEDIA_CM109, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM,
HID_QUIRK_IGNORE },
$ make modules
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/hid/usbhid/hid-quirks.o
LD [M] drivers/hid/usbhid/usbhid.o
Building modules, stage 2.
MODPOST 1648 modules
LD [M] drivers/hid/usbhid/usbhid.ko
$ sudo cp drivers/hid/usbhid/usbhid.ko
/lib/modules/2.6.23-rc3/kernel/drivers/hid/usbhid/usbhid.ko
You can also try to unload the usbhid.ko module (while the USB phone
is plugged in), and then manually load the cm109.ko driver
That's difficult for me, as both my keyboard and mouse are HID
devices. The detach-usb utility is working for me until I can get the
blacklist working.
Another outstanding issue with the CM109 driver is that it seems
like all phone vendors have different key-mappings. That means
that the keymapping defined in my version of the cm109 driver
works with the KIP-1000 USB phone. I have got reports from other
users with other phones, that the keymapping is different. It
would be very interesting to see which keymapping your phone
(Genius G-talk) has.
It's one of the guarantees in electronics that if two people are given
an arbitrary binary choice, they will certainly choose opposite each
other. A keyboard matrix, which is well more than a binary choice,
will yield endless different key arrangements. The Genius G-Talk
keymap follows this mail.
I am not sure how to fix this problem, does anyone on this list
have any good suggestions?
I haven't been able to dump the EEPROM yet. I'll think on it.
Cheers,
Shaun
/*
Genius G-Talk keyboard matrix
0 1 2 3
4: 0 4 8 Talk
5: 1 5 9 End
6: 2 6 # Up
7: 3 7 * Down
*/
case 0x11: return KEY_0;
case 0x21: return KEY_1;
case 0x41: return KEY_2;
case 0x81: return KEY_3;
case 0x12: return KEY_4;
case 0x22: return KEY_5;
case 0x42: return KEY_6;
case 0x82: return KEY_7;
case 0x14: return KEY_8;
case 0x24: return KEY_9;
case 0x44: return KEY_LEFTSHIFT | KEY_3 << 8; /* # */
case 0x84: return KEY_KPASTERISK;
case 0x18: return KEY_ENTER; /* Talk (green handset) */
case 0x28: return KEY_ESC; /* End (red handset) */
case 0x48: return KEY_UP; /* Menu up (rocker switch) */
case 0x88: return KEY_DOWN; /* Menu down (rocker switch) */
On Sun, 26 Aug 2007, Shaun Jackman wrote:
In fact, I already tried adding the CM109 to the blacklist. Oddly
enough, the usbhid driver still grabs the CM109 HID device. I must be
doing something wrong...
Hi,
first, it is now also possible to pass additional quirks to the usbhid
module using the 'quirks' parameter.
$ grep -1 CMEDIA drivers/hid/usbhid/hid-quirks.c
#define USB_VENDOR_ID_CMEDIA 0x0d8c
#define USB_DEVICE_ID_CMEDIA_CM109 0x000e
--
{ USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CMEDIA_CM109, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM,
HID_QUIRK_IGNORE },
Adding a HID_QUIRK_IGNORE entry to the blacklist is sufficient. Could you
please double check that this patched driver really binds to the device?
If so, could you please compile with CONFIG_HID_DEBUG enabled and modprobe
the usbhid module with 'debug=1' parameter and send me the kernel output?
--
Jiri Kosina