sthal: Avoid second stage buffer duration adjustment if second stage is not enabled

Third party VA engines may use DSP non-generic event type. Currently second stage buffer
duration adjustment for non-generic events is done without considering whether second stage
is even present or not, which results in a crash. Fix it by checking if second stage is
enabled before adjusting the second stage buffer duration.

Change-Id: I71bac1edef076971cbba63c39ad5826dc8228ebf
1 file changed