audio/msm8660: Set proper device for Voip routing commands

-Voice message doesn't switch to earpiece when switched from speaker
in Fetion apk.
-Device routing commands to streamOutDirect session use primary
output stream device set. This results in ignoring the device set
for voip session. Fetion uses music stream to play on speaker and
voice stream to route to earpiece.
-Fix this problem by setting device routed for streamOutDirect by
explicitly sending the output device value set in setParameters.
Also if the requested device is the same as current device, still
allow routing call to AudioHardware as current outputDesc might not
be updated with current active device always. In such cases if device
stored in outputDesc is same as newDevice it will still not allow
routing from current device. Since there is already a check in
AudioHardware to avoid routing multiple calls on same device,
removing this check is safe.

Change-Id: I934f3fcc5d77ffdb7634ba471d1cfd38682c6a61
CRs-Fixed: 444787
2 files changed
tree: dde1657b6fa1511115f40ba78f47f6fa2eb61e17
  1. alsa_sound/
  2. audiod/
  3. libalsa-intf/
  4. mm-audio/
  5. msm7x30/
  6. msm8660/