hal: avoid music output from combo device after ringtone

When headset insert, music output route to headset. Later
ringtone happens, music pauses, and its output device still
is headset. But primary output will change to speaker+headphone
to play ringtone. When ringtone stops, music output from headset
first, then the output device changes to speaker+headphone combo
device. This is due to platform_set_swap_channels function is
called to cause device switch to current primary output device.

Fix by avoid device switch happen when current device is not
stereo speaker or swap flag is false.

CRs-Fixed: 2243778
Change-Id: I363e039ae8621e9bab2827e85c8744b556259320
2 files changed