[haiku-bugs] Re: [Haiku] #7284: auich.settings not installed

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 09 Apr 2012 19:27:35 -0000

#7284: auich.settings not installed
   Reporter:  Pete                 |      Owner:  korli
       Type:  bug                  |     Status:  new
   Priority:  normal               |  Milestone:  R1
  Component:  Drivers/Audio/auich  |    Version:  R1/Development
 Resolution:                       |   Keywords:
 Blocked By:                       |   Blocking:  8009, 8086
Has a Patch:  0                    |   Platform:  All

Comment (by pulkomandy):

 Most of the crackling audio and increasing latency problems are actually
 because of our scheduler still has no priority inversion system.

 It should work as follows :
  * The media threads in the system have a fairly high priority.
  * The application threads, on the other hand, have a lower priority
  * When there is some CPU load (moving windows around is a good way to do
 that, as we have no 2d acceleration), there is not enough time to do
 everything. The window stuff is running at display priority, so it is
 between the app and the media kit.
  * As the app has lower priority, it doesn't get enough time to fill the
 buffers, and they become empty
  * The media kit notices it and increases the latency to avoid it
 hapenning again.

 How to fix it :
 The scheduler should handle priority inversion on ports (the kernel level
 system used for media kit streams). That is, when the media kit needs some
 data from the app, and there's nothing in the buffer, the app should get
 its priority temporarily increased to the same as the media kit, untill
 the buffer is filled again.
 This way, the buffer will not get empty that often, the media kit will not
 notice problems and will stop increasing latency.

 The problem is not on the hardware/driver side, it's a similar lockout
 between threads but is pure software, no interrupts are involved.

 You can find some patches that add priority inversion to the kernel in the
 development mailing list (maybe as a trac ticket as well?). Please test

Ticket URL: <http://dev.haiku-os.org/ticket/7284#comment:20>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: