TIF: Release an existing audio patch before creating a new one
Bug: 28115694, Bug: 28954262 Change-Id: I04e2e9176a008b72468592db7dc3c7ce376b94f2
This commit is contained in:
@@ -742,7 +742,10 @@ class TvInputHardwareManager implements TvInputHal.Callback {
|
||||
synchronized (mImplLock) {
|
||||
mAudioSource = null;
|
||||
mAudioSink.clear();
|
||||
mAudioPatch = null;
|
||||
if (mAudioPatch != null) {
|
||||
mAudioManager.releaseAudioPatch(mAudioPatch);
|
||||
mAudioPatch = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -980,6 +983,9 @@ class TvInputHardwareManager implements TvInputHal.Callback {
|
||||
}
|
||||
if (shouldRecreateAudioPatch) {
|
||||
mCommittedVolume = volume;
|
||||
if (mAudioPatch != null) {
|
||||
mAudioManager.releaseAudioPatch(mAudioPatch);
|
||||
}
|
||||
mAudioManager.createAudioPatch(
|
||||
audioPatchArray,
|
||||
new AudioPortConfig[] { sourceConfig },
|
||||
|
||||
Reference in New Issue
Block a user