An application can restart mm-control with an explicit command
if the service has unexpectedly stopped and if the application can't continue without support for media operations.
The exact conditions that require a client application to restart mm-control are:
- the mm-control process has terminated abnormally;
- the client must perform media management tasks that require the use of mm-control; and
- the car infotainment system can't be rebooted to restart mm-control with SLM
because doing so would be too disruptive to the user.
To restart mm-control manually, your application must:
-
Confirm that mm-control isn't already running by
checking the list of active processes with the pidin or ps command.
-
Confirm that the pps, io-audio_mcbsp, audioman,
mm-renderer, and mm-trkmgr processes are already running by
checking the same list of active processes.
The mm-control process depends on all five of these other services, so if any one is not running,
that service must be started; otherwise, mm-control won't run properly.
-
Send the command line for running mm-control with the desired command options to the OS,
using the system() or spawn() system call.
The OS tries to run
mm-control and reports the operation outcome to
sloginfo.
For details on the system calls that send commands to the OS, see the
system() or
spawn()
section in the
C Library Reference.
For the full list of command-line options, see the
mm-control command line section.
If sloginfo shows no error, mm-control is running again,
so your application can resume sending PPS commands to the service to perform media operations.
Your car infotainment system should run only one instance of mm-control, so separate media applications
must coordinate with each other to avoid redundantly starting mm-control.