Merge "TIF: Release an existing audio patch before creating a new one" into nyc-dev am: bd2b9e0d53 am: 5e0f4e2e29
am: 3f1bd14d0b
* commit '3f1bd14d0b7dc0ecbcd73381a02dd27a143d2c2f':
TIF: Release an existing audio patch before creating a new one
Change-Id: Ie35f25cbf9c65d573b1d7720eefa1815d5186dc6
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