22 Commits

Author SHA1 Message Date
David Li
8ca98549db audio: add file_contexts of /dev/acd-mc_headpos
Bug: 307842941
Test: mm
Change-Id: Id4210c309d4a86e81a510dacb83b23396c5a327b
2024-02-21 19:58:44 +08:00
Ben McGee
e7431b85ae Dumpstate: Remove heap stats
Bug 315711190 is caused by an issue parsing the heap statistics. A proposed long term fix has been merged in, but is deemed risky for 24Q1. This CL removes heap printing from dumpstate is a low risk approach to working around this bug.

Bug: 315711190
Test: Built and tested on device
Change-Id: I6134aeeda6fe74d9bbf966d44a1a98391e03a2f7
2024-02-01 02:23:55 +00:00
Bruce Po
d202a34dbc Allow aocxd to set thread priority
aocxd sets thread scheduler to SCHED_FIFO. This is so audio processing
in aocxd can run without glitching.

vndbinder:11464: type=1400 audit(0.0:17): avc:  denied  { sys_nice } for  capability=23  scontext=u:r:aocxd:s0 tcontext=u:r:aocxd:s0 tclass=capability permissive=0

BUG: 318791959
Change-Id: I9c9148aa7b18ce525091f93956e112b4c178a129
2024-01-17 18:58:06 +00:00
Bruce Po
6b92b30e7b selinux: New aocx service
Add new aocxd server domain
- Allow aocxd to access AOC resources
- Add new aocx binder vendor service

Allow audio hal to find and talk to aocx

avc error tcontext=u:object_r:binder_device:s0 tclass=chr_file or tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file

avc:  denied  { add } for pid=1073 uid=0 name=aocx.IAocx scontext=u:r:aocxd:s0 tcontext=u:object_r:aocx:s0 tclass=service_manager

avc:  denied  { call } for  scontext=u:r:hal_audio_default:s0 tcontext=u:r:aocxd:s0 tclass=binder

BUG: 315853303
Change-Id: Ide16a2be9f032bef60f43d4d3daa6372ae06b057
2024-01-08 17:57:03 +00:00
Alex Iacobucci
6461e33428 aoc: add policy to read system property
Solves error: 1

2-13 18:33:15.860000  root  1019  1019 I auditd  : type=1400 audit(0.0:7): avc:  denied  { read } for  comm="aocd" name="u:object_r:vendor_rild_prop:s0" dev="tmpfs" ino=404 scontext=u:r:aocd:s0 tcontext=u:object_r:vendor_rild_prop:s0 tclass=file permissive=0

Test: on device
Bug: 207711097
Change-Id: Ia28e1622746cca973ca66f437e0e655bbcaf7d66
Signed-off-by: Alex Iacobucci <alexiacobucci@google.com>
2023-12-13 19:32:43 +00:00
Treehugger Robot
a806be1695 Merge "Modify gs-common sepolicy for the new BT comms to AoC" into main 2023-11-22 05:04:07 +00:00
Luis Delgado de Mendoza
769fcd7249 Modify gs-common sepolicy for the new BT comms to AoC
Bug: 308452948
Test: Validated in husky with all changes.
Change-Id: I6496b7760e6f20b3b7e09910ed42446a1eb703cf
2023-11-17 20:00:58 -08:00
Alex Iacobucci
9035c70f06 aoc: add permissions for new sysfs node
Resolving the following audit denials:

- [    6.450477] type=1400 audit(1699468821.992:6): avc:  denied
{ read } for comm="aocd" name="notify_timeout_aoc_status"
dev="sysfs" ino=78572 scontext=u:r:aocd:s0
tcontext=u:object_r:sysfs_aoc:s0 tclass=file permissive=0

- type=1107 audit(0.0:9): uid=0 auid=4294967295 ses=4294967295
subj=u:r:init:s0 msg='avc: denied  { set } for
property=persist.vendor.aoc.status_request_timed_out
pid=1035 uid=0 gid=0 scontext=u:r:aocd:s0
tcontext=u:object_r:vendor_default_prop:s0
tclass=property_service permissive=0'
(and get for the same node)

Test: on device
Bug: 309950738
Change-Id: I476624a6d95667d47ada765d6fe392eecc615256
Signed-off-by: Alex Iacobucci <alexiacobucci@google.com>
2023-11-17 16:17:29 +00:00
Luis Delgado de Mendoza Garcia
1f198e03ae Allow chre_daemon to use chre dedicated channel.
This change allows the chre_daemon to use the dedicated channels
to AOC:
/dev/acd-com.google.chre
/dev/acd-com.google.chre.non_wake_up

Bug: 241960170
Test: local in-device verification.
Change-Id: I06f5eb143fe60d05f6ff0fbf06664e046f17a3aa
2023-06-29 11:47:03 +00:00
Luigi Zevola
05961615f6 Dumpstate: add AoC Monitor Mode status
Add AoC Monitor Mode status to bug reports.

Bug: 288616032
Test: On device
Change-Id: Iced980bd76c2cc99ae20a67add9179e307f0e73c
Signed-off-by: Luigi Zevola <zevola@google.com>
2023-06-23 21:14:48 +00:00
Luigi Zevola
4130bc577b Dumpstate: add FF1 DVFS table
Dump AoC FF1 DVFS table when triggering bugreports to capture core
frequency and DVFS requests.

Bug: 288284717
Test: On device
Change-Id: Icc42cefe0e1b6c2ca4dda10dfaf0867739b85751
Signed-off-by: Luigi Zevola <zevola@google.com>
2023-06-22 00:19:53 +00:00
Carter Hsu
0f56053ee3 Merge "audio: allow audio hal to access acd-mel_processor" into udc-dev am: 40e3593b25
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs-common/+/22950048

Change-Id: I64e54f421f37222961608e2a4e5527492dbfef6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 01:45:16 +00:00
Carter Hsu
81a4337feb audio: allow audio hal to access acd-mel_processor
The /dev/acd-mel_processor is for the SoundDose
feature

Bug: 244133608
Test: build pass
Change-Id: I1f9c914c9a2d8cc86a8f1c643a9bbd73deb221d4
Signed-off-by: Carter Hsu <carterhsu@google.com>
2023-05-02 08:22:31 +00:00
Ray Hsu
adfda88cdf gs-common:aoc: correct aoc information in the bugreport
The aoc system node may be different for each platform. We can use
wildcard characters to replace these addresses.

To specify all addresses between 17000000 and 19000000, we could use the
wildcard character *. This would allow us to use the same code for all
platform, regardless of the specific addresses used

Test: adb bugreport && unzip bugreport*.zip &&
      check dump_aoc section in dumpstate_board.txt
Bug: 279680450
Change-Id: I1eaad3bd31e78265af6a9428064e9def501a813e
2023-04-26 10:51:44 +00:00
Jasmine Cha
8e0e106363 audio: add audio hal aidl service
- separate audio hal HIDL and AIDL services.
- separate sepolicy of aoc and audio

Bug: 259161622
Test: build pass and check hidl/aidl on gs201
      build pass for other chipset

Change-Id: Id3c0446be6cdcd5a6e75c832e7d7f4a64716f79c
Signed-off-by: Jasmine Cha <chajasmine@google.com>
2023-03-09 13:47:57 +08:00
Erik Staats
3c7b1f03a1 Set acd-com.google.umfw_stat type to aoc_device
Set the /dev/acd-com.google.umfw_stat security context type to
aoc_device.

Bug: 254464877
Test: Verified /dev/acd-com.google.umfw_stat security context.
Change-Id: Ibeba4c65f479c38ab740e156dd244e2f40d00dd4
Merged-In: Ibeba4c65f479c38ab740e156dd244e2f40d00dd4
2023-03-06 22:47:48 +00:00
Jasmine Cha
b6ccc2ea0f audio: introduce sepolicy for hal audio ext service
Bug: 206738075
Test: build pass

Change-Id: I742566946d744c966443f30740adb8a3a4b3c00c
Signed-off-by: Jasmine Cha <chajasmine@google.com>
2023-03-02 16:17:02 +08:00
Jayachandran C
cdcd803b5a Allow radio to access aoc_device for RTP encoding/decoding
This CL labels new AoC devices used for RTP processing

This fixes the follow denials
type=1400 audit(0.0:11): avc: denied { write } for name="acd-audio_rtp_tx" dev="tmpfs" ino=1185 scontext=u:r:radio:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=0
type=1400 audit(0.0:12): avc: denied { read } for name="acd-audio_rtp_rx" dev="tmpfs" ino=1186 scontext=u:r:radio:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=0

Bug: 259178236
Test: Manually verified on the device with AOC
Change-Id: Iffe0de3a27c89892af7ae280fa39dd28a0052542
2023-02-15 21:33:57 +00:00
Roger Fang
1ac9127cbd sepolicy: add permission for CCA rate of pixelstats-vend
pixelstats-vend: type=1400 audit(0.0:7): avc: denied { read } for name="cca_rate_read_once" dev="sysfs" ino=101939 scontext=u:r:pixelstats_vendor:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Bug: 249225148
Test: Manually test passed

Change-Id: Iab3343d3d1184201b97fe336c6fef4d298004a5d
Signed-off-by: Roger Fang <rogerfang@google.com>
2022-11-11 09:10:23 +00:00
Adam Shih
8146116936 move aoc settings to gs-common
Bug: 248426917
Test: boot with aoc launched
Change-Id: I7f3e65f9b27510bff657ca46c9688932a0352437
2022-10-20 11:23:26 +08:00
Adam Shih
4b68f5fe95 create a lib to hold commonly used functions
Bug: 240530709
Test: adb bugreport
Change-Id: Idcdcca968b65d2bd413b219d39fc1104dfc9f3b8
2022-10-18 13:38:13 +08:00
Adam Shih
ee779b9ac8 move aoc dump to gs-common
Bug: 248426917
Test: adb bugreport
Change-Id: I29fea8752011959b5d0eb50ed93c6e8eed66f9ee
2022-10-11 15:36:26 +08:00