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

Subscribers

People subscribed via source and target branches