FS#12685 - disk access on volume change

Attached to Project: Rockbox
Opened by Wolfgang Dilg (rasferret) - Friday, 25 May 2012, 20:00 GMT
Last edited by MichaelGiacomelli (saratoga) - Friday, 25 May 2012, 22:14 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To No-one
Operating System Sansa AMSv2
Severity Low
Priority Normal
Reported Version Rbutil SVN
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


At least with the newest build 652b39b volume changes on my sansa clip+ are awfully slow. I think its because every volume change triggers a disk access.

This task depends upon

Closed by  MichaelGiacomelli (saratoga)
Friday, 25 May 2012, 22:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 3f72ba0.
Comment by MichaelGiacomelli (saratoga) - Friday, 25 May 2012, 21:57 GMT
8689bcc-120525 breaks this.

As for why this happens on volume, I'm baffled as to why volume changes even trigger a storage callback.
Comment by Frank Gevaerts (fg) - Friday, 25 May 2012, 22:14 GMT
This should be fixed in 3f72ba0. Can someone verify?

Volume changes are saved to the config file. If storage callbacks are enabled, this will happen the next time storage is used for other reasons (so disks don't spin up too often, or flash doesn't power on too often). Otherwise, the save is synchronous (and therefore slow).

6b8330d2, which was meant to add enabling storage callbacks for hosted targets (i.e. sims and application builds), was wrong and instead basically enabled it *only* for hosted targets, dropping the native targets.
Comment by MichaelGiacomelli (saratoga) - Friday, 25 May 2012, 22:14 GMT
Apparently that commit caused the config file to be rewritten on every volume change. Its fixed.