Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To
    ranma
  • Operating System Sansa c200
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by ranma - 2010-03-17
Last edited by ranma - 2010-03-23

FS#11120 - Use AS3514_IRQ_ENRD0 for usb detection on ams sansas

Since I can’t find a gpio for usb detection on my C200v2 variant, use as3514 irq_enrd0 usb status bit instead, which should work across all models.
Tested on my C200v2, needs testing on all other AMS based models.

Closed by  ranma
2010-03-23 09:08
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixed by  FS#11131 

Why a thread, and not for example a tick task?

ranma commented on 2010-03-17 18:34

A tick task doesn’t work since ascodec_read takes a lock.

Ah yes. Makes sense then. The stack size is probably a bit bigger than needed.

Does this also fix the problem that plain wall charger trigger the usb detection?

do the linux patches give some clue on how to use interrupts with i2c ?

that would remove the need for a thread, though if this patch works then it should be committed and if a cleaner (smaller) solution is found later it would be better.

ranma commented on 2010-03-17 19:17

Alternatively, if there is a function to check wether the lock is already taken or not, and only run the read if the ascodec is not locked.
The not so nice thing about that is that ascodec_read is much slower than a gpio read anyway, so calling it 100 times a second from tick might be not be the best thing either.

I see a sleep(HZ/10) which would be 10 times a second, we can live with that :)

Didn’t bertrik work in i2c interrupts once?

ranma commented on 2010-03-18 03:22
Does this also fix the problem that plain wall charger trigger the usb detection?

Likely not, I was hoping so since the bit is called usb status, but if I put tape on the data pins it still gets detected that way.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing