Merge ~sylvain-pineau/checkbox-support:fix-1827826 into checkbox-support:master
- Git
- lp:~sylvain-pineau/checkbox-support
- fix-1827826
- Merge into master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Sylvain Pineau | ||||
Approved revision: | 169d2be77082fc1ba6864f10a5402129894d15b5 | ||||
Merged at revision: | 3907bd028b0f420c204874b1fb0631feb683d2cc | ||||
Proposed branch: | ~sylvain-pineau/checkbox-support:fix-1827826 | ||||
Merge into: | checkbox-support:master | ||||
Diff against target: |
683 lines (+637/-3) 3 files modified
checkbox_support/parsers/pactl.py (+8/-3) checkbox_support/parsers/tests/pactl_data/pa_ucm_pre_tag_bionic.txt (+619/-0) checkbox_support/parsers/tests/test_pactl.py (+10/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Devices Certification Bot | Needs Fixing | ||
Sylvain Pineau (community) | Approve | ||
Review via email: mp+367029@code.launchpad.net |
Commit message
Description of the change
Fixes linked bug (update of the pactl parser)
Devices Certification Bot (ce-certification-qa) wrote : | # |
The merge was fine but running tests failed.
[xenial] [10:21:33] starting container
Device project added to xenial-testing
[xenial] [10:21:44] provisioning container
[trusty] [10:21:52] starting container
[bionic] [10:21:53] starting container
Device project added to trusty-testing
Device project added to bionic-testing
[trusty] [10:22:06] provisioning container
[bionic] [10:22:07] provisioning container
[trusty] [10:24:07] Unable to provision requirements in container!
[bionic] [10:24:07] Unable to provision requirements in container!
[trusty] output: https:/
[trusty] [10:24:10] Fixing file permissions in source directory
[bionic] output: https:/
[bionic] [10:24:10] Fixing file permissions in source directory
[bionic] Destroying failed container to reclaim resources
[trusty] Destroying failed container to reclaim resources
[xenial] [10:24:24] Unable to provision requirements in container!
[xenial] output: https:/
[xenial] [10:24:26] Fixing file permissions in source directory
[xenial] Destroying failed container to reclaim resources
Devices Certification Bot (ce-certification-qa) wrote : | # |
The merge was fine but running tests failed.
[bionic] [10:51:32] starting container
[trusty] [10:51:32] starting container
Device project added to bionic-testing
Device project added to trusty-testing
[xenial] [10:51:35] starting container
Device project added to xenial-testing
[bionic] [10:51:48] provisioning container
[trusty] [10:51:49] provisioning container
[xenial] [10:51:49] provisioning container
[bionic] [10:51:56] Unable to provision requirements in container!
[bionic] output: https:/
[bionic] [10:51:59] Fixing file permissions in source directory
[bionic] Destroying failed container to reclaim resources
[xenial] [10:52:10] Starting tests...
[xenial] Found a test script: ./requirements/
[trusty] [10:52:29] Starting tests...
[trusty] Found a test script: ./requirements/
[xenial] [10:52:39] container-
[xenial] [10:52:39] Fixing file permissions in source directory
[xenial] [10:52:39] Destroying container
[trusty] [10:52:54] container-
[trusty] [10:52:54] Fixing file permissions in source directory
[trusty] [10:52:54] Destroying container
Preview Diff
1 | diff --git a/checkbox_support/parsers/pactl.py b/checkbox_support/parsers/pactl.py |
2 | index 928e2e5..0d8e227 100644 |
3 | --- a/checkbox_support/parsers/pactl.py |
4 | +++ b/checkbox_support/parsers/pactl.py |
5 | @@ -1,8 +1,9 @@ |
6 | # This file is part of Checkbox. |
7 | # |
8 | -# Copyright 2013 Canonical Ltd. |
9 | +# Copyright 2013-2019 Canonical Ltd. |
10 | # Written by: |
11 | # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> |
12 | +# Sylvain Pineau <sylvain.pineau@canonical.com> |
13 | # |
14 | # Checkbox is free software: you can redistribute it and/or modify |
15 | # it under the terms of the GNU General Public License version 3, |
16 | @@ -220,7 +221,9 @@ class Port(Node): |
17 | } |
18 | |
19 | __syntax__ = ( |
20 | - p.Word(p.alphanums + "-;").setResultsName('port-name') |
21 | + p.Optional('[Out] ').suppress() |
22 | + + p.Optional('[In] ').suppress() |
23 | + + p.Word(p.alphanums + "-;").setResultsName('port-name') |
24 | + p.Suppress(':') |
25 | # This part was very tricky to write. The label is basically |
26 | # arbitrary localized Unicode text. We want to grab all of it in |
27 | @@ -283,7 +286,9 @@ class PortWithProfile(Node): |
28 | } |
29 | |
30 | __syntax__ = ( |
31 | - p.Word(p.alphanums + "-;").setResultsName('port-name') |
32 | + p.Optional('[Out] ').suppress() |
33 | + + p.Optional('[In] ').suppress() |
34 | + + p.Word(p.alphanums + "-;").setResultsName('port-name') |
35 | + p.Suppress(':') |
36 | # This part was very tricky to write. The label is basically arbitrary |
37 | # localized Unicode text. We want to grab all of it in one go but |
38 | diff --git a/checkbox_support/parsers/tests/pactl_data/pa_ucm_pre_tag_bionic.txt b/checkbox_support/parsers/tests/pactl_data/pa_ucm_pre_tag_bionic.txt |
39 | new file mode 100644 |
40 | index 0000000..1b67e20 |
41 | --- /dev/null |
42 | +++ b/checkbox_support/parsers/tests/pactl_data/pa_ucm_pre_tag_bionic.txt |
43 | @@ -0,0 +1,619 @@ |
44 | +Module #0 |
45 | + Name: module-device-restore |
46 | + Argument: |
47 | + Usage counter: n/a |
48 | + Properties: |
49 | + module.author = "Lennart Poettering" |
50 | + module.description = "Automatically restore the volume/mute state of devices" |
51 | + module.version = "11.1" |
52 | + |
53 | +Module #1 |
54 | + Name: module-stream-restore |
55 | + Argument: |
56 | + Usage counter: n/a |
57 | + Properties: |
58 | + module.author = "Lennart Poettering" |
59 | + module.description = "Automatically restore the volume/mute/device state of streams" |
60 | + module.version = "11.1" |
61 | + |
62 | +Module #2 |
63 | + Name: module-card-restore |
64 | + Argument: |
65 | + Usage counter: n/a |
66 | + Properties: |
67 | + module.author = "Lennart Poettering" |
68 | + module.description = "Automatically restore profile of cards" |
69 | + module.version = "11.1" |
70 | + |
71 | +Module #3 |
72 | + Name: module-augment-properties |
73 | + Argument: |
74 | + Usage counter: n/a |
75 | + Properties: |
76 | + module.author = "Lennart Poettering" |
77 | + module.description = "Augment the property sets of streams with additional static information" |
78 | + module.version = "11.1" |
79 | + |
80 | +Module #4 |
81 | + Name: module-switch-on-port-available |
82 | + Argument: |
83 | + Usage counter: n/a |
84 | + Properties: |
85 | + |
86 | + |
87 | +Module #5 |
88 | + Name: module-switch-on-connect |
89 | + Argument: |
90 | + Usage counter: n/a |
91 | + Properties: |
92 | + module.author = "Michael Terry" |
93 | + module.description = "When a sink/source is added, switch to it or conditionally switch to it" |
94 | + module.version = "11.1" |
95 | + |
96 | +Module #6 |
97 | + Name: module-udev-detect |
98 | + Argument: |
99 | + Usage counter: n/a |
100 | + Properties: |
101 | + module.author = "Lennart Poettering" |
102 | + module.description = "Detect available audio hardware and load matching drivers" |
103 | + module.version = "11.1" |
104 | + |
105 | +Module #7 |
106 | + Name: module-alsa-card |
107 | + Argument: device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1" |
108 | + Usage counter: 0 |
109 | + Properties: |
110 | + module.author = "Lennart Poettering" |
111 | + module.description = "ALSA Card" |
112 | + module.version = "11.1" |
113 | + |
114 | +Module #8 |
115 | + Name: module-bluetooth-policy |
116 | + Argument: |
117 | + Usage counter: n/a |
118 | + Properties: |
119 | + module.author = "Frédéric Dalleau, Pali Rohár" |
120 | + module.description = "Policy module to make using bluetooth devices out-of-the-box easier" |
121 | + module.version = "11.1" |
122 | + |
123 | +Module #9 |
124 | + Name: module-bluetooth-discover |
125 | + Argument: |
126 | + Usage counter: n/a |
127 | + Properties: |
128 | + module.author = "João Paulo Rechi Vita" |
129 | + module.description = "Detect available Bluetooth daemon and load the corresponding discovery module" |
130 | + module.version = "11.1" |
131 | + |
132 | +Module #10 |
133 | + Name: module-bluez5-discover |
134 | + Argument: |
135 | + Usage counter: n/a |
136 | + Properties: |
137 | + module.author = "João Paulo Rechi Vita" |
138 | + module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers" |
139 | + module.version = "11.1" |
140 | + |
141 | +Module #11 |
142 | + Name: module-native-protocol-unix |
143 | + Argument: |
144 | + Usage counter: n/a |
145 | + Properties: |
146 | + module.author = "Lennart Poettering" |
147 | + module.description = "Native protocol (UNIX sockets)" |
148 | + module.version = "11.1" |
149 | + |
150 | +Module #12 |
151 | + Name: module-default-device-restore |
152 | + Argument: |
153 | + Usage counter: n/a |
154 | + Properties: |
155 | + module.author = "Lennart Poettering" |
156 | + module.description = "Automatically restore the default sink and source" |
157 | + module.version = "11.1" |
158 | + |
159 | +Module #13 |
160 | + Name: module-rescue-streams |
161 | + Argument: |
162 | + Usage counter: n/a |
163 | + Properties: |
164 | + module.author = "Lennart Poettering" |
165 | + module.description = "When a sink/source is removed, try to move its streams to the default sink/source" |
166 | + module.version = "11.1" |
167 | + |
168 | +Module #14 |
169 | + Name: module-always-sink |
170 | + Argument: |
171 | + Usage counter: n/a |
172 | + Properties: |
173 | + module.author = "Colin Guthrie" |
174 | + module.description = "Always keeps at least one sink loaded even if it's a null one" |
175 | + module.version = "11.1" |
176 | + |
177 | +Module #15 |
178 | + Name: module-intended-roles |
179 | + Argument: |
180 | + Usage counter: n/a |
181 | + Properties: |
182 | + module.author = "Lennart Poettering" |
183 | + module.description = "Automatically set device of streams based on intended roles of devices" |
184 | + module.version = "11.1" |
185 | + |
186 | +Module #16 |
187 | + Name: module-suspend-on-idle |
188 | + Argument: |
189 | + Usage counter: n/a |
190 | + Properties: |
191 | + module.author = "Lennart Poettering" |
192 | + module.description = "When a sink/source is idle for too long, suspend it" |
193 | + module.version = "11.1" |
194 | + |
195 | +Module #17 |
196 | + Name: module-console-kit |
197 | + Argument: |
198 | + Usage counter: n/a |
199 | + Properties: |
200 | + module.author = "Lennart Poettering" |
201 | + module.description = "Create a client for each ConsoleKit session of this user" |
202 | + module.version = "11.1" |
203 | + |
204 | +Module #18 |
205 | + Name: module-systemd-login |
206 | + Argument: |
207 | + Usage counter: n/a |
208 | + Properties: |
209 | + module.author = "Lennart Poettering" |
210 | + module.description = "Create a client for each login session of this user" |
211 | + module.version = "11.1" |
212 | + |
213 | +Module #19 |
214 | + Name: module-position-event-sounds |
215 | + Argument: |
216 | + Usage counter: n/a |
217 | + Properties: |
218 | + module.author = "Lennart Poettering" |
219 | + module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them." |
220 | + module.version = "11.1" |
221 | + |
222 | +Module #20 |
223 | + Name: module-role-cork |
224 | + Argument: |
225 | + Usage counter: n/a |
226 | + Properties: |
227 | + module.author = "Lennart Poettering" |
228 | + module.description = "Mute & cork streams with certain roles while others exist" |
229 | + module.version = "11.1" |
230 | + |
231 | +Module #21 |
232 | + Name: module-filter-heuristics |
233 | + Argument: |
234 | + Usage counter: n/a |
235 | + Properties: |
236 | + module.author = "Colin Guthrie" |
237 | + module.description = "Detect when various filters are desirable" |
238 | + module.version = "11.1" |
239 | + |
240 | +Module #22 |
241 | + Name: module-filter-apply |
242 | + Argument: |
243 | + Usage counter: n/a |
244 | + Properties: |
245 | + module.author = "Colin Guthrie" |
246 | + module.description = "Load filter sinks automatically when needed" |
247 | + module.version = "11.1" |
248 | + |
249 | +Module #23 |
250 | + Name: module-x11-publish |
251 | + Argument: display=:0 |
252 | + Usage counter: n/a |
253 | + Properties: |
254 | + module.author = "Lennart Poettering" |
255 | + module.description = "X11 credential publisher" |
256 | + module.version = "11.1" |
257 | + |
258 | +Module #24 |
259 | + Name: module-x11-bell |
260 | + Argument: display=:0 sample=bell.ogg |
261 | + Usage counter: n/a |
262 | + Properties: |
263 | + module.author = "Lennart Poettering" |
264 | + module.description = "X11 bell interceptor" |
265 | + module.version = "11.1" |
266 | + |
267 | +Module #25 |
268 | + Name: module-x11-cork-request |
269 | + Argument: display=:0 |
270 | + Usage counter: n/a |
271 | + Properties: |
272 | + module.author = "Lennart Poettering" |
273 | + module.description = "Synthesize X11 media key events when cork/uncork is requested" |
274 | + module.version = "11.1" |
275 | + |
276 | +Module #26 |
277 | + Name: module-x11-xsmp |
278 | + Argument: display=:0 session_manager=local/test-Inspiron-5490:@/tmp/.ICE-unix/2115,unix/test-Inspiron-5490:/tmp/.ICE-unix/2115 |
279 | + Usage counter: n/a |
280 | + Properties: |
281 | + module.author = "Lennart Poettering" |
282 | + module.description = "X11 session management" |
283 | + module.version = "11.1" |
284 | + |
285 | +Sink #0 |
286 | + State: SUSPENDED |
287 | + Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_0__sink |
288 | + Description: sof-skl_hda_card Speaker + Headphone |
289 | + Driver: module-alsa-card.c |
290 | + Sample Specification: s16le 2ch 48000Hz |
291 | + Channel Map: front-left,front-right |
292 | + Owner Module: 7 |
293 | + Mute: no |
294 | + Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB |
295 | + balance 0.00 |
296 | + Base Volume: 65536 / 100% / 0.00 dB |
297 | + Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_0__sink.monitor |
298 | + Latency: 0 usec, configured 0 usec |
299 | + Flags: HARDWARE DECIBEL_VOLUME LATENCY |
300 | + Properties: |
301 | + alsa.resolution_bits = "16" |
302 | + device.api = "alsa" |
303 | + device.class = "sound" |
304 | + alsa.class = "generic" |
305 | + alsa.subclass = "generic-mix" |
306 | + alsa.name = "" |
307 | + alsa.id = "HDA Analog (*)" |
308 | + alsa.subdevice = "0" |
309 | + alsa.subdevice_name = "subdevice #0" |
310 | + alsa.device = "0" |
311 | + alsa.card = "0" |
312 | + alsa.card_name = "sof-skl_hda_card" |
313 | + alsa.long_card_name = "DellInc.-Inspiron5490--" |
314 | + alsa.driver_name = "snd_soc_skl_hda_dsp" |
315 | + device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" |
316 | + sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" |
317 | + device.bus = "pci" |
318 | + device.vendor.id = "8086" |
319 | + device.vendor.name = "Intel Corporation" |
320 | + device.product.id = "9dc8" |
321 | + device.string = "hw:sofsklhdacard,0" |
322 | + device.buffering.buffer_size = "65472" |
323 | + device.buffering.fragment_size = "16320" |
324 | + device.access_mode = "mmap+timer" |
325 | + device.profile.name = "HiFi: hw:sofsklhdacard,0: sink" |
326 | + device.profile.description = "Speaker + Headphone" |
327 | + device.description = "sof-skl_hda_card Speaker + Headphone" |
328 | + module-udev-detect.discovered = "1" |
329 | + device.icon_name = "audio-card-pci" |
330 | + Ports: |
331 | + [Out] Speaker: Speaker (priority: 100, not available) |
332 | + [Out] Headphone: Headphone (priority: 100, available) |
333 | + Active Port: [Out] Headphone |
334 | + Formats: |
335 | + pcm |
336 | + |
337 | +Source #0 |
338 | + State: SUSPENDED |
339 | + Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_0__sink.monitor |
340 | + Description: Monitor of sof-skl_hda_card Speaker + Headphone |
341 | + Driver: module-alsa-card.c |
342 | + Sample Specification: s16le 2ch 48000Hz |
343 | + Channel Map: front-left,front-right |
344 | + Owner Module: 7 |
345 | + Mute: no |
346 | + Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB |
347 | + balance 0.00 |
348 | + Base Volume: 65536 / 100% / 0.00 dB |
349 | + Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_0__sink |
350 | + Latency: 0 usec, configured 0 usec |
351 | + Flags: DECIBEL_VOLUME LATENCY |
352 | + Properties: |
353 | + device.description = "Monitor of sof-skl_hda_card Speaker + Headphone" |
354 | + device.class = "monitor" |
355 | + alsa.card = "0" |
356 | + alsa.card_name = "sof-skl_hda_card" |
357 | + alsa.long_card_name = "DellInc.-Inspiron5490--" |
358 | + alsa.driver_name = "snd_soc_skl_hda_dsp" |
359 | + device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" |
360 | + sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" |
361 | + device.bus = "pci" |
362 | + device.vendor.id = "8086" |
363 | + device.vendor.name = "Intel Corporation" |
364 | + device.product.id = "9dc8" |
365 | + device.string = "0" |
366 | + module-udev-detect.discovered = "1" |
367 | + device.icon_name = "audio-card-pci" |
368 | + Formats: |
369 | + pcm |
370 | + |
371 | +Source #1 |
372 | + State: SUSPENDED |
373 | + Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_6__source |
374 | + Description: sof-skl_hda_card Digital Micrphone |
375 | + Driver: module-alsa-card.c |
376 | + Sample Specification: s16le 2ch 48000Hz |
377 | + Channel Map: front-left,front-right |
378 | + Owner Module: 7 |
379 | + Mute: no |
380 | + Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB |
381 | + balance 0.00 |
382 | + Base Volume: 65536 / 100% / 0.00 dB |
383 | + Monitor of Sink: n/a |
384 | + Latency: 0 usec, configured 0 usec |
385 | + Flags: HARDWARE DECIBEL_VOLUME LATENCY |
386 | + Properties: |
387 | + alsa.resolution_bits = "16" |
388 | + device.api = "alsa" |
389 | + device.class = "sound" |
390 | + alsa.class = "generic" |
391 | + alsa.subclass = "generic-mix" |
392 | + alsa.name = "" |
393 | + alsa.id = "DMIC32 (*)" |
394 | + alsa.subdevice = "0" |
395 | + alsa.subdevice_name = "subdevice #0" |
396 | + alsa.device = "6" |
397 | + alsa.card = "0" |
398 | + alsa.card_name = "sof-skl_hda_card" |
399 | + alsa.long_card_name = "DellInc.-Inspiron5490--" |
400 | + alsa.driver_name = "snd_soc_skl_hda_dsp" |
401 | + device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" |
402 | + sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" |
403 | + device.bus = "pci" |
404 | + device.vendor.id = "8086" |
405 | + device.vendor.name = "Intel Corporation" |
406 | + device.product.id = "9dc8" |
407 | + device.string = "hw:sofsklhdacard,6" |
408 | + device.buffering.buffer_size = "65472" |
409 | + device.buffering.fragment_size = "16320" |
410 | + device.access_mode = "mmap+timer" |
411 | + device.profile.name = "HiFi: hw:sofsklhdacard,6: source" |
412 | + device.profile.description = "Digital Micrphone" |
413 | + device.description = "sof-skl_hda_card Digital Micrphone" |
414 | + module-udev-detect.discovered = "1" |
415 | + device.icon_name = "audio-card-pci" |
416 | + Ports: |
417 | + [In] Dmic: Digital Micrphone (priority: 100) |
418 | + Active Port: [In] Dmic |
419 | + Formats: |
420 | + pcm |
421 | + |
422 | +Source #2 |
423 | + State: SUSPENDED |
424 | + Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofsklhdacard_0__source |
425 | + Description: sof-skl_hda_card Headset Mic |
426 | + Driver: module-alsa-card.c |
427 | + Sample Specification: s16le 2ch 48000Hz |
428 | + Channel Map: front-left,front-right |
429 | + Owner Module: 7 |
430 | + Mute: no |
431 | + Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB |
432 | + balance 0.00 |
433 | + Base Volume: 65536 / 100% / 0.00 dB |
434 | + Monitor of Sink: n/a |
435 | + Latency: 0 usec, configured 0 usec |
436 | + Flags: HARDWARE DECIBEL_VOLUME LATENCY |
437 | + Properties: |
438 | + alsa.resolution_bits = "16" |
439 | + device.api = "alsa" |
440 | + device.class = "sound" |
441 | + alsa.class = "generic" |
442 | + alsa.subclass = "generic-mix" |
443 | + alsa.name = "" |
444 | + alsa.id = "HDA Analog (*)" |
445 | + alsa.subdevice = "0" |
446 | + alsa.subdevice_name = "subdevice #0" |
447 | + alsa.device = "0" |
448 | + alsa.card = "0" |
449 | + alsa.card_name = "sof-skl_hda_card" |
450 | + alsa.long_card_name = "DellInc.-Inspiron5490--" |
451 | + alsa.driver_name = "snd_soc_skl_hda_dsp" |
452 | + device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" |
453 | + sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" |
454 | + device.bus = "pci" |
455 | + device.vendor.id = "8086" |
456 | + device.vendor.name = "Intel Corporation" |
457 | + device.product.id = "9dc8" |
458 | + device.string = "hw:sofsklhdacard,0" |
459 | + device.buffering.buffer_size = "65472" |
460 | + device.buffering.fragment_size = "16320" |
461 | + device.access_mode = "mmap+timer" |
462 | + device.profile.name = "HiFi: hw:sofsklhdacard,0: source" |
463 | + device.profile.description = "Headset Mic" |
464 | + device.description = "sof-skl_hda_card Headset Mic" |
465 | + module-udev-detect.discovered = "1" |
466 | + device.icon_name = "audio-card-pci" |
467 | + Ports: |
468 | + [In] Microphone: Headset Mic (priority: 100, available) |
469 | + Active Port: [In] Microphone |
470 | + Formats: |
471 | + pcm |
472 | + |
473 | +Client #0 |
474 | + Driver: module-systemd-login.c |
475 | + Owner Module: 18 |
476 | + Properties: |
477 | + application.name = "Login Session 1" |
478 | + systemd-login.session = "1" |
479 | + |
480 | +Client #1 |
481 | + Driver: protocol-native.c |
482 | + Owner Module: 11 |
483 | + Properties: |
484 | + application.name = "GNOME Shell" |
485 | + native-protocol.peer = "UNIX socket client" |
486 | + native-protocol.version = "32" |
487 | + application.id = "org.gnome.Shell" |
488 | + application.icon_name = "start-here" |
489 | + application.language = "en_US.UTF-8" |
490 | + window.x11.screen = "0" |
491 | + window.x11.display = ":0" |
492 | + application.process.id = "2238" |
493 | + application.process.user = "test" |
494 | + application.process.host = "test-Inspiron-5490" |
495 | + application.process.binary = "gnome-shell" |
496 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
497 | + application.process.session_id = "1" |
498 | + |
499 | +Client #2 |
500 | + Driver: protocol-native.c |
501 | + Owner Module: 11 |
502 | + Properties: |
503 | + application.name = "GNOME Shell Volume Control" |
504 | + native-protocol.peer = "UNIX socket client" |
505 | + native-protocol.version = "32" |
506 | + application.id = "org.gnome.VolumeControl" |
507 | + application.icon_name = "multimedia-volume-control" |
508 | + application.version = "3.28.1" |
509 | + application.process.id = "2238" |
510 | + application.process.user = "test" |
511 | + application.process.host = "test-Inspiron-5490" |
512 | + application.process.binary = "gnome-shell" |
513 | + application.language = "en_US.UTF-8" |
514 | + window.x11.display = ":0" |
515 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
516 | + application.process.session_id = "1" |
517 | + |
518 | +Client #8 |
519 | + Driver: module-x11-xsmp.c |
520 | + Owner Module: 26 |
521 | + Properties: |
522 | + application.name = "XSMP Session on gnome-session as 10a9331489bfab849a155721588398538200000021150058" |
523 | + xsmp.vendor = "gnome-session" |
524 | + xsmp.client.id = "10a9331489bfab849a155721588398538200000021150058" |
525 | + |
526 | +Client #9 |
527 | + Driver: protocol-native.c |
528 | + Owner Module: 11 |
529 | + Properties: |
530 | + application.name = "GNOME Volume Control Media Keys" |
531 | + native-protocol.peer = "UNIX socket client" |
532 | + native-protocol.version = "32" |
533 | + application.id = "org.gnome.VolumeControl" |
534 | + application.icon_name = "multimedia-volume-control" |
535 | + application.version = "" |
536 | + application.process.id = "2461" |
537 | + application.process.user = "test" |
538 | + application.process.host = "test-Inspiron-5490" |
539 | + application.process.binary = "gsd-media-keys" |
540 | + application.language = "en_US.UTF-8" |
541 | + window.x11.display = ":0" |
542 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
543 | + application.process.session_id = "1" |
544 | + |
545 | +Client #18 |
546 | + Driver: module-systemd-login.c |
547 | + Owner Module: 18 |
548 | + Properties: |
549 | + application.name = "Login Session 4" |
550 | + systemd-login.session = "4" |
551 | + |
552 | +Client #19 |
553 | + Driver: module-systemd-login.c |
554 | + Owner Module: 18 |
555 | + Properties: |
556 | + application.name = "Login Session 5" |
557 | + systemd-login.session = "5" |
558 | + |
559 | +Client #25 |
560 | + Driver: protocol-native.c |
561 | + Owner Module: 11 |
562 | + Properties: |
563 | + application.name = "pactl" |
564 | + native-protocol.peer = "UNIX socket client" |
565 | + native-protocol.version = "32" |
566 | + application.process.id = "19283" |
567 | + application.process.user = "test" |
568 | + application.process.host = "test-Inspiron-5490" |
569 | + application.process.binary = "pactl" |
570 | + application.language = "en_US.UTF-8" |
571 | + window.x11.display = "localhost:10.0" |
572 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
573 | + application.process.session_id = "4" |
574 | + |
575 | +Sample #0 |
576 | + Name: bell.ogg |
577 | + Sample Specification: float32le 1ch 44100Hz |
578 | + Channel Map: mono |
579 | + Volume: (invalid) |
580 | + balance 0.00 |
581 | + Duration: 0.2s |
582 | + Size: 34.5 KiB |
583 | + Lazy: no |
584 | + Filename: n/a |
585 | + Properties: |
586 | + media.role = "event" |
587 | + media.name = "bell.ogg" |
588 | + application.name = "pactl" |
589 | + native-protocol.peer = "UNIX socket client" |
590 | + native-protocol.version = "32" |
591 | + application.process.id = "2451" |
592 | + application.process.user = "test" |
593 | + application.process.host = "test-Inspiron-5490" |
594 | + application.process.binary = "pactl" |
595 | + application.language = "en_US.UTF-8" |
596 | + window.x11.display = ":0" |
597 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
598 | + application.process.session_id = "1" |
599 | + |
600 | +Sample #1 |
601 | + Name: bell-window-system |
602 | + Sample Specification: s16le 1ch 44100Hz |
603 | + Channel Map: mono |
604 | + Volume: (invalid) |
605 | + balance 0.00 |
606 | + Duration: 0.2s |
607 | + Size: 17.2 KiB |
608 | + Lazy: no |
609 | + Filename: n/a |
610 | + Properties: |
611 | + media.role = "event" |
612 | + application.process.id = "3077" |
613 | + application.name = "gnome-terminal-server" |
614 | + event.description = "Bell event" |
615 | + event.id = "bell-window-system" |
616 | + media.name = "bell-window-system" |
617 | + media.filename = "/usr/share/sounds/ubuntu/stereo/bell.ogg" |
618 | + native-protocol.peer = "UNIX socket client" |
619 | + native-protocol.version = "32" |
620 | + application.id = "org.gnome.Shell" |
621 | + application.icon_name = "start-here" |
622 | + application.language = "en_US.UTF-8" |
623 | + window.x11.screen = "0" |
624 | + window.x11.display = ":0" |
625 | + application.process.user = "test" |
626 | + application.process.host = "test-Inspiron-5490" |
627 | + application.process.binary = "gnome-shell" |
628 | + application.process.machine_id = "61cc4f75157f4bb2bc4a9238c8f86c61" |
629 | + application.process.session_id = "1" |
630 | + |
631 | +Card #0 |
632 | + Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic |
633 | + Driver: module-alsa-card.c |
634 | + Owner Module: 7 |
635 | + Properties: |
636 | + alsa.card = "0" |
637 | + alsa.card_name = "sof-skl_hda_card" |
638 | + alsa.long_card_name = "DellInc.-Inspiron5490--" |
639 | + alsa.driver_name = "snd_soc_skl_hda_dsp" |
640 | + device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" |
641 | + sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" |
642 | + device.bus = "pci" |
643 | + device.vendor.id = "8086" |
644 | + device.vendor.name = "Intel Corporation" |
645 | + device.product.id = "9dc8" |
646 | + device.string = "0" |
647 | + device.description = "sof-skl_hda_card" |
648 | + module-udev-detect.discovered = "1" |
649 | + device.icon_name = "audio-card-pci" |
650 | + Profiles: |
651 | + HiFi: Play HiFi quality Music (sinks: 1, sources: 2, priority: 8000, available: yes) |
652 | + off: Off (sinks: 0, sources: 0, priority: 0, available: yes) |
653 | + Active Profile: HiFi |
654 | + Ports: |
655 | + [Out] Speaker: Speaker (priority: 100, latency offset: 0 usec, not available) |
656 | + Part of profile(s): HiFi |
657 | + [Out] Headphone: Headphone (priority: 100, latency offset: 0 usec, available) |
658 | + Part of profile(s): HiFi |
659 | + [In] Dmic: Digital Micrphone (priority: 100, latency offset: 0 usec) |
660 | + Part of profile(s): HiFi |
661 | + [In] Microphone: Headset Mic (priority: 100, latency offset: 0 usec, available) |
662 | + Part of profile(s): HiFi |
663 | diff --git a/checkbox_support/parsers/tests/test_pactl.py b/checkbox_support/parsers/tests/test_pactl.py |
664 | index a3d96dd..6f56d91 100644 |
665 | --- a/checkbox_support/parsers/tests/test_pactl.py |
666 | +++ b/checkbox_support/parsers/tests/test_pactl.py |
667 | @@ -631,6 +631,16 @@ class DocumentTests(ParsingTestCase, PactlDataMixIn): |
668 | )[0] |
669 | self.assertEqual(len(document.record_list), 55) |
670 | |
671 | + def test_pactl_list_ports_with_pretag(self): |
672 | + document = self.assertParses( |
673 | + pactl.Document.Syntax, self.get_text("pa_ucm_pre_tag_bionic") |
674 | + )[0] |
675 | + self.assertEqual(len(document.record_list), 42) |
676 | + self.assertEqual(document.record_list[27].name, "Sink #0") |
677 | + self.assertEqual( |
678 | + document.record_list[27].attribute_list[14].value[0].name, |
679 | + "Speaker") |
680 | + |
681 | def test_pactl_list(self): |
682 | document = self.assertParses( |
683 | pactl.Document.Syntax, self.get_text("desktop-precise") |
Tested using:
$ LANG=C cat pactl_list.txt | python3 -m plainbox dev parse pactl-list