Tuesday, March 16, 2010

Interrupt Free Audio

Today I integrated "interrupt free audio". This set of changes, including some other changes, represents a substantial simplification in the DDI for audio drivers.

The typical audio driver no longer needs to worry about interrupt handlers. On average, about 300 lines of code (or about 10-20% of complexity for typical drivers) was removed from each audio driver.

Furthermore, many audio drivers (for example audio810) are able to run completely lock free, since the audio framework provides synchronization for certain operations. (Operations against each audio engine are synchronized, operations against audio controls are synchronized as a whole, and everything is synchronized against suspend/resume functions.)

Even better, these changes enable some new advanced features that will be used for Sun Ray, virtualization, and hotplug support in the future.

Oh yeah, and since the asynchronous processing now happens as part of the regular timer interrupt, it means that system CPUs can remain in deeper C states for longer, even while playing audio. So, we should have an improvement on system power consumption (admittedly I've not measured this.)

There will be more stuff related to audio in the future, stay tuned.


Es Que said...

I like what I am reading. Can't wait to test this out with VirtualBox and Sun Ray

Garrett D'Amore said...

Sun Ray isn't supported by Boomer *yet*. It will be someday soon though.

Tomek WaƂkuski said...

In which build will it appear?

Garrett D'Amore said...

Interrupt free audio is part of build 137. Sun Ray support is still being developed, so I can't tell you a build number, but it will probably be included with a release of the Sun Ray software.

dynamicproxy said...

Nice news :)