Support and General Use > Hardware
iPod Classic and iHome IP1C
(1/1)
citizenkeith:
Hello,
My 80gb iPod classic is running rockbox installed by emCORE. When I hook it up to the iHome IP1C, it goes into charging mode.
I found this patch, but for some reason I'm unable to download it. Can anybody point me in the right direction? I've been googling this all morning and can't seem to find the answer.
http://www.rockbox.org/tracker/task/12522
Thanks!
EDIT: I apologize, this may be the wrong forum. Mods please move, if possible.
Julian67:
I downloaded the patch and there is a massive amount of empty whitespace before any text so it appears to be an empty file unless you check the file size. Here it is with the 651 lines of whitespace removed:
--- Code: ---Index: firmware/target/arm/s5l8700/usb-nano2g-6g.c
===================================================================
--- firmware/target/arm/s5l8700/usb-nano2g-6g.c (revision 31637)
+++ firmware/target/arm/s5l8700/usb-nano2g-6g.c (working copy)
@@ -37,7 +37,11 @@
int usb_detect(void)
{
+#ifdef IPOD_6G
+ if (~PDAT(12) & 8)
+#else /* IPOD_NANO2G */
if (charger_inserted())
+#endif
return USB_INSERTED;
return USB_EXTRACTED;
}
Index: firmware/target/arm/s5l8702/ipod6g/power-ipod6g.c
===================================================================
--- firmware/target/arm/s5l8702/ipod6g/power-ipod6g.c (revision 31637)
+++ firmware/target/arm/s5l8702/ipod6g/power-ipod6g.c (working copy)
@@ -31,7 +31,8 @@
void power_off(void)
{
- pmu_set_wake_condition(0x42); /* USB inserted or EXTON1 */
+ /* USB inserted (EXTON2) or button press / unlock holdswitch (EXTON1) */
+ pmu_set_wake_condition(0x06);
pmu_enter_standby();
while(1);
@@ -63,13 +64,28 @@
}
#endif
+#define IPOD6G_STATUS_CHARGING 0
+#define IPOD6G_STATUS_TOPOFF 1
+#define IPOD6G_STATUS_UNKNOWN 2 /* trickle ???, error ??? */
+#define IPOD6G_STATUS_DISCHARGING 3
+
+static inline int get_charging_status(void)
+{
+ return ((PDAT(11) & 0x30) >> 4);
+}
+
unsigned int power_input_status(void)
{
- return (PDAT(12) & 8) ? POWER_INPUT_NONE : POWER_INPUT_MAIN_CHARGER;
+ if (usb_detect())
+ return POWER_INPUT_USB_CHARGER;
+ else if (get_charging_status() != IPOD6G_STATUS_DISCHARGING)
+ return POWER_INPUT_MAIN_CHARGER;
+
+ return POWER_INPUT_NONE;
}
bool charging_state(void)
{
- return false; //TODO: Figure out
+ return (get_charging_status() == IPOD6G_STATUS_CHARGING);
}
#endif /* CONFIG_CHARGING */
Index: firmware/target/arm/s5l8702/debug-s5l8702.c
===================================================================
--- firmware/target/arm/s5l8702/debug-s5l8702.c (revision 31637)
+++ firmware/target/arm/s5l8702/debug-s5l8702.c (working copy)
@@ -84,7 +84,8 @@
_DEBUG_PRINTF("cpu voltage: %dmV",625 + pmu_read(0x1e)*25);
_DEBUG_PRINTF("memory voltage: %dmV",625 + pmu_read(0x22)*25);
line++;
- _DEBUG_PRINTF("charging: %s", charging_state() ? "true" : "false");
+ _DEBUG_PRINTF("charging: %s, PWR input: 0x%02x",
+ charging_state() ? "true" : "false", power_input_status());
_DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off");
_DEBUG_PRINTF("brightness value: %d", pmu_read(0x28));
}
--- End code ---
citizenkeith:
--- Quote from: Julian67 on September 12, 2013, 12:26:52 PM ---I downloaded the patch and there is a massive amount of empty whitespace before any text so it appears to be an empty file unless you check the file size.
--- End quote ---
Oh, I wasn't getting a blank page... I was actually getting the patch code with a ton of white space. Now I get it. Thanks for your help!
citizenkeith:
FYI, I figured out how to deal with my problem without installing a patch. I simply hold down the menu key while inserting it into the iHome dock, and it bypasses the USB charging. Works great, and I'm now happily listening on the iHome IP1C.
Navigation
[0] Message Index
Go to full version