Merge ~kissiel/checkbox-support:fix-1871322-crash-on-negative-balance into checkbox-support:master

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: 0be9b64cd5a943f5cc269cd4228925b4bc8a9d3a
Merged at revision: f173d25d5d736cb64626489353a664e78e915c2d
Proposed branch: ~kissiel/checkbox-support:fix-1871322-crash-on-negative-balance
Merge into: checkbox-support:master
Diff against target: 919 lines (+890/-1)
3 files modified
checkbox_support/parsers/pactl.py (+1/-1)
checkbox_support/parsers/tests/pactl_data/desktop-focal-vostro5590.txt (+884/-0)
checkbox_support/parsers/tests/test_pactl.py (+5/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+381922@code.launchpad.net

Description of the change

fix crash of pactl parser when balance is negative

See here for details:
https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1871322

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_support/parsers/pactl.py b/checkbox_support/parsers/pactl.py
index 6c10b64..8bc67c2 100644
--- a/checkbox_support/parsers/pactl.py
+++ b/checkbox_support/parsers/pactl.py
@@ -398,7 +398,7 @@ VolumeAttributeValue = (
398 ])398 ])
399 + p.LineEnd()399 + p.LineEnd()
400 + p.Optional(p.White('\t').suppress())400 + p.Optional(p.White('\t').suppress())
401 + p.Regex("balance [0-9]+\.[0-9]+")401 + p.Regex("balance -?[0-9]+\.[0-9]+")
402 + p.LineEnd(),402 + p.LineEnd(),
403 adjacent=False403 adjacent=False
404 ).setResultsName("attribute-value")404 ).setResultsName("attribute-value")
diff --git a/checkbox_support/parsers/tests/pactl_data/desktop-focal-vostro5590.txt b/checkbox_support/parsers/tests/pactl_data/desktop-focal-vostro5590.txt
405new file mode 100644405new file mode 100644
index 0000000..039c7b3
--- /dev/null
+++ b/checkbox_support/parsers/tests/pactl_data/desktop-focal-vostro5590.txt
@@ -0,0 +1,884 @@
1Module #0
2 Name: module-device-restore
3 Argument:
4 Usage counter: n/a
5 Properties:
6 module.author = "Lennart Poettering"
7 module.description = "Automatically restore the volume/mute state of devices"
8 module.version = "13.99.1"
9
10Module #1
11 Name: module-stream-restore
12 Argument:
13 Usage counter: n/a
14 Properties:
15 module.author = "Lennart Poettering"
16 module.description = "Automatically restore the volume/mute/device state of streams"
17 module.version = "13.99.1"
18
19Module #2
20 Name: module-card-restore
21 Argument:
22 Usage counter: n/a
23 Properties:
24 module.author = "Lennart Poettering"
25 module.description = "Automatically restore profile of cards"
26 module.version = "13.99.1"
27
28Module #3
29 Name: module-augment-properties
30 Argument:
31 Usage counter: n/a
32 Properties:
33 module.author = "Lennart Poettering"
34 module.description = "Augment the property sets of streams with additional static information"
35 module.version = "13.99.1"
36
37Module #4
38 Name: module-switch-on-port-available
39 Argument:
40 Usage counter: n/a
41 Properties:
42 module.author = "David Henningsson"
43 module.description = "Switches ports and profiles when devices are plugged/unplugged"
44 module.version = "13.99.1"
45
46Module #5
47 Name: module-switch-on-connect
48 Argument:
49 Usage counter: n/a
50 Properties:
51 module.author = "Michael Terry"
52 module.description = "When a sink/source is added, switch to it or conditionally switch to it"
53 module.version = "13.99.1"
54
55Module #6
56 Name: module-udev-detect
57 Argument:
58 Usage counter: n/a
59 Properties:
60 module.author = "Lennart Poettering"
61 module.description = "Detect available audio hardware and load matching drivers"
62 module.version = "13.99.1"
63
64Module #7
65 Name: module-bluetooth-policy
66 Argument:
67 Usage counter: n/a
68 Properties:
69 module.author = "Frédéric Dalleau, Pali Rohár"
70 module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
71 module.version = "13.99.1"
72
73Module #8
74 Name: module-bluetooth-discover
75 Argument:
76 Usage counter: n/a
77 Properties:
78 module.author = "João Paulo Rechi Vita"
79 module.description = "Detect available Bluetooth daemon and load the corresponding discovery module"
80 module.version = "13.99.1"
81
82Module #9
83 Name: module-bluez5-discover
84 Argument:
85 Usage counter: n/a
86 Properties:
87 module.author = "João Paulo Rechi Vita"
88 module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers"
89 module.version = "13.99.1"
90
91Module #10
92 Name: module-native-protocol-unix
93 Argument:
94 Usage counter: n/a
95 Properties:
96 module.author = "Lennart Poettering"
97 module.description = "Native protocol (UNIX sockets)"
98 module.version = "13.99.1"
99
100Module #11
101 Name: module-default-device-restore
102 Argument:
103 Usage counter: n/a
104 Properties:
105 module.author = "Lennart Poettering"
106 module.description = "Automatically restore the default sink and source"
107 module.version = "13.99.1"
108
109Module #12
110 Name: module-always-sink
111 Argument:
112 Usage counter: n/a
113 Properties:
114 module.author = "Colin Guthrie"
115 module.description = "Always keeps at least one sink loaded even if it's a null one"
116 module.version = "13.99.1"
117
118Module #14
119 Name: module-intended-roles
120 Argument:
121 Usage counter: n/a
122 Properties:
123 module.author = "Lennart Poettering"
124 module.description = "Automatically set device of streams based on intended roles of devices"
125 module.version = "13.99.1"
126
127Module #15
128 Name: module-suspend-on-idle
129 Argument:
130 Usage counter: n/a
131 Properties:
132 module.author = "Lennart Poettering"
133 module.description = "When a sink/source is idle for too long, suspend it"
134 module.version = "13.99.1"
135
136Module #16
137 Name: module-console-kit
138 Argument:
139 Usage counter: n/a
140 Properties:
141 module.author = "Lennart Poettering"
142 module.description = "Create a client for each ConsoleKit session of this user"
143 module.version = "13.99.1"
144
145Module #17
146 Name: module-systemd-login
147 Argument:
148 Usage counter: n/a
149 Properties:
150 module.author = "Lennart Poettering"
151 module.description = "Create a client for each login session of this user"
152 module.version = "13.99.1"
153
154Module #18
155 Name: module-position-event-sounds
156 Argument:
157 Usage counter: n/a
158 Properties:
159 module.author = "Lennart Poettering"
160 module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
161 module.version = "13.99.1"
162
163Module #19
164 Name: module-role-cork
165 Argument:
166 Usage counter: n/a
167 Properties:
168 module.author = "Lennart Poettering"
169 module.description = "Mute & cork streams with certain roles while others exist"
170 module.version = "13.99.1"
171
172Module #20
173 Name: module-snap-policy
174 Argument:
175 Usage counter: n/a
176 Properties:
177 module.author = "Canonical Ltd"
178 module.description = "Ubuntu Snap policy management"
179 module.version = "13.99.1"
180
181Module #21
182 Name: module-filter-heuristics
183 Argument:
184 Usage counter: n/a
185 Properties:
186 module.author = "Colin Guthrie"
187 module.description = "Detect when various filters are desirable"
188 module.version = "13.99.1"
189
190Module #22
191 Name: module-filter-apply
192 Argument:
193 Usage counter: n/a
194 Properties:
195 module.author = "Colin Guthrie"
196 module.description = "Load filter sinks automatically when needed"
197 module.version = "13.99.1"
198
199Module #23
200 Name: module-alsa-card
201 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 avoid_resampling=no card_properties="module-udev-detect.discovered=1"
202 Usage counter: 0
203 Properties:
204 module.author = "Lennart Poettering"
205 module.description = "ALSA Card"
206 module.version = "13.99.1"
207
208Module #24
209 Name: module-x11-publish
210 Argument: display=:1 xauthority=/run/user/1000/gdm/Xauthority
211 Usage counter: n/a
212 Properties:
213 module.author = "Lennart Poettering"
214 module.description = "X11 credential publisher"
215 module.version = "13.99.1"
216
217Module #25
218 Name: module-x11-cork-request
219 Argument: display=:1 xauthority=/run/user/1000/gdm/Xauthority
220 Usage counter: n/a
221 Properties:
222 module.author = "Lennart Poettering"
223 module.description = "Synthesize X11 media key events when cork/uncork is requested"
224 module.version = "13.99.1"
225
226Module #26
227 Name: module-x11-xsmp
228 Argument: display=:1 xauthority=/run/user/1000/gdm/Xauthority session_manager=local/cbrown:@/tmp/.ICE-unix/2080,unix/cbrown:/tmp/.ICE-unix/2080
229 Usage counter: n/a
230 Properties:
231 module.author = "Lennart Poettering"
232 module.description = "X11 session management"
233 module.version = "13.99.1"
234
235Sink #1
236 State: SUSPENDED
237 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink
238 Description: sof-hda-dsp HDMI3/DP3 Output
239 Driver: module-alsa-card.c
240 Sample Specification: s16le 2ch 48000Hz
241 Channel Map: front-left,front-right
242 Owner Module: 23
243 Mute: no
244 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
245 balance 0.00
246 Base Volume: 65536 / 100% / 0.00 dB
247 Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink.monitor
248 Latency: 0 usec, configured 0 usec
249 Flags: HARDWARE DECIBEL_VOLUME LATENCY
250 Properties:
251 alsa.resolution_bits = "16"
252 device.api = "alsa"
253 device.class = "sound"
254 alsa.class = "generic"
255 alsa.subclass = "generic-mix"
256 alsa.name = ""
257 alsa.id = "HDMI3 (*)"
258 alsa.subdevice = "0"
259 alsa.subdevice_name = "subdevice #0"
260 alsa.device = "5"
261 alsa.card = "0"
262 alsa.card_name = "sof-hda-dsp"
263 alsa.long_card_name = "DellInc.-Vostro5590--"
264 alsa.driver_name = "snd_soc_skl_hda_dsp"
265 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
266 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
267 device.bus = "pci"
268 device.vendor.id = "8086"
269 device.vendor.name = "Intel Corporation"
270 device.product.id = "02c8"
271 device.string = "hw:sofhdadsp,5"
272 device.buffering.buffer_size = "65472"
273 device.buffering.fragment_size = "16320"
274 device.access_mode = "mmap+timer"
275 device.profile.name = "HiFi: hw:sofhdadsp,5: sink"
276 device.profile.description = "HDMI3/DP3 Output"
277 alsa.mixer_device = "hw:sofhdadsp"
278 device.description = "sof-hda-dsp HDMI3/DP3 Output"
279 module-udev-detect.discovered = "1"
280 device.icon_name = "audio-card-pci"
281 Ports:
282 [Out] HDMI3: HDMI3/DP3 Output (priority: 700, not available)
283 Active Port: [Out] HDMI3
284 Formats:
285 pcm
286
287Sink #2
288 State: SUSPENDED
289 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink
290 Description: sof-hda-dsp HDMI2/DP2 Output
291 Driver: module-alsa-card.c
292 Sample Specification: s16le 2ch 48000Hz
293 Channel Map: front-left,front-right
294 Owner Module: 23
295 Mute: no
296 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
297 balance 0.00
298 Base Volume: 65536 / 100% / 0.00 dB
299 Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink.monitor
300 Latency: 0 usec, configured 0 usec
301 Flags: HARDWARE DECIBEL_VOLUME LATENCY
302 Properties:
303 alsa.resolution_bits = "16"
304 device.api = "alsa"
305 device.class = "sound"
306 alsa.class = "generic"
307 alsa.subclass = "generic-mix"
308 alsa.name = ""
309 alsa.id = "HDMI2 (*)"
310 alsa.subdevice = "0"
311 alsa.subdevice_name = "subdevice #0"
312 alsa.device = "4"
313 alsa.card = "0"
314 alsa.card_name = "sof-hda-dsp"
315 alsa.long_card_name = "DellInc.-Vostro5590--"
316 alsa.driver_name = "snd_soc_skl_hda_dsp"
317 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
318 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
319 device.bus = "pci"
320 device.vendor.id = "8086"
321 device.vendor.name = "Intel Corporation"
322 device.product.id = "02c8"
323 device.string = "hw:sofhdadsp,4"
324 device.buffering.buffer_size = "65472"
325 device.buffering.fragment_size = "16320"
326 device.access_mode = "mmap+timer"
327 device.profile.name = "HiFi: hw:sofhdadsp,4: sink"
328 device.profile.description = "HDMI2/DP2 Output"
329 alsa.mixer_device = "hw:sofhdadsp"
330 device.description = "sof-hda-dsp HDMI2/DP2 Output"
331 module-udev-detect.discovered = "1"
332 device.icon_name = "audio-card-pci"
333 Ports:
334 [Out] HDMI2: HDMI2/DP2 Output (priority: 600, not available)
335 Active Port: [Out] HDMI2
336 Formats:
337 pcm
338
339Sink #3
340 State: SUSPENDED
341 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink
342 Description: sof-hda-dsp HDMI1/DP1 Output
343 Driver: module-alsa-card.c
344 Sample Specification: s16le 2ch 48000Hz
345 Channel Map: front-left,front-right
346 Owner Module: 23
347 Mute: no
348 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
349 balance 0.00
350 Base Volume: 65536 / 100% / 0.00 dB
351 Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink.monitor
352 Latency: 0 usec, configured 0 usec
353 Flags: HARDWARE DECIBEL_VOLUME LATENCY
354 Properties:
355 alsa.resolution_bits = "16"
356 device.api = "alsa"
357 device.class = "sound"
358 alsa.class = "generic"
359 alsa.subclass = "generic-mix"
360 alsa.name = ""
361 alsa.id = "HDMI1 (*)"
362 alsa.subdevice = "0"
363 alsa.subdevice_name = "subdevice #0"
364 alsa.device = "3"
365 alsa.card = "0"
366 alsa.card_name = "sof-hda-dsp"
367 alsa.long_card_name = "DellInc.-Vostro5590--"
368 alsa.driver_name = "snd_soc_skl_hda_dsp"
369 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
370 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
371 device.bus = "pci"
372 device.vendor.id = "8086"
373 device.vendor.name = "Intel Corporation"
374 device.product.id = "02c8"
375 device.string = "hw:sofhdadsp,3"
376 device.buffering.buffer_size = "65472"
377 device.buffering.fragment_size = "16320"
378 device.access_mode = "mmap+timer"
379 device.profile.name = "HiFi: hw:sofhdadsp,3: sink"
380 device.profile.description = "HDMI1/DP1 Output"
381 alsa.mixer_device = "hw:sofhdadsp"
382 device.description = "sof-hda-dsp HDMI1/DP1 Output"
383 module-udev-detect.discovered = "1"
384 device.icon_name = "audio-card-pci"
385 Ports:
386 [Out] HDMI1: HDMI1/DP1 Output (priority: 500, not available)
387 Active Port: [Out] HDMI1
388 Formats:
389 pcm
390
391Sink #4
392 State: SUSPENDED
393 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink
394 Description: sof-hda-dsp Speaker + Headphones
395 Driver: module-alsa-card.c
396 Sample Specification: s16le 2ch 48000Hz
397 Channel Map: front-left,front-right
398 Owner Module: 23
399 Mute: no
400 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 40177 / 61% / -12.75 dB
401 balance -0.39
402 Base Volume: 65536 / 100% / 0.00 dB
403 Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor
404 Latency: 0 usec, configured 0 usec
405 Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
406 Properties:
407 alsa.resolution_bits = "16"
408 device.api = "alsa"
409 device.class = "sound"
410 alsa.class = "generic"
411 alsa.subclass = "generic-mix"
412 alsa.name = ""
413 alsa.id = "HDA Analog (*)"
414 alsa.subdevice = "0"
415 alsa.subdevice_name = "subdevice #0"
416 alsa.device = "0"
417 alsa.card = "0"
418 alsa.card_name = "sof-hda-dsp"
419 alsa.long_card_name = "DellInc.-Vostro5590--"
420 alsa.driver_name = "snd_soc_skl_hda_dsp"
421 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
422 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
423 device.bus = "pci"
424 device.vendor.id = "8086"
425 device.vendor.name = "Intel Corporation"
426 device.product.id = "02c8"
427 device.string = "hw:sofhdadsp"
428 device.buffering.buffer_size = "65472"
429 device.buffering.fragment_size = "16320"
430 device.access_mode = "mmap+timer"
431 device.profile.name = "HiFi: hw:sofhdadsp: sink"
432 device.profile.description = "Speaker + Headphones"
433 alsa.mixer_device = "hw:sofhdadsp"
434 device.description = "sof-hda-dsp Speaker + Headphones"
435 module-udev-detect.discovered = "1"
436 device.icon_name = "audio-card-pci"
437 Ports:
438 [Out] Speaker: Speaker (priority: 100)
439 [Out] Headphones1: Headphones (priority: 200, not available)
440 Active Port: [Out] Speaker
441 Formats:
442 pcm
443
444Source #1
445 State: SUSPENDED
446 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink.monitor
447 Description: Monitor of sof-hda-dsp HDMI3/DP3 Output
448 Driver: module-alsa-card.c
449 Sample Specification: s16le 2ch 48000Hz
450 Channel Map: front-left,front-right
451 Owner Module: 23
452 Mute: no
453 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
454 balance 0.00
455 Base Volume: 65536 / 100% / 0.00 dB
456 Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink
457 Latency: 0 usec, configured 0 usec
458 Flags: DECIBEL_VOLUME LATENCY
459 Properties:
460 device.description = "Monitor of sof-hda-dsp HDMI3/DP3 Output"
461 device.class = "monitor"
462 alsa.card = "0"
463 alsa.card_name = "sof-hda-dsp"
464 alsa.long_card_name = "DellInc.-Vostro5590--"
465 alsa.driver_name = "snd_soc_skl_hda_dsp"
466 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
467 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
468 device.bus = "pci"
469 device.vendor.id = "8086"
470 device.vendor.name = "Intel Corporation"
471 device.product.id = "02c8"
472 device.string = "0"
473 module-udev-detect.discovered = "1"
474 device.icon_name = "audio-card-pci"
475 Formats:
476 pcm
477
478Source #2
479 State: SUSPENDED
480 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink.monitor
481 Description: Monitor of sof-hda-dsp HDMI2/DP2 Output
482 Driver: module-alsa-card.c
483 Sample Specification: s16le 2ch 48000Hz
484 Channel Map: front-left,front-right
485 Owner Module: 23
486 Mute: no
487 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
488 balance 0.00
489 Base Volume: 65536 / 100% / 0.00 dB
490 Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink
491 Latency: 0 usec, configured 0 usec
492 Flags: DECIBEL_VOLUME LATENCY
493 Properties:
494 device.description = "Monitor of sof-hda-dsp HDMI2/DP2 Output"
495 device.class = "monitor"
496 alsa.card = "0"
497 alsa.card_name = "sof-hda-dsp"
498 alsa.long_card_name = "DellInc.-Vostro5590--"
499 alsa.driver_name = "snd_soc_skl_hda_dsp"
500 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
501 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
502 device.bus = "pci"
503 device.vendor.id = "8086"
504 device.vendor.name = "Intel Corporation"
505 device.product.id = "02c8"
506 device.string = "0"
507 module-udev-detect.discovered = "1"
508 device.icon_name = "audio-card-pci"
509 Formats:
510 pcm
511
512Source #3
513 State: SUSPENDED
514 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink.monitor
515 Description: Monitor of sof-hda-dsp HDMI1/DP1 Output
516 Driver: module-alsa-card.c
517 Sample Specification: s16le 2ch 48000Hz
518 Channel Map: front-left,front-right
519 Owner Module: 23
520 Mute: no
521 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
522 balance 0.00
523 Base Volume: 65536 / 100% / 0.00 dB
524 Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink
525 Latency: 0 usec, configured 0 usec
526 Flags: DECIBEL_VOLUME LATENCY
527 Properties:
528 device.description = "Monitor of sof-hda-dsp HDMI1/DP1 Output"
529 device.class = "monitor"
530 alsa.card = "0"
531 alsa.card_name = "sof-hda-dsp"
532 alsa.long_card_name = "DellInc.-Vostro5590--"
533 alsa.driver_name = "snd_soc_skl_hda_dsp"
534 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
535 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
536 device.bus = "pci"
537 device.vendor.id = "8086"
538 device.vendor.name = "Intel Corporation"
539 device.product.id = "02c8"
540 device.string = "0"
541 module-udev-detect.discovered = "1"
542 device.icon_name = "audio-card-pci"
543 Formats:
544 pcm
545
546Source #4
547 State: SUSPENDED
548 Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor
549 Description: Monitor of sof-hda-dsp Speaker + Headphones
550 Driver: module-alsa-card.c
551 Sample Specification: s16le 2ch 48000Hz
552 Channel Map: front-left,front-right
553 Owner Module: 23
554 Mute: no
555 Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
556 balance 0.00
557 Base Volume: 65536 / 100% / 0.00 dB
558 Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink
559 Latency: 0 usec, configured 0 usec
560 Flags: DECIBEL_VOLUME LATENCY
561 Properties:
562 device.description = "Monitor of sof-hda-dsp Speaker + Headphones"
563 device.class = "monitor"
564 alsa.card = "0"
565 alsa.card_name = "sof-hda-dsp"
566 alsa.long_card_name = "DellInc.-Vostro5590--"
567 alsa.driver_name = "snd_soc_skl_hda_dsp"
568 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
569 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
570 device.bus = "pci"
571 device.vendor.id = "8086"
572 device.vendor.name = "Intel Corporation"
573 device.product.id = "02c8"
574 device.string = "0"
575 module-udev-detect.discovered = "1"
576 device.icon_name = "audio-card-pci"
577 Formats:
578 pcm
579
580Source #5
581 State: SUSPENDED
582 Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source
583 Description: sof-hda-dsp Headset Mono Microphone + Headphones Stereo Microphone
584 Driver: module-alsa-card.c
585 Sample Specification: s16le 2ch 48000Hz
586 Channel Map: front-left,front-right
587 Owner Module: 23
588 Mute: no
589 Volume: front-left: 32845 / 50% / -18.00 dB, front-right: 32845 / 50% / -18.00 dB
590 balance 0.00
591 Base Volume: 20724 / 32% / -30.00 dB
592 Monitor of Sink: n/a
593 Latency: 0 usec, configured 0 usec
594 Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
595 Properties:
596 alsa.resolution_bits = "16"
597 device.api = "alsa"
598 device.class = "sound"
599 alsa.class = "generic"
600 alsa.subclass = "generic-mix"
601 alsa.name = ""
602 alsa.id = "HDA Analog (*)"
603 alsa.subdevice = "0"
604 alsa.subdevice_name = "subdevice #0"
605 alsa.device = "0"
606 alsa.card = "0"
607 alsa.card_name = "sof-hda-dsp"
608 alsa.long_card_name = "DellInc.-Vostro5590--"
609 alsa.driver_name = "snd_soc_skl_hda_dsp"
610 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
611 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
612 device.bus = "pci"
613 device.vendor.id = "8086"
614 device.vendor.name = "Intel Corporation"
615 device.product.id = "02c8"
616 device.string = "hw:sofhdadsp"
617 device.buffering.buffer_size = "65472"
618 device.buffering.fragment_size = "16320"
619 device.access_mode = "mmap+timer"
620 device.profile.name = "HiFi: hw:sofhdadsp: source"
621 device.profile.description = "Headset Mono Microphone + Headphones Stereo Microphone"
622 alsa.mixer_device = "hw:sofhdadsp"
623 device.description = "sof-hda-dsp Headset Mono Microphone + Headphones Stereo Microphone"
624 module-udev-detect.discovered = "1"
625 device.icon_name = "audio-card-pci"
626 Ports:
627 [In] Headset: Headset Mono Microphone (priority: 300, not available)
628 [In] Headphones2: Headphones Stereo Microphone (priority: 200, not available)
629 Active Port: [In] Headphones2
630 Formats:
631 pcm
632
633Source #6
634 State: SUSPENDED
635 Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source
636 Description: sof-hda-dsp Digital Microphone
637 Driver: module-alsa-card.c
638 Sample Specification: s16le 2ch 48000Hz
639 Channel Map: front-left,front-right
640 Owner Module: 23
641 Mute: no
642 Volume: front-left: 30419 / 46% / -20.00 dB, front-right: 30419 / 46% / -20.00 dB
643 balance 0.00
644 Base Volume: 30419 / 46% / -20.00 dB
645 Monitor of Sink: n/a
646 Latency: 0 usec, configured 0 usec
647 Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
648 Properties:
649 alsa.resolution_bits = "16"
650 device.api = "alsa"
651 device.class = "sound"
652 alsa.class = "generic"
653 alsa.subclass = "generic-mix"
654 alsa.name = ""
655 alsa.id = "DMIC48kHz (*)"
656 alsa.subdevice = "0"
657 alsa.subdevice_name = "subdevice #0"
658 alsa.device = "6"
659 alsa.card = "0"
660 alsa.card_name = "sof-hda-dsp"
661 alsa.long_card_name = "DellInc.-Vostro5590--"
662 alsa.driver_name = "snd_soc_skl_hda_dsp"
663 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
664 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
665 device.bus = "pci"
666 device.vendor.id = "8086"
667 device.vendor.name = "Intel Corporation"
668 device.product.id = "02c8"
669 device.string = "hw:sofhdadsp,6"
670 device.buffering.buffer_size = "65472"
671 device.buffering.fragment_size = "16320"
672 device.access_mode = "mmap+timer"
673 device.profile.name = "HiFi: hw:sofhdadsp,6: source"
674 device.profile.description = "Digital Microphone"
675 alsa.mixer_device = "hw:sofhdadsp"
676 device.description = "sof-hda-dsp Digital Microphone"
677 module-udev-detect.discovered = "1"
678 device.icon_name = "audio-card-pci"
679 Ports:
680 [In] Mic: Digital Microphone (priority: 100)
681 Active Port: [In] Mic
682 Formats:
683 pcm
684
685Client #0
686 Driver: module-systemd-login.c
687 Owner Module: 17
688 Properties:
689 application.name = "Login Session 2"
690 systemd-login.session = "2"
691
692Client #4
693 Driver: module-x11-xsmp.c
694 Owner Module: 26
695 Properties:
696 application.name = "XSMP Session on gnome-session as 106b17f11961e02958158624570086141700000020800062"
697 xsmp.vendor = "gnome-session"
698 xsmp.client.id = "106b17f11961e02958158624570086141700000020800062"
699
700Client #5
701 Driver: protocol-native.c
702 Owner Module: 10
703 Properties:
704 application.name = "GNOME Shell Volume Control"
705 native-protocol.peer = "UNIX socket client"
706 native-protocol.version = "33"
707 application.id = "org.gnome.VolumeControl"
708 application.icon_name = "multimedia-volume-control"
709 application.version = "3.36.0"
710 application.process.id = "2115"
711 application.process.user = "pieq"
712 application.process.host = "cbrown"
713 application.process.binary = "gnome-shell"
714 application.language = "en_US.UTF-8"
715 window.x11.display = ":1"
716 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
717
718Client #6
719 Driver: protocol-native.c
720 Owner Module: 10
721 Properties:
722 application.name = "GNOME Volume Control Media Keys"
723 native-protocol.peer = "UNIX socket client"
724 native-protocol.version = "33"
725 application.id = "org.gnome.VolumeControl"
726 application.icon_name = "multimedia-volume-control"
727 application.version = ""
728 application.process.id = "2212"
729 application.process.user = "pieq"
730 application.process.host = "cbrown"
731 application.process.binary = "gsd-media-keys"
732 application.language = "en_US.UTF-8"
733 window.x11.display = ":1"
734 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
735
736Client #7
737 Driver: protocol-native.c
738 Owner Module: 10
739 Properties:
740 application.name = "Terminal"
741 native-protocol.peer = "UNIX socket client"
742 native-protocol.version = "33"
743 application.icon_name = "org.gnome.Terminal"
744 window.x11.display = ":1"
745 window.x11.screen = "0"
746 application.process.id = "2456"
747 application.process.user = "pieq"
748 application.process.host = "cbrown"
749 application.process.binary = "gnome-terminal-server"
750 application.language = "en_US.UTF-8"
751 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
752
753Client #10
754 Driver: protocol-native.c
755 Owner Module: 10
756 Properties:
757 application.name = "Mutter"
758 native-protocol.peer = "UNIX socket client"
759 native-protocol.version = "33"
760 application.process.id = "2115"
761 application.process.user = "pieq"
762 application.process.host = "cbrown"
763 application.process.binary = "gnome-shell"
764 application.language = "en_US.UTF-8"
765 window.x11.display = ":1"
766 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
767
768Client #15
769 Driver: protocol-native.c
770 Owner Module: 10
771 Properties:
772 application.name = "apport-gtk"
773 native-protocol.peer = "UNIX socket client"
774 native-protocol.version = "33"
775 application.icon_name = "apport"
776 window.x11.display = ":1"
777 window.x11.screen = "0"
778 application.process.id = "5484"
779 application.process.user = "pieq"
780 application.process.host = "cbrown"
781 application.process.binary = "python3.8"
782 application.language = "en_US.UTF-8"
783 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
784
785Client #16
786 Driver: protocol-native.c
787 Owner Module: 10
788 Properties:
789 application.name = "Firefox"
790 native-protocol.peer = "UNIX socket client"
791 native-protocol.version = "33"
792 window.x11.display = ":1"
793 window.x11.screen = "0"
794 application.process.id = "5746"
795 application.process.user = "pieq"
796 application.process.host = "cbrown"
797 application.process.binary = "firefox"
798 application.language = "en_US.UTF-8"
799 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
800 application.icon_name = "firefox"
801
802Client #18
803 Driver: protocol-native.c
804 Owner Module: 10
805 Properties:
806 application.name = "pactl"
807 native-protocol.peer = "UNIX socket client"
808 native-protocol.version = "33"
809 application.process.id = "6056"
810 application.process.user = "pieq"
811 application.process.host = "cbrown"
812 application.process.binary = "pactl"
813 application.language = "en_US.UTF-8"
814 window.x11.display = ":1"
815 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
816
817Sample #0
818 Name: bell-window-system
819 Sample Specification: s16le 2ch 44100Hz
820 Channel Map: front-left,front-right
821 Volume: (invalid)
822 balance 0.00
823 Duration: 0.3s
824 Size: 49.9 KiB
825 Lazy: no
826 Filename: n/a
827 Properties:
828 media.role = "event"
829 event.description = "Bell event"
830 event.id = "bell-window-system"
831 media.name = "bell-window-system"
832 media.filename = "/usr/share//sounds/Yaru/stereo/bell.oga"
833 application.name = "Mutter"
834 native-protocol.peer = "UNIX socket client"
835 native-protocol.version = "33"
836 application.process.id = "2115"
837 application.process.user = "pieq"
838 application.process.host = "cbrown"
839 application.process.binary = "gnome-shell"
840 application.language = "en_US.UTF-8"
841 window.x11.display = ":1"
842 application.process.machine_id = "0156ec7a5b7449d1a5e31e2f612e048e"
843
844Card #0
845 Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic
846 Driver: module-alsa-card.c
847 Owner Module: 23
848 Properties:
849 alsa.card = "0"
850 alsa.card_name = "sof-hda-dsp"
851 alsa.long_card_name = "DellInc.-Vostro5590--"
852 alsa.driver_name = "snd_soc_skl_hda_dsp"
853 device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
854 sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
855 device.bus = "pci"
856 device.vendor.id = "8086"
857 device.vendor.name = "Intel Corporation"
858 device.product.id = "02c8"
859 device.string = "0"
860 device.description = "sof-hda-dsp"
861 module-udev-detect.discovered = "1"
862 device.icon_name = "audio-card-pci"
863 Profiles:
864 HiFi: Play HiFi quality Music (sinks: 4, sources: 2, priority: 8000, available: yes)
865 off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
866 Active Profile: HiFi
867 Ports:
868 [Out] HDMI3: HDMI3/DP3 Output (priority: 700, latency offset: 0 usec, not available)
869 Part of profile(s): HiFi
870 [Out] HDMI2: HDMI2/DP2 Output (priority: 600, latency offset: 0 usec, not available)
871 Part of profile(s): HiFi
872 [Out] HDMI1: HDMI1/DP1 Output (priority: 500, latency offset: 0 usec, not available)
873 Part of profile(s): HiFi
874 [Out] Speaker: Speaker (priority: 100, latency offset: 0 usec)
875 Part of profile(s): HiFi
876 [Out] Headphones1: Headphones (priority: 200, latency offset: 0 usec, not available)
877 Part of profile(s): HiFi
878 [In] Headset: Headset Mono Microphone (priority: 300, latency offset: 0 usec, not available)
879 Part of profile(s): HiFi
880 [In] Headphones2: Headphones Stereo Microphone (priority: 200, latency offset: 0 usec, not available)
881 Part of profile(s): HiFi
882 [In] Mic: Digital Microphone (priority: 100, latency offset: 0 usec)
883 Part of profile(s): HiFi
884
diff --git a/checkbox_support/parsers/tests/test_pactl.py b/checkbox_support/parsers/tests/test_pactl.py
index 5b6c02a..31f9071 100644
--- a/checkbox_support/parsers/tests/test_pactl.py
+++ b/checkbox_support/parsers/tests/test_pactl.py
@@ -678,6 +678,11 @@ class DocumentTests(ParsingTestCase, PactlDataMixIn):
678 self.assertEqual(document.record_list[42].name, "Card #0")678 self.assertEqual(document.record_list[42].name, "Card #0")
679 self.assertEqual(len(document.record_list), 43)679 self.assertEqual(len(document.record_list), 43)
680680
681 def test_pactl_list_negative_balance_focal(self):
682 document = self.assertParses(
683 pactl.Document.Syntax, self.get_text(
684 "desktop-focal-vostro5590"))[0]
685
681 def test_pactl_list_bt_volume_trusty(self):686 def test_pactl_list_bt_volume_trusty(self):
682 document = self.assertParses(687 document = self.assertParses(
683 pactl.Document.Syntax, self.get_text("desktop-trusty-bt-headset")688 pactl.Document.Syntax, self.get_text("desktop-trusty-bt-headset")

Subscribers

People subscribed via source and target branches