Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.85 KB | None | 0 0
  1. [nemo@Sailfish pulse]$ cat xpolicy.conf
  2. # -------- Group section -------------------------------------------------------
  3.  
  4. [group]
  5. name = idle
  6. flags = nopolicy
  7. sink = sink.null
  8. source = sink.null.monitor
  9.  
  10. [group]
  11. name = background
  12. flags = limit_volume, cork_stream
  13. sink = sink.primary
  14. source = source.primary
  15.  
  16. [group]
  17. name = systemsound
  18. flags = set_sink, limit_volume, cork_stream, mute_by_route
  19. sink = sink.primary
  20. source = sink.null.monitor
  21.  
  22. [group]
  23. name = btnotify
  24. flags = set_sink, limit_volume, cork_stream, mute_by_route
  25. sink = sink.primaryandbluez
  26. source = sink.null.monitor
  27.  
  28. [group]
  29. name = feedbacksound
  30. flags = set_sink, limit_volume, cork_stream, mute_by_route
  31. sink = sink.primary
  32. source = sink.null.monitor
  33.  
  34. [group]
  35. name = inputsound
  36. flags = set_sink, limit_volume, cork_stream, mute_by_route
  37. sink = sink.primary
  38. source = sink.null.monitor
  39.  
  40. [group]
  41. name = event
  42. flags = set_sink, limit_volume, cork_stream, mute_by_route
  43. sink = sink.primary
  44. source = sink.null.monitor
  45.  
  46. [group]
  47. name = alarm
  48. flags = set_sink, limit_volume, cork_stream
  49. sink = sink.primary
  50. source = sink.null.monitor
  51.  
  52. [group]
  53. name = flash
  54. flags = limit_volume, cork_stream
  55. sink = sink.primary
  56. source = source.primary
  57.  
  58. [group]
  59. name = player
  60. flags = route_audio, limit_volume, cork_stream
  61. sink = sink.primary
  62. source = source.primary
  63.  
  64. [group]
  65. name = game
  66. flags = route_audio, limit_volume, cork_stream
  67. sink = sink.primary
  68. source = source.primary
  69.  
  70. [group]
  71. name = voiceui
  72. flags = set_sink, limit_volume, cork_stream
  73. sink = sink.primary
  74. source = sink.null.monitor
  75.  
  76. [group]
  77. name = ringtone
  78. flags = limit_volume, mute_by_route, cork_stream, media_notify
  79. sink = sink.primary
  80. source = source.null.monitor
  81.  
  82. [group]
  83. name = camera
  84. flags = set_sink, set_source, limit_volume, cork_stream
  85. sink = sink.primary
  86. source = source.primary
  87.  
  88. [group]
  89. name = videoeditor
  90. flags = route_audio, limit_volume, cork_stream
  91. sink = sink.primary
  92. source = source.primary
  93.  
  94. [group]
  95. name = ipcall
  96. flags = set_sink, set_source, limit_volume, cork_stream
  97. sink = sink.primary
  98. source = source.primary
  99.  
  100. [group]
  101. name = call
  102. flags = set_sink, set_source
  103. sink = sink.primary
  104. source = source.primary
  105.  
  106. [group]
  107. name = navigator
  108. flags = set_sink, set_source
  109. sink = sink.primary
  110. source = sink.null.monitor
  111.  
  112. [group]
  113. name = cstone
  114. flags = route_audio, set_source, limit_volume
  115. sink = sink.primary
  116. source = sink.null.monitor
  117.  
  118. [group]
  119. name = alwayson
  120. flags = set_sink, limit_volume, cork_stream
  121. sink = sink.primary
  122. source = sink.null.monitor
  123.  
  124. [group]
  125. name = nonsilent
  126. flags = set_sink, limit_volume, cork_stream
  127. sink = sink.primary
  128. source = sink.null.monitor
  129.  
  130. [group]
  131. name = internal
  132. flags = nopolicy
  133. sink = sink.null
  134. source = source.null.monitor
  135.  
  136. [group]
  137. name = outgoing
  138. flags = route_audio
  139. sink = sink.primary
  140. source = sink.null.monitor
  141.  
  142. [group]
  143. name = incoming
  144. flags = route_audio
  145. sink = sink.null
  146. source = source.primary
  147.  
  148. [group]
  149. name = alien
  150. flags = route_audio, limit_volume, cork_stream
  151. sink = sink.primary
  152. source = source.primary
  153.  
  154. [group]
  155. name = aliencall
  156. flags = route_audio, limit_volume, cork_stream
  157. sink = sink.primary
  158. source = source.primary
  159.  
  160.  
  161. # -------- Card section --------------------------------------------------------
  162.  
  163. # -------- Device section ------------------------------------------------------
  164.  
  165. [device]
  166. type = tvoutandbta2dp
  167. sink = name@startswith:"bluez_sink"
  168.  
  169. [device]
  170. type = ihfandheadset
  171. sink = equals:sink.primary
  172. ports = sink.primary:output-speaker+wired_headphone
  173.  
  174. [device]
  175. type = ihfandheadset
  176. source= equals:source.primary
  177. ports = source.primary:input-wired_headset
  178.  
  179. [device]
  180. type = ihfandheadphone
  181. sink = equals:sink.primary
  182. ports = sink.primary:output-speaker+wired_headphone
  183.  
  184. [device]
  185. type = bta2dp
  186. sink = name@startswith:"bluez_sink"
  187. ports = sink.primary:output-speaker
  188. flags = disable_notify
  189.  
  190. [device]
  191. type = bta2dpforalien
  192. sink = name@startswith:"bluez_sink"
  193. ports = sink.primary:output-speaker
  194. flags = disable_notify
  195.  
  196. [device]
  197. type = bthsp
  198. sink = equals:sink.primary
  199. ports = sink.primary:output-bluetooth_sco
  200. flags = disable_notify, refresh_always
  201.  
  202. [device]
  203. type = bthsp
  204. source = equals:source.primary
  205. ports = source.primary:input-bluetooth_sco_headset
  206. flags = disable_notify, refresh_always
  207.  
  208. [device]
  209. type = bthspforcall
  210. sink = equals:sink.primary
  211. ports = sink.primary:output-bluetooth_sco
  212. flags = disable_notify, refresh_always, delayed_port_change
  213.  
  214. [device]
  215. type = bthspforcall
  216. source = equals:source.primary
  217. ports = source.primary:input-bluetooth_sco_headset
  218. flags = disable_notify, refresh_always
  219.  
  220. [device]
  221. type = bthspforalien
  222. sink = equals:sink.primary
  223. ports = sink.primary:output-bluetooth_sco
  224. flags = disable_notify, refresh_always, delayed_port_change
  225.  
  226. [device]
  227. type = bthspforalien
  228. source = equals:source.primary
  229. ports = source.primary:input-bluetooth_sco_headset
  230. flags = disable_notify, refresh_always
  231.  
  232. [device]
  233. type = bthfp
  234. sink = equals:sink.primary
  235. ports = sink.primary:output-bluetooth_sco
  236. flags = disable_notify, refresh_always
  237.  
  238. [device]
  239. type = bthfp
  240. source = equals:source.primary
  241. ports = source.primary:input-bluetooth_sco_headset
  242. flags = disable_notify, refresh_always
  243.  
  244. [device]
  245. type = bthfpforcall
  246. sink = equals:sink.primary
  247. ports = sink.primary:output-bluetooth_sco
  248. flags = disable_notify, refresh_always, delayed_port_change
  249.  
  250. [device]
  251. type = bthfpforcall
  252. source = equals:source.primary
  253. ports = source.primary:input-bluetooth_sco_headset
  254. flags = disable_notify, refresh_always
  255.  
  256. [device]
  257. type = bthfpforalien
  258. sink = equals:sink.primary
  259. ports = sink.primary:output-bluetooth_sco
  260. flags = disable_notify, refresh_always, delayed_port_change
  261.  
  262. [device]
  263. type = bthfpforalien
  264. source = equals:source.primary
  265. ports = source.primary:input-bluetooth_sco_headset
  266. flags = disable_notify, refresh_always
  267.  
  268. [device]
  269. type = headset
  270. source = equals:source.primary
  271. ports = source.primary:input-wired_headset
  272. flags = disable_notify, refresh_always
  273.  
  274. [device]
  275. type = headset
  276. sink = equals:sink.primary
  277. ports = sink.primary:output-wired_headset
  278. flags = disable_notify, refresh_always
  279.  
  280. [device]
  281. type = headsetforcall
  282. sink = equals:sink.primary
  283. ports = sink.primary:output-wired_headset
  284. flags = refresh_always
  285.  
  286. [device]
  287. type = headsetforcall
  288. source = equals:source.primary
  289. ports = source.primary:input-wired_headset
  290.  
  291. [device]
  292. type = headsetforalien
  293. sink = equals:sink.primary
  294. ports = sink.primary:output-wired_headset
  295. flags = refresh_always
  296.  
  297. [device]
  298. type = headsetforalien
  299. source = equals:source.primary
  300. ports = source.primary:input-wired_headset
  301.  
  302. [device]
  303. type = headphone
  304. sink = equals:sink.primary
  305. ports = sink.primary:output-wired_headphone
  306. flags = disable_notify, refresh_always
  307.  
  308. [device]
  309. type = headphoneforcall
  310. sink = equals:sink.primary
  311. ports = sink.primary:output-wired_headphone
  312. flags = refresh_always
  313.  
  314. [device]
  315. type = headphoneforalien
  316. sink = equals:sink.primary
  317. ports = sink.primary:output-wired_headphone
  318. flags = refresh_always
  319.  
  320. [device]
  321. type = ihfandtvout
  322. sink = equals:sink.primary
  323. ports = sink.primary:output-wired_headset
  324.  
  325. [device]
  326. type = tvout
  327. sink = equals:sink.primary
  328. ports = sink.primary:output-wired_headset
  329.  
  330. [device]
  331. type = earpieceandtvout
  332. sink = equals:sink.primary
  333. ports = sink.primary:output-earpiece
  334.  
  335. [device]
  336. type = earpieceforcall
  337. sink = equals:sink.primary
  338. ports = sink.primary:output-earpiece
  339.  
  340. [device]
  341. type = earpiece
  342. sink = equals:sink.primary
  343. ports = sink.primary:output-earpiece
  344.  
  345. [device]
  346. type = earpieceforalien
  347. sink = equals:sink.primary
  348. ports = sink.primary:output-earpiece
  349. flags = refresh_always
  350.  
  351. [device]
  352. type = microphone
  353. source = equals:source.primary
  354. ports = source.primary:input-builtin_mic
  355.  
  356. [device]
  357. type = backmicrophone
  358. source = equals:source.primary
  359. ports = source.primary:input-back_mic
  360.  
  361. [device]
  362. type = ihf
  363. sink = equals:sink.primary
  364. ports = sink.primary:output-speaker
  365. flags = refresh_always
  366.  
  367. [device]
  368. type = ihfforcall
  369. sink = equals:sink.primary
  370. ports = sink.primary:output-speaker
  371. flags = refresh_always
  372.  
  373. [device]
  374. type = ihfforalien
  375. sink = equals:sink.primary
  376. ports = sink.primary:output-speaker
  377. flags = refresh_always
  378.  
  379. [device]
  380. type = voicecall
  381. source= equals:source.primary
  382. ports = source.primary:input-voice_call
  383.  
  384. [device]
  385. type = null
  386. sink = equals:sink.null
  387.  
  388. # -------- Stream section ------------------------------------------------------
  389.  
  390. [stream]
  391. exe = gst-launch-0.10
  392. group = player
  393.  
  394. [stream]
  395. exe = gst-launch-1.0
  396. group = player
  397.  
  398. [stream]
  399. exe = pacat
  400. group = player
  401.  
  402. # Ignore pulsesink probe from gstreamer pulsesink
  403. [stream]
  404. property = media.name@equals:"pulsesink probe"
  405. group = internal
  406.  
  407. [stream]
  408. exe = ngfd
  409. property = media.name@equals:"system-event"
  410. sink = bta2dp
  411. group = btnotify
  412.  
  413. [stream]
  414. exe = ngfd
  415. property = event.id@equals:"alarm-clock-elapsed"
  416. sink = bta2dp
  417. group = btnotify
  418.  
  419. [stream]
  420. exe = ngfd
  421. property = event.id@equals:"message-new-email"
  422. sink = bta2dp
  423. group = btnotify
  424.  
  425. [stream]
  426. exe = ngfd
  427. property = media.name@equals:"battery-event"
  428. sink = bta2dp
  429. group = btnotify
  430.  
  431. [stream]
  432. property = application.process.arg0@equals:"/usr/bin/maliit-server"
  433. group = feedbacksound
  434.  
  435. [stream]
  436. property = event.id@equals:"phone-incoming-call"
  437. group = ringtone
  438.  
  439. [stream]
  440. property = event.id@equals:"alarm-clock-elapsed"
  441. group = alarm
  442.  
  443. [stream]
  444. property = event.id@equals:"message-new-email"
  445. group = event
  446.  
  447. [stream]
  448. exe = ngfd
  449. property = event.id@equals:"event-in-call"
  450. group = alwayson
  451.  
  452. [stream]
  453. exe = ngfd
  454. property = media.name@equals:"event-in-call"
  455. group = alwayson
  456.  
  457. [stream]
  458. exe = ngfd
  459. property = media.name@equals:"camera-event"
  460. group = camera
  461.  
  462. [stream]
  463. exe = ngfd
  464. property = media.name@equals:"feedback-event"
  465. group = feedbacksound
  466.  
  467. [stream]
  468. exe = ngfd
  469. property = media.name@equals:"system-event"
  470. group = systemsound
  471.  
  472. [stream]
  473. exe = ngfd
  474. property = media.name@equals:"battery-event"
  475. group = systemsound
  476.  
  477. [stream]
  478. exe = telepathy-stream-engine
  479. group = call
  480.  
  481. [stream]
  482. property = application.process.arg0@equals:"/usr/lib/telepathy/telepathy-stream-engine"
  483. group = call
  484.  
  485. [stream]
  486. property = media.name@equals:"indtone"
  487. group = cstone
  488.  
  489. [stream]
  490. property = media.name@equals:"dtmf"
  491. group = cstone
  492.  
  493. [stream]
  494. property = media.name@equals:"notiftone"
  495. group = nonsilent
  496.  
  497. [stream]
  498. exe = qmafw-dbus-wrapper
  499. group = player
  500.  
  501. [stream]
  502. name = "Virtual Stream for MainVolume Volume Control"
  503. group = internal
  504.  
  505. [stream]
  506. name = "output of sink.primary"
  507. group = internal
  508.  
  509. [stream]
  510. name = "input of source.primary"
  511. group = internal
  512.  
  513. [stream]
  514. property = media.role@equals:"abstract"
  515. group = internal
  516.  
  517. # For routing to sink.primaryandbluez
  518. [stream]
  519. property = media.name@startswith:"Simultaneous output on"
  520. group = internal
  521.  
  522. # -------- Context rule section ------------------------------------------------
  523.  
  524. [context-rule]
  525. variable = call
  526. value = equals:outgoing
  527. set-property = sink-name@equals:"sink.primary", property:"x-nemo.voicecall.status", value@constant:"active"
  528.  
  529. [context-rule]
  530. variable = call
  531. value = equals:active
  532. set-property = sink-name@equals:"sink.primary", property:"x-nemo.voicecall.status", value@constant:"active"
  533.  
  534. [context-rule]
  535. variable = call
  536. value = equals:inactive
  537. set-property = sink-name@equals:"sink.primary", property:"x-nemo.voicecall.status", value@constant:"inactive"
  538.  
  539. [context-rule]
  540. variable = media_state
  541. value = matches:"^[^t].*"
  542. set-property = sink-name@equals:"sink.primary", property:"x-nemo.media.state", value@copy-from-context
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement