hal: update derive_playback_snd_device to return correct device
Update logic for case 1 to choose the common device between the
existing uc device and the new uc combo device.
CRs-Fixed: 2308588
Change-Id: I99df64797a0f03250f30677b67a7cb7967aa73e6
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 482ffd6..b4a8a3f 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1303,8 +1303,8 @@
if (platform_check_backends_match(d3[0], d3[1])) {
return d2; // case 5
} else {
- // check if d1 and d3[1] are related
- if (d1 == d3[1])
+ // check if d1 is related to any of d3's
+ if (d1 == d3[0] || d1 == d3[1])
return d1; // case 1
else
return d3[1]; // case 8