I have been unable to get this feature to function on either of my 2nd Gen iPods. Does the 2nd gen really support this feature, or was the feature included in the build by inheritance from another build?
Target id: 29
Target define: -DIPOD_1G2G
Binary size: 444904
Actual size: 444896
RAM usage: 826992
gcc: arm-elf-gcc (GCC) 4.0.3
ld: GNU ld version 2.16.1
Host gcc: gcc (GCC) 4.2.3 20080114 (prerelease) (Debian 4.2.2-7)
Host system: Linux
If someone can confirm I'll submit a bug report via Flyspray if appropriate.
iPodLinux lists GPIOB bit 0 as the detection method for 2G and 3G, which seems to confirm the 2nd gen *IS* capable of detection. However looking at the Rockbox source, button-1g-3g.c seems to be looking at bit 0 of GPIOC
Modifying button-1g-3g.c to look at GPIOB bit 0 allows headphone detection to work on the 2G. However I don't know if the 3G also needs to be modified, and I don't know if the 1G actually supports headphone detection at all (GPIOB bit 0 for the 1G is apparently used for scrollwheel enable per iPodLinux)
Flyspray task opened: http://www.rockbox.org/tracker/task/8519
There's a patch to fix the 2G detection : http://www.rockbox.org/tracker/task/8920