Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Improved iPod battery life
« previous next »
  • Print
Pages: [1]

Author Topic: Improved iPod battery life  (Read 3226 times)

Offline riksweeney

  • Member
  • *
  • Posts: 74
    • Parallel Realities
Improved iPod battery life
« on: August 29, 2007, 12:11:02 PM »
Hi,

I was just wondering what was done to improve the battery life on the iPods. I've had a quick look at a diff on the system-pp5002.c file and the comment on one of the "offending" lines is

/* don't clock unused PP5002 hardware components */

I was just wondering what this means. I know this is geeky but this is the kind of thing that interests me (the same way that I find what people do when coding MAME more interesting than the games themselves).
Logged
The Legend of Edgar

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #1 on: August 29, 2007, 12:26:40 PM »
Don't worry about it being geeky. We're all geeks here! :)

Which number line is that in the code? I'm going to take a look at it in a few minutes.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Improved iPod battery life
« Reply #2 on: August 29, 2007, 01:00:34 PM »
Quote from: riksweeney on August 29, 2007, 12:11:02 PM
I was just wondering what was done to improve the battery life on the iPods.

Bear in mind, this isn't ALL ipods, only 1st, 2nd and 3rd Gen iPods.

It doesn't include either generation Mini, the Nano, or the 4th, 5th and 5.5th Gen iPods.
Logged

Read The Manual Please

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #3 on: August 29, 2007, 01:08:50 PM »
I know it won't help my iPod out, but it's always good to learn something every day. :)

These are the lines riksweeney's inquiring mind wants to know about:
Quote
#if defined(IPOD_1G2G) | | defined(IPOD_3G)
 Â         DEV_EN = 0x0b9f; /* don't clock unused PP5002 hardware components *?
 Â         outl(0x0035, 0xcf005004); /* DEV_EN2 ? *?
#endif

Could it be the pointers given that are the cause?
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline riksweeney

  • Member
  • *
  • Posts: 74
    • Parallel Realities
Re: Improved iPod battery life
« Reply #4 on: August 29, 2007, 01:59:35 PM »
Quote
#if defined(IPOD_1G2G) | | defined(IPOD_3G)
          DEV_EN = 0x0b9f; /* don't clock unused PP5002 hardware components *?
          outl(0x0035, 0xcf005004); /* DEV_EN2 ? *?
#endif

I guess that it's the outl() function that is improving the battery life. I'll have a look in the function to see if I can understand what it does myself!
Logged
The Legend of Edgar

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #5 on: August 29, 2007, 02:01:20 PM »
I think you may be on to something there, my friend!  :)
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Improved iPod battery life
« Reply #6 on: August 29, 2007, 02:22:12 PM »
I believe that by disasembling the original firmware for 1,2,3rd gen iPods, Amiconn discovered some additional hardware initialisation routines to turn off uneeded hardware in the portalplayer chip and therefore save power.

Now whilst it isn't for sure, most people believe similar additional hardware needs turning off to improve the battery life for newer iPods.  However it is a similar yet different and more complicated chip in the newer iPods, hence the improvements cannot be ported straight across.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline elborak

  • Member
  • *
  • Posts: 177
Re: Improved iPod battery life
« Reply #7 on: August 29, 2007, 02:23:22 PM »
It's simply turning off parts of the chip that aren't used by Rockbox.

Without detailed docs on a component, figuring out what port controls what and what bits do what is very taxing work.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #8 on: August 29, 2007, 02:31:08 PM »
I remember this being discussed before. We need to look at precisely what needs to be turned off in the newer PortalPlayer chips that isn't needed by Rockbox.

BigBambi, a reading of system-pp502x.c shows me no lines that are similar to the lines pointed out from system-pp5002.c by myself and riksweeney, so your belief may be true. The process seems a bit different. Any ideas?

(Note: If I'm wrong, I'm wrong. I'm taking this as a learning process.)
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Improved iPod battery life
« Reply #9 on: August 29, 2007, 02:35:52 PM »
Quote from: LambdaCalculus379 on August 29, 2007, 02:31:08 PM
BigBambi, a reading of system-pp502x.c shows me no lines that are similar to the lines pointed out from system-pp5002.c by myself and riksweeney, so your belief may be true. The process seems a bit different. Any ideas?

That would be because the register addresses on the 502x aren't the same as the 5002, and therefore we :

a) don't know where to write the values to turn stuff off
and
b) don't know what values to write even if we did know the write register addresses.
Logged

Read The Manual Please

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #10 on: August 29, 2007, 02:48:12 PM »
I had a hunch it was due to lack of register addresses. Thanks for that information, GodEater. You and BigBambi are bringing back my C knowledge from the depths of my subconscious!
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Improved iPod battery life
« Reply #11 on: August 29, 2007, 03:28:33 PM »
Ha, I know next to no C, I just pick up the broad reasons.  
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Improved iPod battery life
« Reply #12 on: August 29, 2007, 03:36:18 PM »
Don't feel bad. My C knowledge is fair, but rusty. I'm out of practice and I'm trying to get back into the swing of things. But it's always good to learn and share information with my fellow peers. :)
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Improved iPod battery life
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.102 seconds with 15 queries.