Skip to content

Commit 21d07b3

Browse files
johnylin76Chromeos LUCI
authored and
Chromeos LUCI
committed
sof_tests: cstate command for queryimg comp states
Supports command "cstate" to get the current state ("on"/"off") of the given SOF component type, or signal "exists" at least while unable to resolve the state. Usage: sof_tests cstate [COMPONENT] [--expect] COMPONENT - The component type with possible values: [nc, aec, drc, eq, waves, dts, dsm, ghd], or ask for scanning all components by leaving it non-specified. -e , --expect - Print state only if it's expected to exist. BUG=b:339975492 TEST=run commands below on SOF-backed CrOS devices, e.g. anahera 1. cmd#> sof_tests cstate list all available components: + NC is ON ; detected card0 CTL numid=52,name='RTNR10.0 rtnr_enable_10' - AEC is off; detected card0 CTL numid=49,name='GOOGLE_RTC_AUDIO_PROCESSING10.0 Config' 2. cmd#> sof_tests cstate nc + NC is ON ; detected card0 CTL numid=52,name='RTNR10.0 rtnr_enable_10' 3. cmd#> sof_tests cstate dts DTS doesn't exist 4. cmd#> sof_tests cstate aec -e Off 5. cmd#> sof_tests cstate eq -e ERROR: cmd cstate: no control is detected Change-Id: I772b2694514c821c5b0fe79f16350704ca1cdf3c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5628571 Tested-by: [email protected] <[email protected]> Auto-Submit: Pin-chih Lin <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Commit-Queue: Pin-chih Lin <[email protected]>
1 parent c8ad9c2 commit 21d07b3

File tree

5 files changed

+569
-75
lines changed

5 files changed

+569
-75
lines changed

Cargo.Bazel.lock

Lines changed: 134 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"checksum": "1c9928464e73adfcb9b163c4c1e2ae879e70d562c282fa39bf2302260e945495",
2+
"checksum": "c10ffaace9b5872a564673493e80fe7719a6c41d46278853196bfbbf557a3f2d",
33
"crates": {
44
"addr2line 0.20.0": {
55
"name": "addr2line",
@@ -89,14 +89,14 @@
8989
],
9090
"license_file": "LICENSE-0BSD"
9191
},
92-
"aho-corasick 0.7.20": {
92+
"aho-corasick 1.1.3": {
9393
"name": "aho-corasick",
94-
"version": "0.7.20",
94+
"version": "1.1.3",
9595
"package_url": "https://github.com/BurntSushi/aho-corasick",
9696
"repository": {
9797
"Http": {
98-
"url": "https://static.crates.io/crates/aho-corasick/0.7.20/download",
99-
"sha256": "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
98+
"url": "https://static.crates.io/crates/aho-corasick/1.1.3/download",
99+
"sha256": "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
100100
}
101101
},
102102
"targets": [
@@ -120,22 +120,22 @@
120120
],
121121
"crate_features": {
122122
"common": [
123-
"default",
123+
"perf-literal",
124124
"std"
125125
],
126126
"selects": {}
127127
},
128128
"deps": {
129129
"common": [
130130
{
131-
"id": "memchr 2.4.1",
131+
"id": "memchr 2.7.4",
132132
"target": "memchr"
133133
}
134134
],
135135
"selects": {}
136136
},
137-
"edition": "2018",
138-
"version": "0.7.20"
137+
"edition": "2021",
138+
"version": "1.1.3"
139139
},
140140
"license": "Unlicense OR MIT",
141141
"license_ids": [
@@ -976,7 +976,7 @@
976976
"target": "quote"
977977
},
978978
{
979-
"id": "regex 1.6.0",
979+
"id": "regex 1.10.5",
980980
"target": "regex"
981981
},
982982
{
@@ -2373,7 +2373,7 @@
23732373
"target": "bindgen"
23742374
},
23752375
{
2376-
"id": "regex 1.6.0",
2376+
"id": "regex 1.10.5",
23772377
"target": "regex"
23782378
}
23792379
],
@@ -3694,7 +3694,7 @@
36943694
"target": "build_script_build"
36953695
},
36963696
{
3697-
"id": "memchr 2.4.1",
3697+
"id": "memchr 2.7.4",
36983698
"target": "memchr"
36993699
},
37003700
{
@@ -4941,14 +4941,14 @@
49414941
],
49424942
"license_file": "LICENSE-APACHE"
49434943
},
4944-
"memchr 2.4.1": {
4944+
"memchr 2.7.4": {
49454945
"name": "memchr",
4946-
"version": "2.4.1",
4946+
"version": "2.7.4",
49474947
"package_url": "https://github.com/BurntSushi/memchr",
49484948
"repository": {
49494949
"Http": {
4950-
"url": "https://static.crates.io/crates/memchr/2.4.1/download",
4951-
"sha256": "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
4950+
"url": "https://static.crates.io/crates/memchr/2.7.4/download",
4951+
"sha256": "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
49524952
}
49534953
},
49544954
"targets": [
@@ -4963,18 +4963,6 @@
49634963
]
49644964
}
49654965
}
4966-
},
4967-
{
4968-
"BuildScript": {
4969-
"crate_name": "build_script_build",
4970-
"crate_root": "build.rs",
4971-
"srcs": {
4972-
"allow_empty": false,
4973-
"include": [
4974-
"**/*.rs"
4975-
]
4976-
}
4977-
}
49784966
}
49794967
],
49804968
"library_target_name": "memchr",
@@ -4984,29 +4972,16 @@
49844972
],
49854973
"crate_features": {
49864974
"common": [
4975+
"alloc",
49874976
"default",
49884977
"std"
49894978
],
49904979
"selects": {}
49914980
},
4992-
"deps": {
4993-
"common": [
4994-
{
4995-
"id": "memchr 2.4.1",
4996-
"target": "build_script_build"
4997-
}
4998-
],
4999-
"selects": {}
5000-
},
5001-
"edition": "2018",
5002-
"version": "2.4.1"
5003-
},
5004-
"build_script_attrs": {
5005-
"data_glob": [
5006-
"**"
5007-
]
4981+
"edition": "2021",
4982+
"version": "2.7.4"
50084983
},
5009-
"license": "Unlicense/MIT",
4984+
"license": "Unlicense OR MIT",
50104985
"license_ids": [
50114986
"MIT",
50124987
"Unlicense"
@@ -5460,7 +5435,7 @@
54605435
"deps": {
54615436
"common": [
54625437
{
5463-
"id": "memchr 2.4.1",
5438+
"id": "memchr 2.7.4",
54645439
"target": "memchr"
54655440
},
54665441
{
@@ -5838,7 +5813,7 @@
58385813
"deps": {
58395814
"common": [
58405815
{
5841-
"id": "memchr 2.4.1",
5816+
"id": "memchr 2.7.4",
58425817
"target": "memchr"
58435818
}
58445819
],
@@ -6613,7 +6588,7 @@
66136588
"target": "protobuf_parse"
66146589
},
66156590
{
6616-
"id": "regex 1.6.0",
6591+
"id": "regex 1.10.5",
66176592
"target": "regex"
66186593
},
66196594
{
@@ -6860,14 +6835,14 @@
68606835
],
68616836
"license_file": "LICENSE"
68626837
},
6863-
"regex 1.6.0": {
6838+
"regex 1.10.5": {
68646839
"name": "regex",
6865-
"version": "1.6.0",
6840+
"version": "1.10.5",
68666841
"package_url": "https://github.com/rust-lang/regex",
68676842
"repository": {
68686843
"Http": {
6869-
"url": "https://static.crates.io/crates/regex/1.6.0/download",
6870-
"sha256": "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
6844+
"url": "https://static.crates.io/crates/regex/1.10.5/download",
6845+
"sha256": "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
68716846
}
68726847
},
68736848
"targets": [
@@ -6891,14 +6866,14 @@
68916866
],
68926867
"crate_features": {
68936868
"common": [
6894-
"aho-corasick",
68956869
"default",
6896-
"memchr",
68976870
"perf",
6871+
"perf-backtrack",
68986872
"perf-cache",
68996873
"perf-dfa",
69006874
"perf-inline",
69016875
"perf-literal",
6876+
"perf-onepass",
69026877
"std",
69036878
"unicode",
69046879
"unicode-age",
@@ -6914,22 +6889,109 @@
69146889
"deps": {
69156890
"common": [
69166891
{
6917-
"id": "aho-corasick 0.7.20",
6892+
"id": "aho-corasick 1.1.3",
69186893
"target": "aho_corasick"
69196894
},
69206895
{
6921-
"id": "memchr 2.4.1",
6896+
"id": "memchr 2.7.4",
69226897
"target": "memchr"
69236898
},
69246899
{
6925-
"id": "regex-syntax 0.6.27",
6900+
"id": "regex-automata 0.4.7",
6901+
"target": "regex_automata"
6902+
},
6903+
{
6904+
"id": "regex-syntax 0.8.4",
69266905
"target": "regex_syntax"
69276906
}
69286907
],
69296908
"selects": {}
69306909
},
6931-
"edition": "2018",
6932-
"version": "1.6.0"
6910+
"edition": "2021",
6911+
"version": "1.10.5"
6912+
},
6913+
"license": "MIT OR Apache-2.0",
6914+
"license_ids": [
6915+
"Apache-2.0",
6916+
"MIT"
6917+
],
6918+
"license_file": "LICENSE-APACHE"
6919+
},
6920+
"regex-automata 0.4.7": {
6921+
"name": "regex-automata",
6922+
"version": "0.4.7",
6923+
"package_url": "https://github.com/rust-lang/regex/tree/master/regex-automata",
6924+
"repository": {
6925+
"Http": {
6926+
"url": "https://static.crates.io/crates/regex-automata/0.4.7/download",
6927+
"sha256": "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
6928+
}
6929+
},
6930+
"targets": [
6931+
{
6932+
"Library": {
6933+
"crate_name": "regex_automata",
6934+
"crate_root": "src/lib.rs",
6935+
"srcs": {
6936+
"allow_empty": false,
6937+
"include": [
6938+
"**/*.rs"
6939+
]
6940+
}
6941+
}
6942+
}
6943+
],
6944+
"library_target_name": "regex_automata",
6945+
"common_attrs": {
6946+
"compile_data_glob": [
6947+
"**"
6948+
],
6949+
"crate_features": {
6950+
"common": [
6951+
"alloc",
6952+
"dfa-onepass",
6953+
"hybrid",
6954+
"meta",
6955+
"nfa-backtrack",
6956+
"nfa-pikevm",
6957+
"nfa-thompson",
6958+
"perf-inline",
6959+
"perf-literal",
6960+
"perf-literal-multisubstring",
6961+
"perf-literal-substring",
6962+
"std",
6963+
"syntax",
6964+
"unicode",
6965+
"unicode-age",
6966+
"unicode-bool",
6967+
"unicode-case",
6968+
"unicode-gencat",
6969+
"unicode-perl",
6970+
"unicode-script",
6971+
"unicode-segment",
6972+
"unicode-word-boundary"
6973+
],
6974+
"selects": {}
6975+
},
6976+
"deps": {
6977+
"common": [
6978+
{
6979+
"id": "aho-corasick 1.1.3",
6980+
"target": "aho_corasick"
6981+
},
6982+
{
6983+
"id": "memchr 2.7.4",
6984+
"target": "memchr"
6985+
},
6986+
{
6987+
"id": "regex-syntax 0.8.4",
6988+
"target": "regex_syntax"
6989+
}
6990+
],
6991+
"selects": {}
6992+
},
6993+
"edition": "2021",
6994+
"version": "0.4.7"
69336995
},
69346996
"license": "MIT OR Apache-2.0",
69356997
"license_ids": [
@@ -6938,14 +7000,14 @@
69387000
],
69397001
"license_file": "LICENSE-APACHE"
69407002
},
6941-
"regex-syntax 0.6.27": {
7003+
"regex-syntax 0.8.4": {
69427004
"name": "regex-syntax",
6943-
"version": "0.6.27",
6944-
"package_url": "https://github.com/rust-lang/regex",
7005+
"version": "0.8.4",
7006+
"package_url": "https://github.com/rust-lang/regex/tree/master/regex-syntax",
69457007
"repository": {
69467008
"Http": {
6947-
"url": "https://static.crates.io/crates/regex-syntax/0.6.27/download",
6948-
"sha256": "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
7009+
"url": "https://static.crates.io/crates/regex-syntax/0.8.4/download",
7010+
"sha256": "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
69497011
}
69507012
},
69517013
"targets": [
@@ -6970,6 +7032,7 @@
69707032
"crate_features": {
69717033
"common": [
69727034
"default",
7035+
"std",
69737036
"unicode",
69747037
"unicode-age",
69757038
"unicode-bool",
@@ -6981,8 +7044,8 @@
69817044
],
69827045
"selects": {}
69837046
},
6984-
"edition": "2018",
6985-
"version": "0.6.27"
7047+
"edition": "2021",
7048+
"version": "0.8.4"
69867049
},
69877050
"license": "MIT OR Apache-2.0",
69887051
"license_ids": [
@@ -7864,6 +7927,10 @@
78647927
"id": "clap 4.5.4",
78657928
"target": "clap"
78667929
},
7930+
{
7931+
"id": "regex 1.10.5",
7932+
"target": "regex"
7933+
},
78677934
{
78687935
"id": "serde 1.0.152",
78697936
"target": "serde"
@@ -11773,7 +11840,7 @@
1177311840
"protobuf 3.2.0",
1177411841
"protobuf-codegen 3.2.0",
1177511842
"protobuf-parse 3.2.0",
11776-
"regex 1.6.0",
11843+
"regex 1.10.5",
1177711844
"rustfft 6.1.0",
1177811845
"serde 1.0.152",
1177911846
"serde_json 1.0.96",

0 commit comments

Comments
 (0)