Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8830 - Sansa: DMA support for sd-card data access (experimentary)

Attached to Project: Rockbox
Opened by Toni (ahellmann) - Sunday, 30 March 2008, 21:41 GMT+2
Task Type Patches
Category Drivers
Status Unconfirmed
Assigned To No-one
Player type Sansa e200
Severity Low
Priority Normal
Reported Version current build
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

First approach, to add dma read/write disk access to the sansa.

There are some restrictions on the dma functionality with this patch:
- only stabile at 80MHz => cpu boost control added to the driver
- only on 16byte aligned data ptr => all data are copied to/from aligned memory
- no interrupt support => using polling method

At 30MHz the driver is much more stable with the following PLL settings:
PLL_CONTROL = 0x8a221e0c; /* 30 MHz = (48MHz/12*30) / 4 */
CLOCK_SOURCE = 0x40007777; /* source #1, #2, #3, #4: PLL (#4 active) */

Reading seems to be in general more reliable than writing of the cards.
The data throughput is a little worse than in the current implementation.
This is partly due to the data copying.
The sporadical '2bytes inserted' problem with the USB file transfer is still
there. Interestingly @30MHz with the above settings, there is another problem:
sporadically '2bytes missing' and '2bytes inserted'. Perhaps the DMA transfer
needs some more initialization for proper synchronization.
This task depends upon

Comment by Rene Peinthor (rp) - Tuesday, 06 May 2008, 08:41 GMT+2
How much benefit would this bring if it would work flawless? because i have now an 8gb sdhc card and have all my music on it.
Is there a lot of cpu involved with the current implementation(SVN)?
How is your progress since this patch is 1 month old?
Comment by Daniel Ankers (dan_a) - Wednesday, 28 May 2008, 01:52 GMT+2
I've just run the test_disk plugin on the latest SVN + this patch.

Without DMA:
Create: 27 files/s
Open: 54 files/s
Dirscan: 6269 fils/s
Delete: 56 files/s
Create Write Read (KB/sec)
512,A 276 266 925
512,U 272 268 916
4096,A 1462 1439 4499
4096,U 1478 1462 4494
1048576,A 3900 3881 9836
1048576,U 3915 4046 9138

With DMA:
Create: 25 files/s
Open: 55 files/s
Dirscan: 5784 files/s
Delete 51 files/s
Create Write Read (KB/sec)
512,A 252 252 830
512,U 265 269 803
4096,A 1324 1314 3742
4096,U 1374 1369 2664
1048576,A 4087 4079 7198
1048576,U 4031 4104 7013

This seems to show that working with DMA is slower than working without it. This is partly to be expected as the driver yields while waiting for the transfer to finish.

Loading...