- Status Closed
- Percent Complete
- 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
FS#11130 - Rewrite ascodec_as3514.c to use interrupts
This patch rewrites ascodec_as3514.c to use interrupts.
It gets rid of the ascodec mutex and instead introduces a mutex in adc-as3514.c.
Requests are handled using a simple request queue, and allows asynchronous request to be started from interrupt context.
The (20+sizeof(struct wakeup)) bytes request struct is either allocated on the stack (synchronous read/write) or has to be allocated statically by the caller (asynchronous read).
The asynchronous write is used in system-as3525.c (which is run with interrupts disabled).
asynchronous reads are used by another pending patch of mine implementing AUDIO_IRQ (int 9) handling for usb_plug detection without needing a thread.
Closed by ranma
2010-03-23 09:06
Reason for closing: Accepted
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
2010-03-23 09:06
Reason for closing: Accepted
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
Committed
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Good work!
You changed ascodec_lock() into a adc specific lock in adc-as3514.c, but this file is also used by e200v1/c200v1 : doesn’t it cause a problem for those devices?
Good question. I think you’re right. Updated patch attached.
Tested on Clip+ : OK
Tested on e260v2 with r25262:
When I attach the USB cable while in the Rockbox menu I intermittently get a black screen lockup that requires a long poweroff (10 secs) to recover.
All other functions appear normal.
Hmm, backlight is controlled using as3514 on e200 though and system_reboot() calls _backlight_off() (why? If it reboots the backlight will be turned back on very soon anyway…). So if system_reboot() is called with interrupts disabled it would hang. Though it’s should be called from the usb thread, which means interrupts should be enabled and I don’t see why suddenly at that point the interrupt wouldn’t fire if it has been working fine that far…
I tested this patch by itself first, and then tested 11131 along with this patch. The lockup occurred in both cases.
So far, with minimal testing, the new patch looks good. I have not had any lockups, yet. I will continue testing throughout the day. I will also test it with 11131 also applied.
After further testing, I have not had any lockups with the latest patch. No other problems noted.