Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Bug: 136294538
Test: make
Change-Id: I32a6400278496653b4204175cd8a16d81f9724a0
Merged-In: I32a6400278496653b4204175cd8a16d81f9724a0
Add the possibility to specify a target audio device when
creating an audio effect by passing its type and address to
AudioEffect constructor.
When doing so, the session ID must be AUDIO_SESSION_DEVICE.
Bug: 136294538
Test: make
Change-Id: I2a2eba340d3c2537285c091e9a53f305ff161a2b
Merged-In: I2a2eba340d3c2537285c091e9a53f305ff161a2b
Add specific audio session ID for effects applied to a
particular audio device.
Device specific effects will be attached to a particular audio sink or
source device identified by its unique audio port ID and will all use
this same session ID.
Only one session of this type exists on a given playback or record
thread.
All effects in this session apply to the same device ID and are created/released
when the routing (audio patch) of this thread output or input stream is updated.
Bug: 136294538
Test: make
Change-Id: I4e3a55ed1244b918429dd9e217b6efecc1ec6449
Merged-In: I4e3a55ed1244b918429dd9e217b6efecc1ec6449
Fix MmapStreamInterface::openMmapStream() implementation to return
actual sampling rate, channel mask and format used at the audio HAL
once the stream is opened.
Bug: 76213894
Test: make
Change-Id: I0e497b898d86246bcb1bdde42c3114d43e1f14d0
Add management of audio effects applied to a specific input
or output audio device.
A new class DeviceEffectProxy derived from Effectbase is added
to represent an effect attached to a particular audio device type and
address. This proxy manages one or more actual EffectModule instances
automatically added to a playback or capture thread or directly to the
audio HAL when the targeted audio device is used by an audio patch.
A new DeviceEffectManager class is added to manage creation and release
of DeviceEffectProxy instances and monitor creation and release of audio
patches and create or release actual effect instances accordingly.
Bug: 136294538
Test: make
Change-Id: I23b9f9db4459136039c5ee327cf3b1aefa7db5af
DIRECT and OFFLOAD Audio threads use the mixer when using SW effects.
This requires them to use the default sample rate.
Test: vendor specific, see bug
Bug: 147209612
Merged-In: I553fe43695d64160dd64808e18299699a4047225
Change-Id: I553fe43695d64160dd64808e18299699a4047225
DIRECT and OFFLOAD Audio threads use the mixer when using SW effects.
This requires them to use the default sample rate.
Test: vendor specific, see bug
Bug: 147209612
Change-Id: I553fe43695d64160dd64808e18299699a4047225
`realloc` doesn't deallocate `param` if it fails. Since the loop ends in
a `free`, we just need to avoid overwriting `param` until after the
check.
Caught by the static analyzer:
frameworks/av/services/audioflinger/Effects.cpp:1868:9: warning:
Potential leak of memory pointed to by 'param'
[clang-analyzer-unix.Malloc]
Bug: None
Test: TreeHugger
Change-Id: I58fe4319927b3ea99989e1fb1dc2dabe89c72ef8
The uninitialized audio_config_t has a .frame_count which is typically
not used by HALs for this calculation. However, in the case where the
HAL does use this, it can be any 32-bit value.
At best the HAL treats this as invalid or ignores it, but at worst the HAL
casts to uint32_t and causes the caller to request a ridiculous amount of
memory, leading to the process being killed with SIGABRT.
Fix: 146119742
Bug: 144245613
Bug: 144245318
Bug: 144000030
Test: atest AudioRecord_BufferSizeTest
Change-Id: I41714cb2058a6fe7a6a9f55b1fd7c8d862d69351
Fix missing initialization of EffectBase::mSuspend
introduced by commit 41709559.
Bug: 136294538
Test: make
Change-Id: I20de7712ff3701649c78da4e6172e58af3f1f625
Introduce a class EffecBase as a parent class of
EffectModule with default implementation for handles management,
basic properties storage and state management.
Bug: 146177259
Test: CTS: AudioEffectTest, EqualizerTest, VisualizerTest,
AudioPreProcessingTest
Test: manual test: Play Music EQ settings, Duo EAC and NS
Change-Id: Id91cef9db6b4f6be0d2e77a8b4afcbdc7234e519
This patch avoids pseudo LCM buffer calculation oversized buffer
causing posix_memalign error in cases of large play/record frame
counts (such as 24596) for PassthruPatchRecord patches.
Test: MSD to Primary audio patch with play/record frame counts
of 24596.
Change-Id: I3a2f3795330e99984388b01033d8e7c1685d01f2
This reverts commit c0abc6239e.
Reason for revert: broken build on target cf_x86_phone-userdebug_coverage
Change-Id: Ic6808bfd31bedfa85b7d7a120e4c6f6273678f73
This is in preparation of the addition of audio effects attached to a
specific audio device that will not be attached to a particular
ThreadBase or Effectchain.
Create an clean callback interface used by the EffectModule to interact
with the rest of the audio framework. This callback must be implemented
by the EffectModule parent (e.g an EfffectChain).
Als refactor EffectHandle enabled(), disable() and disconnect methods()
to avoid dealing with the ThreadBase directly.
Bug: 136294538
Test: make
Change-Id: I9160f88f7fbb0447b5e679260bf0401d3af591d2
This flag used to be framework only. To simplify constants
management it's better to have it defined at all layers.
Currently it is only used for MSD module but potentially
can be used for HDMI inputs.
Bug: 141273649
Test: use AOSP MSD on Pixel
atest VtsHalAudioV6_0TargetTest
Change-Id: I19f6fdb2772878c93e41b635dc6adae83a9fecb0
Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Bug: 136294538
Test: make
Change-Id: I32a6400278496653b4204175cd8a16d81f9724a0
Add the possibility to specify a target audio device when
creating an audio effect by passing its type and address to
AudioEffect constructor.
When doing so, the session ID must be AUDIO_SESSION_DEVICE.
Bug: 136294538
Test: make
Change-Id: I2a2eba340d3c2537285c091e9a53f305ff161a2b
Add specific audio session ID for effects applied to a
particular audio device.
Device specific effects will be attached to a particular audio sink or
source device identified by its unique audio port ID and will all use
this same session ID.
Only one session of this type exists on a given playback or record
thread.
All effects in this session apply to the same device ID and are created/released
when the routing (audio patch) of this thread output or input stream is updated.
Bug: 136294538
Test: make
Change-Id: I4e3a55ed1244b918429dd9e217b6efecc1ec6449
Add request to create tombstones of audio HAL servers before restarting
audioserver process when the watchdog triggers.
Add audio device factory HAL interface API to retrieve HAL process pids when
possible (on debug builds).
Add AudioFlinger service API to set audio HAL process pids from
JAVA AudioService.
Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I68c1e8fb4db23e5952ad0c93d7d0b9d121b8ec18
Merged-In: I68c1e8fb4db23e5952ad0c93d7d0b9d121b8ec18
Separate SET_DEVICE and SET_INPUT_DEVICE command in effects as it can
be multiple devices for output case, but only single device for input
case.
Use AudioDeviceTypeAddr instead of just audio device type as address
can be useful to identify audio device if there are multiple devices
with the same device type connected.
Bug: 135621476
Test: atest AudioEffectTest BassBoostTest DynamicsProcessingTest
Test: atest EqualizerTest VirtualizerTest VisualizerTest
Change-Id: Ie9df88e3338730392abbc3efae5daadc70398ff7
Merged-In: Ie9df88e3338730392abbc3efae5daadc70398ff7
As audio device type must not be used as a bit mask, there is a
requirement to refactor the code in audio flinger. This CL includes:
1. Use DeviceTypeSet for recording output devices in Threads. The input
and output device types in Threads will only be updated when creating
an audio patch.
2. Use helper functions in audio flinger for checking whether an audio
device type is a certain category.
3. Use DeviceDescriptorBaseVector as vector of DeviceDescriptorBase.
DeviceDescriptorBaseVector will be used in RecordThread to record output
devices, which will be used in audio effect.
4. Do not use set parameters when communicating output devices to
RecordThread. Instead, adding a new event in Thread to update output
devices directly.
Bug: 135621476
Test: atest AudioTrackTest AudioRecordTest AudioPlaybackCaptureTest
Test: atest AudioHostTest AudioServiceHostTest RoutingTest
Test: atest AudioEffectTest BassBoostTest DynamicsProcessingTest
Test: atest AAudioTests
Test: audio smoke test, run OboeTester
Change-Id: I87f3e59fd01b0b100232d61a9abbc471c61110c4
Merged-In: I87f3e59fd01b0b100232d61a9abbc471c61110c4
Refactor interface between audio flinger and audio policy. Use device
descriptor instead of audio device type and address. DeviceDescriptor
can contain more information that may be useful when opening an output
stream.
In audio policy, if multiple audio devices are passed in when opening
an output stream, one device is extracted using the same strategy as
when selecting a device for volume application. When starting source,
audio policy manager will call audio flinger to create audio patch. In
that case, multiple devices will still be patched to the output stream.
Test: atest AudioTrackTest AudioPlaybackCaptureTest
Test: atest audiopolicy_tests, audio smoke test
Change-Id: I46dc2da621614f8716c6c73cf807fe7d2d672cda
Merged-In: I46dc2da621614f8716c6c73cf807fe7d2d672cda
This change mainly aims at refactoring libmediahelper. Libmediahelper
doesn't need to be stored in media folder. In that case, move
libmediahelper related file to a new folder. In the meantime, move
AudioParameter.h from libaudioclient to libmediahelper. There is no
need to keep AudioParameter.h in libaudioclient while AudioParameter.cpp
is in libmediahelper.
Test: make
Bug: 135621476
Change-Id: Icce6615b7e3a68be8b7492f2a91922ab04464ca2
Merged-In: Icce6615b7e3a68be8b7492f2a91922ab04464ca2
Also add track state name helper function for logging.
Test: Play video clip then pause and resume several times
Bug: 145613591
Change-Id: If4fc2565da9b3d4964fb9fdb6f5854ff6fbadfb8
Enable static check for audio arrays so that it can be earlier to catch
if there is any error within the audio arrays.
Bug: 135621476
Test: make
Change-Id: I598311e0853ca77dff83fb97974e534adb238567
Merged-In: I598311e0853ca77dff83fb97974e534adb238567
Fix bug in PatchPanel::createAudioPatch() were the previous
audio HAL assigned patch handle was dropped when modifying an exiting
audio patch
Bug: 137300168
Test: manual test with USB headset insertion removal
Change-Id: Ie8345ca97502a2d7327535f0228e0ff0bc95f8e9
Sometimes after switching songs in Files, audio driver
enters "PAUSED" state, and no sound anymore.
In normal case, "paused" track will be removed from active tracks,
then audio hal will make this stream enter standby mode.
Actually there are two paths to move paused tracks into standby mode:
1> track underruns twice:
if (--(track->mRetryCount) <= 0) { // mRetryCount is 2
tracksToRemove->add(track);
} else {
doHwPause = true; // pause
}
Unfortunately, this issue happened exactly in the middle state:
track underrun for the first time, it enters to paused state;
then before it underrun for second time, it is stopped due to MediaPlayer.
2> track is paused and code goes here:
if (mStandby || !last ||
track->presentationComplete(framesWritten, audioHALFrames) ||
track->isPaused() ||
+ track->isStopped()) {
tracksToRemove->add(track);
}
But when the issue happens, track is in stopped state,
there is no logic to standby it anymore, so add one.
Change-Id: I70cac1f3d6b065690400f6a2363712d4642a9763
1. Query 44100 and 48000 SR if proposed SR is not supported
2. Query AUDIO_CHANNEL_IN_MONO and AUDIO_CHANNEL_IN_STEREO if
proposed channel_mask is not supported
3. Return with bytes rather than frames
4. Fix destinationFramesPossible usage
Test: run cts
android.media.cts.AudioRecord_BufferSizeTest#testGetMinBufferSize
Bug: 144245613
Bug: 144245318
Bug: 144000030
Change-Id: I0fa90eb1bef63bd441724cdb0fa7f9172f503364
Separate SET_DEVICE and SET_INPUT_DEVICE command in effects as it can
be multiple devices for output case, but only single device for input
case.
Use AudioDeviceTypeAddr instead of just audio device type as address
can be useful to identify audio device if there are multiple devices
with the same device type connected.
Bug: 135621476
Test: atest AudioEffectTest BassBoostTest DynamicsProcessingTest
Test: atest EqualizerTest VirtualizerTest VisualizerTest
Change-Id: Ie9df88e3338730392abbc3efae5daadc70398ff7
Add request to create tombstones of audio HAL servers before restarting
audioserver process when the watchdog triggers.
Add audio device factory HAL interface API to retrieve HAL process pids when
possible (on debug builds).
Add AudioFlinger service API to set audio HAL process pids from
JAVA AudioService.
Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I68c1e8fb4db23e5952ad0c93d7d0b9d121b8ec18
As audio device type must not be used as a bit mask, there is a
requirement to refactor the code in audio flinger. This CL includes:
1. Use DeviceTypeSet for recording output devices in Threads. The input
and output device types in Threads will only be updated when creating
an audio patch.
2. Use helper functions in audio flinger for checking whether an audio
device type is a certain category.
3. Use DeviceDescriptorBaseVector as vector of DeviceDescriptorBase.
DeviceDescriptorBaseVector will be used in RecordThread to record output
devices, which will be used in audio effect.
4. Do not use set parameters when communicating output devices to
RecordThread. Instead, adding a new event in Thread to update output
devices directly.
Bug: 135621476
Test: atest AudioTrackTest AudioRecordTest AudioPlaybackCaptureTest
Test: atest AudioHostTest AudioServiceHostTest RoutingTest
Test: atest AudioEffectTest BassBoostTest DynamicsProcessingTest
Test: atest AAudioTests
Test: audio smoke test, run OboeTester
Change-Id: I87f3e59fd01b0b100232d61a9abbc471c61110c4
Otherwise we could return the uninitialized value when result != OK.
Bug: 143955791
Test: manual - Run the test in the bug and it doesn't crash.
Change-Id: I23b2b0a20202152648a3e40650965bba45127ff3
Refactor interface between audio flinger and audio policy. Use device
descriptor instead of audio device type and address. DeviceDescriptor
can contain more information that may be useful when opening an output
stream.
In audio policy, if multiple audio devices are passed in when opening
an output stream, one device is extracted using the same strategy as
when selecting a device for volume application. When starting source,
audio policy manager will call audio flinger to create audio patch. In
that case, multiple devices will still be patched to the output stream.
Test: atest AudioTrackTest AudioPlaybackCaptureTest
Test: atest audiopolicy_tests, audio smoke test
Change-Id: I46dc2da621614f8716c6c73cf807fe7d2d672cda
Capturing from source AUDIO_SOURCE_FM_TUNER is possible only via @SystemApi
on one end and does not capture from an actual on the other end.
Accordingly, do not check android.permission.RECORD_AUDIO anymore but
check privileged permission android.permission.CAPTURE_AUDIO_OUTPUT instead.
Also bypass App Ops OP_RECORD_AUDIO check which is applicable only to capture from
microphones.
Also fix audio recording permission check in MediaRecordClient to use
recordingAllowed() from ServiceUtilities
Bug: 135717621
Test: CTS tests for AudioRecord
Change-Id: Ibb1d72f018d2e3ceee195338f2e262183eee2a23
This reverts commit a0877dc731.
Reason for revert: Should work with go/pag/1465463 merging to master.
Change-Id: I17217744eacabf15621d4a5aac9dd1678e37e4ba
This change mainly aims at refactoring libmediahelper. Libmediahelper
doesn't need to be stored in media folder. In that case, move
libmediahelper related file to a new folder. In the meantime, move
AudioParameter.h from libaudioclient to libmediahelper. There is no
need to keep AudioParameter.h in libaudioclient while AudioParameter.cpp
is in libmediahelper.
Test: make
Bug: 135621476
Change-Id: Icce6615b7e3a68be8b7492f2a91922ab04464ca2
LinearMap It is only used in AudioFlinger to associate track frames
to sink frames. It is not related to media stuff. In that case, move
it to audio_utils.
Test: make
Change-Id: I947e1cb61bd6e66d5fd53b4f7d0a8e1c5876cbf4
Fix issue where RecordTrack silencing didn't silence the
full buffer: the memset to 0 was using the RecordThread frame
size, not the RecordTrack frame size.
OP_RECORD_AUDIO was only enforced at the start of a recording
which would fail if not granted. This patch silences the recording
(i.e. silence is recorded instead) when it is lost, and undoes that
when granted again. This requires:
- propagating the package name of the client to the RecordTrack class
- registering an appOp callback in RecordTrack (through a new
OpRecordAudioMonitor class) to (un)silence the recording
- update the isSilenced() method to take into account the appOp.
Bug: 138968594
Bug: 138636979
Test: run app that records audio, then "adb shell appops __pack_name__ 27 2"
and verify recording is silent after that.
Change-Id: Ib33f5b592185a67204997213bab1ac2594d90d37
(cherry picked from commit ddf87effa4)
Merged-In: Ib33f5b592185a67204997213bab1ac2594d90d37
(cherry picked from commit 7307293e8b)
There were three issues with the implementation
of Audio Playback Capture patches on secondary outputs.
1) Patch tracks were always forced to be ready, even if there were not
enough audio to be played. That led to playing partial buffers if the
source output had smaller (time wise) buffer than the secondary output.
This is fixed by avoiding setting CBLK_FORCEREADY on every buffer push
from the primary output thread.
2) After 1 is fixed, the patch tracks now behave like regular (non fast)
tracks. This means that the track only starts when it is full.
That leads to overrun on startup as the primary and secondary outputs
usually do not have the same write period.
What makes the issue worst is that Remote submix has a fixed buffer in bytes,
so its write period changes depending on sample rate contrary to the
primary HAL which pulls with fixed time periods (usually 20/40ms).
This patch solution is to introduce a ready threshold. The track will be
considered ready to be active if there are more than frames in its buffer.
To avoid changing previous latency behaviour except for APC,
legacy tracks have this threshold set to their buffer size and
non APC patch tracks have it set to 1, similar to setting
CBLK_FORCEREADY.
3) The patch track buffer size calculation of the patch track did not take
into account primary and secondary output could be of different sampling
rate.
This mean that the patch track buffer was usually too small as the
secondary output usually had smaller sampling rate (Live caption
requests 16kHz) than the track (music usually plays in 48kHz).
This made the two problems even worst.
This was easily fixed by scaling the buffer size with each side sample rate.
Bug: 136691300
Test: play audio
adb shell audiorecorder --target /data/file1.raw
# Check that the recorded file has no underrun
Change-Id: Ib2846b2827afd1b953d4a25acb18c7cadf57cd3e
Signed-off-by: Kevin Rocard <krocard@google.com>
There were three issues with the implementation
of Audio Playback Capture patches on secondary outputs.
1) Patch tracks were always forced to be ready, even if there were not
enough audio to be played. That led to playing partial buffers if the
source output had smaller (time wise) buffer than the secondary output.
This is fixed by avoiding setting CBLK_FORCEREADY on every buffer push
from the primary output thread.
2) After 1 is fixed, the patch tracks now behave like regular (non fast)
tracks. This means that the track only starts when it is full.
That leads to overrun on startup as the primary and secondary outputs
usually do not have the same write period.
What makes the issue worst is that Remote submix has a fixed buffer in bytes,
so its write period changes depending on sample rate contrary to the
primary HAL which pulls with fixed time periods (usually 20/40ms).
This patch solution is to introduce a ready threshold. The track will be
considered ready to be active if there are more than frames in its buffer.
To avoid changing previous latency behaviour except for APC,
legacy tracks have this threshold set to their buffer size and
non APC patch tracks have it set to 1, similar to setting
CBLK_FORCEREADY.
3) The patch track buffer size calculation of the patch track did not take
into account primary and secondary output could be of different sampling
rate.
This mean that the patch track buffer was usually too small as the
secondary output usually had smaller sampling rate (Live caption
requests 16kHz) than the track (music usually plays in 48kHz).
This made the two problems even worst.
This was easily fixed by scaling the buffer size with each side sample rate.
Bug: 136691300
Test: play audio
adb shell audiorecorder --target /data/file1.raw
# Check that the recorded file has no underrun
Change-Id: Ib2846b2827afd1b953d4a25acb18c7cadf57cd3e
Signed-off-by: Kevin Rocard <krocard@google.com>
Add missing calls to ATRACE for direct writes and frames ready
on direct thread.
Test: <start direct output>
external/chromium-trace/systrace.py audio
Merged-In: Iee6ea72442f9902819628735e19cce0ba1546165
Change-Id: Iee6ea72442f9902819628735e19cce0ba1546165
Properly handle 'timeOut == nullptr' case in
PassthruPatchRecord::obtainBuffer.
Bug: 117564323
Test: make
Change-Id: Id352e47682c0992b817f26b3b594ec5913e663be
When both input and output connected by a software patch
are in 'DIRECT' mode (no framework processing), use
PassthruPatchRecord as it helps to reduce the latency
significantly by avoiding intermediate buffering.
Remove 'std::nothrow' from tracks creation in PatchPanel
for consistency with other code.
Bug: 117564323
Test: with MSD module
Merged-In: I52ec5b02a207548ebc4073c1033e396f444c041c
Change-Id: I52ec5b02a207548ebc4073c1033e396f444c041c
Implement a subclass of PatchRecord that uses PatchTrack's
thread for reading from HAL. This eliminates the need for
buffering that adds latency.
The only modification needed for PatchTrack is to indicate
unlimited amount of available frames to the playback thread.
This is to prevent PatchTrack from being deactivated by
DirectOutputThread due to lack of frames available.
RecordThread believes it reads audio data on its thread,
and manages timestamps as usual. The data that it "reads"
and passes to PassthruPatchRecord is discarded by the latter.
Bug: 117564323
Test: with MSD module
Merged-In: I376656e3c791e91e2196331ecdf2b425697c4e18
Change-Id: I376656e3c791e91e2196331ecdf2b425697c4e18
This allows to replace direct reading from HAL with obtaining
audio data from another source.
It should be possible to encapsulate reading from FastCapture
in the same manner, but it's not required for direct inputs.
Test: make
Merged-In: I3f005583410cc9c5d4b07c127d95e236abb4a85f
Change-Id: I3f005583410cc9c5d4b07c127d95e236abb4a85f
This code logically belongs to PatchRecord because it emulates
obtaining recorded data from a client.
Test: make
Merged-In: Icba4e33d9d0ca57e6ad964aaf3209e7db766f284
Change-Id: Icba4e33d9d0ca57e6ad964aaf3209e7db766f284
Seeing requested / obtained buffer frame counts in trace
helps to identify discontinuities in software patch pipeline.
There is no need to trace requested frame count for PatchRecord
as it always requests as much as possible ("-1" frameCount).
Bug: 117564323
Test: with software patch active,
external/chromium-trace/systrace.py audio
Merged-In: I78400f6cc1d1940b3290fb23bb1aacfbffe042e5
Change-Id: I78400f6cc1d1940b3290fb23bb1aacfbffe042e5
Split AudioMixer into the base part which doesn't rely on
the framework and can be used in vendor code and the derived part
which is intended to be used by Audioflinger.
Test: A/B compare output from test scripts, manual testing on the phone
Merged-In: I24c390f67f20baa8109902099359ca6e34eebcfd
Change-Id: I24c390f67f20baa8109902099359ca6e34eebcfd
- Remove unused dependencies on libnbaio and libnblog;
- Move dependencies on libaudiohal and libsonic to libaudioprocessing
as AudioMixer implementation does not use them.
Test: make
Merged-In: I258a450725bdacb4fcf437b6f86582d51d40e622
Change-Id: I258a450725bdacb4fcf437b6f86582d51d40e622
* changes:
Use PassthruPatchRecord for DIRECT to DIRECT connections
Add PassthruPatchRecord for low latency software patches
Abstract access to HAL stream via Source in RecordThread
Move PlaybackThread::Track::writeFrames to PatchRecord
When both input and output connected by a software patch
are in 'DIRECT' mode (no framework processing), use
PassthruPatchRecord as it helps to reduce the latency
significantly by avoiding intermediate buffering.
Remove 'std::nothrow' from tracks creation in PatchPanel
for consistency with other code.
Bug: 117564323
Test: MS12 MSD, AOSP MSD
Change-Id: I52ec5b02a207548ebc4073c1033e396f444c041c
Implement a subclass of PatchRecord that uses PatchTrack's
thread for reading from HAL. This eliminates the need for
buffering that adds latency.
The only modification needed for PatchTrack is to indicate
unlimited amount of available frames to the playback thread.
This is to prevent PatchTrack from being deactivated by
DirectOutputThread due to lack of frames available.
RecordThread believes it reads audio data on its thread,
and manages timestamps as usual. The data that it "reads"
and passes to PassthruPatchRecord is discarded by the latter.
Bug: 117564323
Test: MS12 MSD, AOSP MSD
Change-Id: I376656e3c791e91e2196331ecdf2b425697c4e18