Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67dccd5e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix Tv source audio device adjust volume, and audio is breaks up intermittently."

parents 1c4d67b3 fe52156e
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -1075,19 +1075,24 @@ class TvInputHardwareManager implements TvInputHal.Callback {
            }
            if (shouldRecreateAudioPatch) {
                mCommittedVolume = volume;
                // only recreate if  something was updated or audioPath is null
                if (mAudioPatch == null || sinkUpdated ||sourceUpdated ) {
                    if (mAudioPatch != null) {
                        mAudioManager.releaseAudioPatch(mAudioPatch);
                        audioPatchArray[0] = null;
                    }
                    mAudioManager.createAudioPatch(
                        audioPatchArray,
                        new AudioPortConfig[] { sourceConfig },
                        sinkConfigs.toArray(new AudioPortConfig[sinkConfigs.size()]));
                    mAudioPatch = audioPatchArray[0];
                }
             }

            if (sourceGainConfig != null) {
                mAudioManager.setAudioPortGain(mAudioSource, sourceGainConfig);
            }
        }
        }

        @Override
        public void setStreamVolume(float volume) throws RemoteException {