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