libaudiohal: Use IDeviceFactory in MSD HAL when opening a device
This allows instantiating the MSD device if the HAL is present.
The directive in the .rc about restarting "vendor.audio-hal-4-0-msd"
service is ignored when the service is not present.
The current policy for handling HAL service restarts is to
terminate the audio service. It is possible to do better,
e.g. only re-open the devices of the crashed HAL when possible,
without affecting devices from other HALs. Will try to implement
that later.
Remove the MSD-related code from the V2.0 shim, as MSD isn't
supported on HAL V2.0.
Bug: 63901775
Test: manual on a MSD HAL prototype, also on taimen with no MSD HAL
Change-Id: I7f9de692d6e7b8ff52cdbcaba1074692c5f1c90e
diff --git a/media/audioserver/audioserver.rc b/media/audioserver/audioserver.rc
index 75675a9..ec859f2 100644
--- a/media/audioserver/audioserver.rc
+++ b/media/audioserver/audioserver.rc
@@ -6,6 +6,7 @@
ioprio rt 4
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
onrestart restart vendor.audio-hal-2-0
+ onrestart restart vendor.audio-hal-4-0-msd
# Keep the original service name for backward compatibility when upgrading
# O-MR1 devices with framework-only.
onrestart restart audio-hal-2-0