audio: fix audio drop when speaker is selected 2.

Commit 78a7609d fixed audio drop at the start of ringtone.
This commit fixes another similar issue with camera shutter sound being
dropped while in call over headset.
There was a workaround for this second issue in audio policy manager but this was
not satisfactory as it was impacting all devices for a problem that is
Prime specific.

Change-Id: I42b37c7da4a232323b520a8a55ac5b3086b5a230
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index b4138a6..a26ea14 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1431,7 +1431,8 @@
                         (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
                         (adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
                                          AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
-                         (val == AUDIO_DEVICE_OUT_SPEAKER))
+                        ((val & AUDIO_DEVICE_OUT_SPEAKER) ^
+                        (adev->devices & AUDIO_DEVICE_OUT_SPEAKER)))
             adev->devices &= ~AUDIO_DEVICE_OUT_ALL;