• Jean-Michel Trivi's avatar
    Fix remote submix crash on null sink · 793a854e
    Jean-Michel Trivi authored
    The "remote submix" HAL uses a MonoPipe instance to "pipe" audio
      from the sink of this virtual device HAL to its source.
      The life-cycle of this pipe is:
      - creation when either the input or output stream is open
      - destruction when both input and output are closed.
    
    Changes are:
    Fix test for pipe destruction: destroy pipe when both
      input and output streams are NULL.
    Count how many read errors went into the logs and cap them
      so as not to spam the logs when the pipe is not properly
      set up. Less 'I' logs, 'D' logs instead.
    When opening input stream, check for non-null sink before
      checking if it's shutdown.
    
    Bug 16653334
    Bug 17111907
    
    Change-Id: I634b4192b00f9b74a5109f42242423e9c8cb4c7c
    793a854e
audio_hw.cpp 61.9 KB