Set standby as false when the stream is started successfully.
When the audio patch is created and the stream is started, set the standby as false. In that case, if there is a simultaneous request for read or write data, it is no need to start the stream again. Bug: 212509560 Test: repo steps in the bug Change-Id: Ic3dbab3134bc761271b6b2ac8619135ef08075bc Merged-In: Ic3dbab3134bc761271b6b2ac8619135ef08075bc
This commit is contained in:
parent
728df4f5fc
commit
041a7d90dd
1 changed files with 8 additions and 2 deletions
|
@ -1855,10 +1855,16 @@ static int adev_create_audio_patch(struct audio_hw_device *dev,
|
|||
if (!wasStandby) {
|
||||
device_lock(adev);
|
||||
if (in != NULL) {
|
||||
start_input_stream(in);
|
||||
ret = start_input_stream(in);
|
||||
if (!ret) {
|
||||
in->standby = false;
|
||||
}
|
||||
}
|
||||
if (out != NULL) {
|
||||
start_output_stream(out);
|
||||
ret = start_output_stream(out);
|
||||
if (!ret) {
|
||||
out->standby = false;
|
||||
}
|
||||
}
|
||||
device_unlock(adev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue