hal: handle the reserved usecase when derive sound device
There's one reserved usecaes for hypothetical purpose which
can do happen, now handle it properly to avoid breaking
the exsiting playback usecase.
Change-Id: Ie2e6d9c00e3cd2c5b935855c0d3caebead4e99fa
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 3e3f72f..57e420a 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1303,9 +1303,10 @@
if (platform_check_backends_match(d3[0], d3[1])) {
return d2; // case 5
} else {
- // check if d1 is related to any of d3's
- if (d1 == d3[0] || d1 == d3[1])
- return d1; // case 1
+ // check if d1 is related to any of d3's OR
+ // old uc is combo device but new_uc is one of the combo device
+ if (d1 == d3[0] || d1 == d3[1] || popcount(a1) > 1)
+ return d1; // case 1, 7
else
return d3[1]; // case 8
}