Skip to content
Snippets Groups Projects
  1. Jan 13, 2022
  2. Dec 21, 2021
  3. Oct 14, 2021
  4. Aug 10, 2021
  5. Jul 09, 2021
  6. Jun 23, 2021
    • Akihiko Odaki's avatar
      coreaudio: Lock only the buffer · eb1a35e4
      Akihiko Odaki authored
      
      On macOS 11.3.1, Core Audio calls AudioDeviceIOProc after calling an
      internal function named HALB_Mutex::Lock(), which locks a mutex in
      HALB_IOThread::Entry(void*). HALB_Mutex::Lock() is also called in
      AudioObjectGetPropertyData, which is called by coreaudio driver.
      Therefore, a deadlock will occur if coreaudio driver calls
      AudioObjectGetPropertyData while holding a lock for a mutex and tries
      to lock the same mutex in AudioDeviceIOProc.
      
      audioDeviceIOProc, which implements AudioDeviceIOProc in coreaudio
      driver, requires an exclusive access for the device configuration and
      the buffer. Fortunately, a mutex is necessary only for the buffer in
      audioDeviceIOProc because a change for the device configuration occurs
      only before setting up AudioDeviceIOProc or after stopping the playback
      with AudioDeviceStop.
      
      With this change, the mutex owned by the driver will only be used for
      the buffer, and the device configuration change will be protected with
      the implicit iothread mutex.
      
      Signed-off-by: default avatarAkihiko Odaki <akihiko.odaki@gmail.com>
      Message-id: 20210622201740.38005-1-akihiko.odaki@gmail.com
      Message-Id: <20210622201740.38005-1-akihiko.odaki@gmail.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      eb1a35e4
  7. Jun 17, 2021
  8. Jun 02, 2021
  9. Mar 16, 2021
  10. Mar 09, 2021
  11. Jan 15, 2021
Loading