blob: c4a6601fd195b6d41408c1e607b68cbfb825b084 [file] [log] [blame]
Marco Nelissendcb346b2015-09-09 10:47:29 -07001service audioserver /system/bin/audioserver
Wei Wang21385d02017-09-15 14:04:05 -07002 class core
Marco Nelissendcb346b2015-09-09 10:47:29 -07003 user audioserver
4 # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
Nick Kralevichf6f60c02019-05-23 09:06:24 -07005 group audio camera drmrpc media mediadrm net_bt net_bt_admin net_bw_acct wakelock
Tri Voc3a07c12018-05-17 15:50:50 -07006 capabilities BLOCK_SUSPEND
Marco Nelissendcb346b2015-09-09 10:47:29 -07007 ioprio rt 4
Suren Baghdasaryan029f52b2020-04-30 14:39:39 -07008 task_profiles ProcessCapacityHigh HighPerformance
Mikhail Naganov6a1e8802020-06-03 19:02:34 +00009 onrestart restart vendor.audio-hal
10 onrestart restart vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020011 onrestart restart audio_proxy_service
Mikhail Naganov6a1e8802020-06-03 19:02:34 +000012 # Keep the original service names for backward compatibility
13 onrestart restart vendor.audio-hal-2-0
14 onrestart restart audio-hal-2-0
Eric Laurent1700f3d2017-02-16 15:56:42 -080015
16on property:vts.native_server.on=1
17 stop audioserver
18on property:vts.native_server.on=0
19 start audioserver
François Gaffied544f1c2018-06-25 15:25:48 +020020
Ytai Ben-Tsvi4da7af22020-04-23 10:44:00 -070021on property:init.svc.audioserver=stopped
22 stop vendor.audio-hal
23 stop vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020024 stop audio_proxy_service
Ytai Ben-Tsvi4da7af22020-04-23 10:44:00 -070025 # Keep the original service names for backward compatibility
26 stop vendor.audio-hal-2-0
27 stop audio-hal-2-0
Mikhail Naganov7ee69742020-05-06 09:46:35 -070028 # See b/155364397. Need to have HAL service running for VTS.
29 # Can't use 'restart' because then HAL service would restart
30 # audioserver bringing it back into running state.
31 start vendor.audio-hal
32 start vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020033 start audio_proxy_service
Mikhail Naganov7ee69742020-05-06 09:46:35 -070034 # Keep the original service names for backward compatibility
35 start vendor.audio-hal-2-0
36 start audio-hal-2-0
Ytai Ben-Tsvi4da7af22020-04-23 10:44:00 -070037
38on property:init.svc.audioserver=running
39 start vendor.audio-hal
40 start vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020041 start audio_proxy_service
Ytai Ben-Tsvi4da7af22020-04-23 10:44:00 -070042 # Keep the original service names for backward compatibility
43 start vendor.audio-hal-2-0
44 start audio-hal-2-0
45
Ytai Ben-Tsvie734d9d2020-04-10 11:14:27 -070046on property:sys.audio.restart.hal=1
Mikhail Naganov6a1e8802020-06-03 19:02:34 +000047 # See b/159966243. Avoid restart loop between audioserver and HAL.
Ytai Ben-Tsvie734d9d2020-04-10 11:14:27 -070048 # Keep the original service names for backward compatibility
Mikhail Naganov6a1e8802020-06-03 19:02:34 +000049 stop vendor.audio-hal
50 stop vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020051 stop audio_proxy_service
Mikhail Naganov6a1e8802020-06-03 19:02:34 +000052 stop vendor.audio-hal-2-0
53 stop audio-hal-2-0
54 start vendor.audio-hal
55 start vendor.audio-hal-4-0-msd
Patrick Rohr68f32252020-07-09 09:11:38 +020056 start audio_proxy_service
Mikhail Naganov6a1e8802020-06-03 19:02:34 +000057 start vendor.audio-hal-2-0
58 start audio-hal-2-0
Ytai Ben-Tsvie734d9d2020-04-10 11:14:27 -070059 # reset the property
60 setprop sys.audio.restart.hal 0
61
François Gaffied544f1c2018-06-25 15:25:48 +020062on init
63 mkdir /dev/socket/audioserver 0775 audioserver audioserver