Merge ~binli/checkbox-support/+git/checkbox-support:dmic-support into checkbox-support:master
- Git
- lp:~binli/checkbox-support/+git/checkbox-support
- dmic-support
- Merge into master
Status: | Merged |
---|---|
Approved by: | Sylvain Pineau |
Approved revision: | 94737b089c08c82540794cf2961da599cad145e1 |
Merged at revision: | 1c78925ab80ff725f62fa1b7ca49f6c8362bda20 |
Proposed branch: | ~binli/checkbox-support/+git/checkbox-support:dmic-support |
Merge into: | checkbox-support:master |
Diff against target: |
929 lines (+827/-5) 7 files modified
checkbox_support/parsers/pactl.py (+2/-2) checkbox_support/parsers/tests/pactl_data/cards-desktop-bionic-x13.txt (+41/-0) checkbox_support/parsers/tests/pactl_data/desktop-bionic-x13.txt (+685/-0) checkbox_support/parsers/tests/pactl_data/sinks-desktop-bionic-x13.txt (+50/-0) checkbox_support/parsers/tests/test_pactl.py (+32/-1) checkbox_support/scripts/audio_settings.py (+2/-2) checkbox_support/scripts/tests/test_audio_settings.py (+15/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain Pineau (community) | Approve | ||
Jonathan Cave | Pending | ||
Checkbox Developers | Pending | ||
Review via email: mp+383049@code.launchpad.net |
Description of the change
Bin Li (binli) wrote : | # |
@Sylvain,
Thanks for your feedback. And I try to run 'setup.py test' in the master branch, it also failed in several testcases. I just pasted part of result.
=======
FAIL: test_SPDIF_
-------
Traceback (most recent call last):
File "/work/
self.
AssertionError: ([0], {}) != 0
=======
-------
Traceback (most recent call last):
File "/work/
self.
AssertionError: ([''], {}) != ''
=======
FAIL: test_one_port (checkbox_
-------
Traceback (most recent call last):
File "/work/
self.
Bin Li (binli) wrote : | # |
Ran 178 tests in 19.883s
FAILED (failures=10)
Test failed: <unittest.
error: Test failed: <unittest.
> @Sylvain,
>
> Thanks for your feedback. And I try to run 'setup.py test' in the master
> branch, it also failed in several testcases. I just pasted part of result.
>
> =======
> FAIL: test_SPDIF_
> (checkbox_
> -------
> Traceback (most recent call last):
> File "/work/
> support/
> test_SPDIF_
> self.assertEqua
> AssertionError: ([0], {}) != 0
>
> =======
> FAIL: test_many_ports
> (checkbox_
> -------
> Traceback (most recent call last):
> File "/work/
> support/
> test_many_ports
> self.assertEqua
> AssertionError: ([''], {}) != ''
>
> =======
> FAIL: test_one_port (checkbox_
> -------
> Traceback (most recent call last):
> File "/work/
> support/
> test_one_port
> self.assertEqua
> AssertionError: (['available'], {}) != 'available'
Sylvain Pineau (sylvain-pineau) wrote : | # |
Please use the 2.x version of pyparsing to run the tests, as pip will download the 3.x alpha:
sudo apt install python3-pyparsing
Bin Li (binli) wrote : | # |
Thanks, it works fine now.
-------
Ran 178 tests in 18.711s
OK
Bin Li (binli) wrote : | # |
@Sylvain,
Please help review again, thanks!
Sylvain Pineau (sylvain-pineau) wrote : | # |
It was not an easy fix, this pactl parser is one of the worst module to maintain across releases.
Thanks a lot.
Bin Li (binli) wrote : | # |
Thanks a lot!
And I also learned a very excellent example to parse files from this project. :)
Preview Diff
1 | diff --git a/checkbox_support/parsers/pactl.py b/checkbox_support/parsers/pactl.py | |||
2 | index 8bc67c2..741f59b 100644 | |||
3 | --- a/checkbox_support/parsers/pactl.py | |||
4 | +++ b/checkbox_support/parsers/pactl.py | |||
5 | @@ -226,7 +226,7 @@ class Port(Node): | |||
6 | 226 | __syntax__ = ( | 226 | __syntax__ = ( |
7 | 227 | p.Optional('[Out] ').suppress() | 227 | p.Optional('[Out] ').suppress() |
8 | 228 | + p.Optional('[In] ').suppress() | 228 | + p.Optional('[In] ').suppress() |
10 | 229 | + p.Word(p.alphanums + "-;").setResultsName('port-name') | 229 | + p.Word(p.alphanums + " -;").setResultsName('port-name') |
11 | 230 | + p.Suppress(':') | 230 | + p.Suppress(':') |
12 | 231 | # This part was very tricky to write. The label is basically | 231 | # This part was very tricky to write. The label is basically |
13 | 232 | # arbitrary localized Unicode text. We want to grab all of it in | 232 | # arbitrary localized Unicode text. We want to grab all of it in |
14 | @@ -291,7 +291,7 @@ class PortWithProfile(Node): | |||
15 | 291 | __syntax__ = ( | 291 | __syntax__ = ( |
16 | 292 | p.Optional('[Out] ').suppress() | 292 | p.Optional('[Out] ').suppress() |
17 | 293 | + p.Optional('[In] ').suppress() | 293 | + p.Optional('[In] ').suppress() |
19 | 294 | + p.Word(p.alphanums + "-;").setResultsName('port-name') | 294 | + p.Word(p.alphanums + " -;").setResultsName('port-name') |
20 | 295 | + p.Suppress(':') | 295 | + p.Suppress(':') |
21 | 296 | # This part was very tricky to write. The label is basically arbitrary | 296 | # This part was very tricky to write. The label is basically arbitrary |
22 | 297 | # localized Unicode text. We want to grab all of it in one go but | 297 | # localized Unicode text. We want to grab all of it in one go but |
23 | diff --git a/checkbox_support/parsers/tests/pactl_data/cards-desktop-bionic-x13.txt b/checkbox_support/parsers/tests/pactl_data/cards-desktop-bionic-x13.txt | |||
24 | 298 | new file mode 100644 | 298 | new file mode 100644 |
25 | index 0000000..0236145 | |||
26 | --- /dev/null | |||
27 | +++ b/checkbox_support/parsers/tests/pactl_data/cards-desktop-bionic-x13.txt | |||
28 | @@ -0,0 +1,41 @@ | |||
29 | 1 | Card #0 | ||
30 | 2 | Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic | ||
31 | 3 | Driver: module-alsa-card.c | ||
32 | 4 | Owner Module: 7 | ||
33 | 5 | Properties: | ||
34 | 6 | alsa.card = "0" | ||
35 | 7 | alsa.card_name = "sof-skl_hda_card" | ||
36 | 8 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
37 | 9 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
38 | 10 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
39 | 11 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
40 | 12 | device.bus = "pci" | ||
41 | 13 | device.vendor.id = "8086" | ||
42 | 14 | device.vendor.name = "Intel Corporation" | ||
43 | 15 | device.product.id = "02c8" | ||
44 | 16 | device.string = "0" | ||
45 | 17 | device.description = "sof-skl_hda_card" | ||
46 | 18 | module-udev-detect.discovered = "1" | ||
47 | 19 | device.icon_name = "audio-card-pci" | ||
48 | 20 | Profiles: | ||
49 | 21 | Hdmi3: Play to Hdmi3 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
50 | 22 | Hdmi2: Play to Hdmi2 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
51 | 23 | Hdmi1: Play to Hdmi1 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
52 | 24 | HiFi: Play HiFi Music (sinks: 1, sources: 2, priority: 8000, available: yes) | ||
53 | 25 | off: Off (sinks: 0, sources: 0, priority: 0, available: yes) | ||
54 | 26 | Active Profile: Hdmi2 | ||
55 | 27 | Ports: | ||
56 | 28 | [Out] HDMI3: HDMI3/DP3 Output (priority: 500, latency offset: 0 usec, not available) | ||
57 | 29 | Part of profile(s): Hdmi3 | ||
58 | 30 | [In] Dmic: Digital Microphone (priority: 100, latency offset: 0 usec) | ||
59 | 31 | Part of profile(s): Hdmi3, Hdmi2, Hdmi1, HiFi | ||
60 | 32 | [In] Headset Microphone: Headset Microphone (priority: 100, latency offset: 0 usec, not available) | ||
61 | 33 | Part of profile(s): Hdmi3, Hdmi2, Hdmi1, HiFi | ||
62 | 34 | [Out] HDMI2: HDMI2/DP2 Output (priority: 400, latency offset: 0 usec, available) | ||
63 | 35 | Part of profile(s): Hdmi2 | ||
64 | 36 | [Out] HDMI1: HDMI1/DP1 Output (priority: 300, latency offset: 0 usec, not available) | ||
65 | 37 | Part of profile(s): Hdmi1 | ||
66 | 38 | [Out] Headphone: Headphone (priority: 200, latency offset: 0 usec, not available) | ||
67 | 39 | Part of profile(s): HiFi | ||
68 | 40 | [Out] Speaker: Speaker (priority: 100, latency offset: 0 usec) | ||
69 | 41 | Part of profile(s): HiFi | ||
70 | diff --git a/checkbox_support/parsers/tests/pactl_data/desktop-bionic-x13.txt b/checkbox_support/parsers/tests/pactl_data/desktop-bionic-x13.txt | |||
71 | 0 | new file mode 100644 | 42 | new file mode 100644 |
72 | index 0000000..78e8b95 | |||
73 | --- /dev/null | |||
74 | +++ b/checkbox_support/parsers/tests/pactl_data/desktop-bionic-x13.txt | |||
75 | @@ -0,0 +1,685 @@ | |||
76 | 1 | Module #0 | ||
77 | 2 | Name: module-device-restore | ||
78 | 3 | Argument: | ||
79 | 4 | Usage counter: n/a | ||
80 | 5 | Properties: | ||
81 | 6 | module.author = "Lennart Poettering" | ||
82 | 7 | module.description = "Automatically restore the volume/mute state of devices" | ||
83 | 8 | module.version = "11.1" | ||
84 | 9 | |||
85 | 10 | Module #1 | ||
86 | 11 | Name: module-stream-restore | ||
87 | 12 | Argument: | ||
88 | 13 | Usage counter: n/a | ||
89 | 14 | Properties: | ||
90 | 15 | module.author = "Lennart Poettering" | ||
91 | 16 | module.description = "Automatically restore the volume/mute/device state of streams" | ||
92 | 17 | module.version = "11.1" | ||
93 | 18 | |||
94 | 19 | Module #2 | ||
95 | 20 | Name: module-card-restore | ||
96 | 21 | Argument: | ||
97 | 22 | Usage counter: n/a | ||
98 | 23 | Properties: | ||
99 | 24 | module.author = "Lennart Poettering" | ||
100 | 25 | module.description = "Automatically restore profile of cards" | ||
101 | 26 | module.version = "11.1" | ||
102 | 27 | |||
103 | 28 | Module #3 | ||
104 | 29 | Name: module-augment-properties | ||
105 | 30 | Argument: | ||
106 | 31 | Usage counter: n/a | ||
107 | 32 | Properties: | ||
108 | 33 | module.author = "Lennart Poettering" | ||
109 | 34 | module.description = "Augment the property sets of streams with additional static information" | ||
110 | 35 | module.version = "11.1" | ||
111 | 36 | |||
112 | 37 | Module #4 | ||
113 | 38 | Name: module-switch-on-port-available | ||
114 | 39 | Argument: | ||
115 | 40 | Usage counter: n/a | ||
116 | 41 | Properties: | ||
117 | 42 | |||
118 | 43 | |||
119 | 44 | Module #5 | ||
120 | 45 | Name: module-switch-on-connect | ||
121 | 46 | Argument: | ||
122 | 47 | Usage counter: n/a | ||
123 | 48 | Properties: | ||
124 | 49 | module.author = "Michael Terry" | ||
125 | 50 | module.description = "When a sink/source is added, switch to it or conditionally switch to it" | ||
126 | 51 | module.version = "11.1" | ||
127 | 52 | |||
128 | 53 | Module #6 | ||
129 | 54 | Name: module-udev-detect | ||
130 | 55 | Argument: | ||
131 | 56 | Usage counter: n/a | ||
132 | 57 | Properties: | ||
133 | 58 | module.author = "Lennart Poettering" | ||
134 | 59 | module.description = "Detect available audio hardware and load matching drivers" | ||
135 | 60 | module.version = "11.1" | ||
136 | 61 | |||
137 | 62 | Module #7 | ||
138 | 63 | Name: module-alsa-card | ||
139 | 64 | 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" | ||
140 | 65 | Usage counter: 0 | ||
141 | 66 | Properties: | ||
142 | 67 | module.author = "Lennart Poettering" | ||
143 | 68 | module.description = "ALSA Card" | ||
144 | 69 | module.version = "11.1" | ||
145 | 70 | |||
146 | 71 | Module #8 | ||
147 | 72 | Name: module-bluetooth-policy | ||
148 | 73 | Argument: | ||
149 | 74 | Usage counter: n/a | ||
150 | 75 | Properties: | ||
151 | 76 | module.author = "Frédéric Dalleau, Pali Rohár" | ||
152 | 77 | module.description = "Policy module to make using bluetooth devices out-of-the-box easier" | ||
153 | 78 | module.version = "11.1" | ||
154 | 79 | |||
155 | 80 | Module #9 | ||
156 | 81 | Name: module-bluetooth-discover | ||
157 | 82 | Argument: | ||
158 | 83 | Usage counter: n/a | ||
159 | 84 | Properties: | ||
160 | 85 | module.author = "João Paulo Rechi Vita" | ||
161 | 86 | module.description = "Detect available Bluetooth daemon and load the corresponding discovery module" | ||
162 | 87 | module.version = "11.1" | ||
163 | 88 | |||
164 | 89 | Module #10 | ||
165 | 90 | Name: module-bluez5-discover | ||
166 | 91 | Argument: | ||
167 | 92 | Usage counter: n/a | ||
168 | 93 | Properties: | ||
169 | 94 | module.author = "João Paulo Rechi Vita" | ||
170 | 95 | module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers" | ||
171 | 96 | module.version = "11.1" | ||
172 | 97 | |||
173 | 98 | Module #11 | ||
174 | 99 | Name: module-native-protocol-unix | ||
175 | 100 | Argument: | ||
176 | 101 | Usage counter: n/a | ||
177 | 102 | Properties: | ||
178 | 103 | module.author = "Lennart Poettering" | ||
179 | 104 | module.description = "Native protocol (UNIX sockets)" | ||
180 | 105 | module.version = "11.1" | ||
181 | 106 | |||
182 | 107 | Module #12 | ||
183 | 108 | Name: module-default-device-restore | ||
184 | 109 | Argument: | ||
185 | 110 | Usage counter: n/a | ||
186 | 111 | Properties: | ||
187 | 112 | module.author = "Lennart Poettering" | ||
188 | 113 | module.description = "Automatically restore the default sink and source" | ||
189 | 114 | module.version = "11.1" | ||
190 | 115 | |||
191 | 116 | Module #13 | ||
192 | 117 | Name: module-rescue-streams | ||
193 | 118 | Argument: | ||
194 | 119 | Usage counter: n/a | ||
195 | 120 | Properties: | ||
196 | 121 | module.author = "Lennart Poettering" | ||
197 | 122 | module.description = "When a sink/source is removed, try to move its streams to the default sink/source" | ||
198 | 123 | module.version = "11.1" | ||
199 | 124 | |||
200 | 125 | Module #14 | ||
201 | 126 | Name: module-always-sink | ||
202 | 127 | Argument: | ||
203 | 128 | Usage counter: n/a | ||
204 | 129 | Properties: | ||
205 | 130 | module.author = "Colin Guthrie" | ||
206 | 131 | module.description = "Always keeps at least one sink loaded even if it's a null one" | ||
207 | 132 | module.version = "11.1" | ||
208 | 133 | |||
209 | 134 | Module #15 | ||
210 | 135 | Name: module-intended-roles | ||
211 | 136 | Argument: | ||
212 | 137 | Usage counter: n/a | ||
213 | 138 | Properties: | ||
214 | 139 | module.author = "Lennart Poettering" | ||
215 | 140 | module.description = "Automatically set device of streams based on intended roles of devices" | ||
216 | 141 | module.version = "11.1" | ||
217 | 142 | |||
218 | 143 | Module #16 | ||
219 | 144 | Name: module-suspend-on-idle | ||
220 | 145 | Argument: | ||
221 | 146 | Usage counter: n/a | ||
222 | 147 | Properties: | ||
223 | 148 | module.author = "Lennart Poettering" | ||
224 | 149 | module.description = "When a sink/source is idle for too long, suspend it" | ||
225 | 150 | module.version = "11.1" | ||
226 | 151 | |||
227 | 152 | Module #17 | ||
228 | 153 | Name: module-console-kit | ||
229 | 154 | Argument: | ||
230 | 155 | Usage counter: n/a | ||
231 | 156 | Properties: | ||
232 | 157 | module.author = "Lennart Poettering" | ||
233 | 158 | module.description = "Create a client for each ConsoleKit session of this user" | ||
234 | 159 | module.version = "11.1" | ||
235 | 160 | |||
236 | 161 | Module #18 | ||
237 | 162 | Name: module-systemd-login | ||
238 | 163 | Argument: | ||
239 | 164 | Usage counter: n/a | ||
240 | 165 | Properties: | ||
241 | 166 | module.author = "Lennart Poettering" | ||
242 | 167 | module.description = "Create a client for each login session of this user" | ||
243 | 168 | module.version = "11.1" | ||
244 | 169 | |||
245 | 170 | Module #19 | ||
246 | 171 | Name: module-position-event-sounds | ||
247 | 172 | Argument: | ||
248 | 173 | Usage counter: n/a | ||
249 | 174 | Properties: | ||
250 | 175 | module.author = "Lennart Poettering" | ||
251 | 176 | module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them." | ||
252 | 177 | module.version = "11.1" | ||
253 | 178 | |||
254 | 179 | Module #20 | ||
255 | 180 | Name: module-role-cork | ||
256 | 181 | Argument: | ||
257 | 182 | Usage counter: n/a | ||
258 | 183 | Properties: | ||
259 | 184 | module.author = "Lennart Poettering" | ||
260 | 185 | module.description = "Mute & cork streams with certain roles while others exist" | ||
261 | 186 | module.version = "11.1" | ||
262 | 187 | |||
263 | 188 | Module #21 | ||
264 | 189 | Name: module-snap-policy | ||
265 | 190 | Argument: | ||
266 | 191 | Usage counter: n/a | ||
267 | 192 | Properties: | ||
268 | 193 | module.author = "Canonical Ltd" | ||
269 | 194 | module.description = "Ubuntu Snap policy management" | ||
270 | 195 | module.version = "11.1" | ||
271 | 196 | |||
272 | 197 | Module #22 | ||
273 | 198 | Name: module-filter-heuristics | ||
274 | 199 | Argument: | ||
275 | 200 | Usage counter: n/a | ||
276 | 201 | Properties: | ||
277 | 202 | module.author = "Colin Guthrie" | ||
278 | 203 | module.description = "Detect when various filters are desirable" | ||
279 | 204 | module.version = "11.1" | ||
280 | 205 | |||
281 | 206 | Module #23 | ||
282 | 207 | Name: module-filter-apply | ||
283 | 208 | Argument: | ||
284 | 209 | Usage counter: n/a | ||
285 | 210 | Properties: | ||
286 | 211 | module.author = "Colin Guthrie" | ||
287 | 212 | module.description = "Load filter sinks automatically when needed" | ||
288 | 213 | module.version = "11.1" | ||
289 | 214 | |||
290 | 215 | Module #24 | ||
291 | 216 | Name: module-x11-publish | ||
292 | 217 | Argument: display=:0 | ||
293 | 218 | Usage counter: n/a | ||
294 | 219 | Properties: | ||
295 | 220 | module.author = "Lennart Poettering" | ||
296 | 221 | module.description = "X11 credential publisher" | ||
297 | 222 | module.version = "11.1" | ||
298 | 223 | |||
299 | 224 | Module #25 | ||
300 | 225 | Name: module-x11-bell | ||
301 | 226 | Argument: display=:0 sample=bell.ogg | ||
302 | 227 | Usage counter: n/a | ||
303 | 228 | Properties: | ||
304 | 229 | module.author = "Lennart Poettering" | ||
305 | 230 | module.description = "X11 bell interceptor" | ||
306 | 231 | module.version = "11.1" | ||
307 | 232 | |||
308 | 233 | Module #26 | ||
309 | 234 | Name: module-x11-cork-request | ||
310 | 235 | Argument: display=:0 | ||
311 | 236 | Usage counter: n/a | ||
312 | 237 | Properties: | ||
313 | 238 | module.author = "Lennart Poettering" | ||
314 | 239 | module.description = "Synthesize X11 media key events when cork/uncork is requested" | ||
315 | 240 | module.version = "11.1" | ||
316 | 241 | |||
317 | 242 | Module #27 | ||
318 | 243 | Name: module-x11-xsmp | ||
319 | 244 | Argument: display=:0 session_manager=local/u-ThinkPad-X13-Gen-1:@/tmp/.ICE-unix/2045,unix/u-ThinkPad-X13-Gen-1:/tmp/.ICE-unix/2045 | ||
320 | 245 | Usage counter: n/a | ||
321 | 246 | Properties: | ||
322 | 247 | module.author = "Lennart Poettering" | ||
323 | 248 | module.description = "X11 session management" | ||
324 | 249 | module.version = "11.1" | ||
325 | 250 | |||
326 | 251 | Sink #42 | ||
327 | 252 | State: SUSPENDED | ||
328 | 253 | Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink | ||
329 | 254 | Description: sof-skl_hda_card HDMI2/DP2 Output | ||
330 | 255 | Driver: module-alsa-card.c | ||
331 | 256 | Sample Specification: s16le 2ch 48000Hz | ||
332 | 257 | Channel Map: front-left,front-right | ||
333 | 258 | Owner Module: 7 | ||
334 | 259 | Mute: no | ||
335 | 260 | Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB | ||
336 | 261 | balance 0.00 | ||
337 | 262 | Base Volume: 65536 / 100% / 0.00 dB | ||
338 | 263 | Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink.monitor | ||
339 | 264 | Latency: 0 usec, configured 0 usec | ||
340 | 265 | Flags: HARDWARE DECIBEL_VOLUME LATENCY | ||
341 | 266 | Properties: | ||
342 | 267 | alsa.resolution_bits = "16" | ||
343 | 268 | device.api = "alsa" | ||
344 | 269 | device.class = "sound" | ||
345 | 270 | alsa.class = "generic" | ||
346 | 271 | alsa.subclass = "generic-mix" | ||
347 | 272 | alsa.name = "" | ||
348 | 273 | alsa.id = "HDMI2 (*)" | ||
349 | 274 | alsa.subdevice = "0" | ||
350 | 275 | alsa.subdevice_name = "subdevice #0" | ||
351 | 276 | alsa.device = "4" | ||
352 | 277 | alsa.card = "0" | ||
353 | 278 | alsa.card_name = "sof-skl_hda_card" | ||
354 | 279 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
355 | 280 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
356 | 281 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
357 | 282 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
358 | 283 | device.bus = "pci" | ||
359 | 284 | device.vendor.id = "8086" | ||
360 | 285 | device.vendor.name = "Intel Corporation" | ||
361 | 286 | device.product.id = "02c8" | ||
362 | 287 | device.string = "hw:sofsklhdacard,4" | ||
363 | 288 | device.buffering.buffer_size = "65472" | ||
364 | 289 | device.buffering.fragment_size = "16320" | ||
365 | 290 | device.access_mode = "mmap+timer" | ||
366 | 291 | device.profile.name = "Hdmi2: hw:sofsklhdacard,4: sink" | ||
367 | 292 | device.profile.description = "HDMI2/DP2 Output" | ||
368 | 293 | device.description = "sof-skl_hda_card HDMI2/DP2 Output" | ||
369 | 294 | module-udev-detect.discovered = "1" | ||
370 | 295 | device.icon_name = "audio-card-pci" | ||
371 | 296 | Ports: | ||
372 | 297 | [Out] HDMI2: HDMI2/DP2 Output (priority: 400, available) | ||
373 | 298 | Active Port: [Out] HDMI2 | ||
374 | 299 | Formats: | ||
375 | 300 | pcm | ||
376 | 301 | |||
377 | 302 | Source #84 | ||
378 | 303 | State: SUSPENDED | ||
379 | 304 | Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink.monitor | ||
380 | 305 | Description: Monitor of sof-skl_hda_card HDMI2/DP2 Output | ||
381 | 306 | Driver: module-alsa-card.c | ||
382 | 307 | Sample Specification: s16le 2ch 48000Hz | ||
383 | 308 | Channel Map: front-left,front-right | ||
384 | 309 | Owner Module: 7 | ||
385 | 310 | Mute: no | ||
386 | 311 | Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB | ||
387 | 312 | balance 0.00 | ||
388 | 313 | Base Volume: 65536 / 100% / 0.00 dB | ||
389 | 314 | Monitor of Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink | ||
390 | 315 | Latency: 0 usec, configured 0 usec | ||
391 | 316 | Flags: DECIBEL_VOLUME LATENCY | ||
392 | 317 | Properties: | ||
393 | 318 | device.description = "Monitor of sof-skl_hda_card HDMI2/DP2 Output" | ||
394 | 319 | device.class = "monitor" | ||
395 | 320 | alsa.card = "0" | ||
396 | 321 | alsa.card_name = "sof-skl_hda_card" | ||
397 | 322 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
398 | 323 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
399 | 324 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
400 | 325 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
401 | 326 | device.bus = "pci" | ||
402 | 327 | device.vendor.id = "8086" | ||
403 | 328 | device.vendor.name = "Intel Corporation" | ||
404 | 329 | device.product.id = "02c8" | ||
405 | 330 | device.string = "0" | ||
406 | 331 | module-udev-detect.discovered = "1" | ||
407 | 332 | device.icon_name = "audio-card-pci" | ||
408 | 333 | Formats: | ||
409 | 334 | pcm | ||
410 | 335 | |||
411 | 336 | Source #85 | ||
412 | 337 | State: SUSPENDED | ||
413 | 338 | Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_6__source | ||
414 | 339 | Description: sof-skl_hda_card Digital Microphone | ||
415 | 340 | Driver: module-alsa-card.c | ||
416 | 341 | Sample Specification: s16le 2ch 48000Hz | ||
417 | 342 | Channel Map: front-left,front-right | ||
418 | 343 | Owner Module: 7 | ||
419 | 344 | Mute: no | ||
420 | 345 | Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB | ||
421 | 346 | balance 0.00 | ||
422 | 347 | Base Volume: 65536 / 100% / 0.00 dB | ||
423 | 348 | Monitor of Sink: n/a | ||
424 | 349 | Latency: 0 usec, configured 0 usec | ||
425 | 350 | Flags: HARDWARE DECIBEL_VOLUME LATENCY | ||
426 | 351 | Properties: | ||
427 | 352 | alsa.resolution_bits = "16" | ||
428 | 353 | device.api = "alsa" | ||
429 | 354 | device.class = "sound" | ||
430 | 355 | alsa.class = "generic" | ||
431 | 356 | alsa.subclass = "generic-mix" | ||
432 | 357 | alsa.name = "" | ||
433 | 358 | alsa.id = "DMIC32 (*)" | ||
434 | 359 | alsa.subdevice = "0" | ||
435 | 360 | alsa.subdevice_name = "subdevice #0" | ||
436 | 361 | alsa.device = "6" | ||
437 | 362 | alsa.card = "0" | ||
438 | 363 | alsa.card_name = "sof-skl_hda_card" | ||
439 | 364 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
440 | 365 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
441 | 366 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
442 | 367 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
443 | 368 | device.bus = "pci" | ||
444 | 369 | device.vendor.id = "8086" | ||
445 | 370 | device.vendor.name = "Intel Corporation" | ||
446 | 371 | device.product.id = "02c8" | ||
447 | 372 | device.string = "hw:sofsklhdacard,6" | ||
448 | 373 | device.buffering.buffer_size = "65472" | ||
449 | 374 | device.buffering.fragment_size = "16320" | ||
450 | 375 | device.access_mode = "mmap+timer" | ||
451 | 376 | device.profile.name = "Hdmi2: hw:sofsklhdacard,6: source" | ||
452 | 377 | device.profile.description = "Digital Microphone" | ||
453 | 378 | device.description = "sof-skl_hda_card Digital Microphone" | ||
454 | 379 | module-udev-detect.discovered = "1" | ||
455 | 380 | device.icon_name = "audio-card-pci" | ||
456 | 381 | Ports: | ||
457 | 382 | [In] Dmic: Digital Microphone (priority: 100) | ||
458 | 383 | Active Port: [In] Dmic | ||
459 | 384 | Formats: | ||
460 | 385 | pcm | ||
461 | 386 | |||
462 | 387 | Source #86 | ||
463 | 388 | State: SUSPENDED | ||
464 | 389 | Name: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_0__source | ||
465 | 390 | Description: sof-skl_hda_card Headset Microphone | ||
466 | 391 | Driver: module-alsa-card.c | ||
467 | 392 | Sample Specification: s16le 2ch 48000Hz | ||
468 | 393 | Channel Map: front-left,front-right | ||
469 | 394 | Owner Module: 7 | ||
470 | 395 | Mute: no | ||
471 | 396 | Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB | ||
472 | 397 | balance 0.00 | ||
473 | 398 | Base Volume: 65536 / 100% / 0.00 dB | ||
474 | 399 | Monitor of Sink: n/a | ||
475 | 400 | Latency: 0 usec, configured 0 usec | ||
476 | 401 | Flags: HARDWARE DECIBEL_VOLUME LATENCY | ||
477 | 402 | Properties: | ||
478 | 403 | alsa.resolution_bits = "16" | ||
479 | 404 | device.api = "alsa" | ||
480 | 405 | device.class = "sound" | ||
481 | 406 | alsa.class = "generic" | ||
482 | 407 | alsa.subclass = "generic-mix" | ||
483 | 408 | alsa.name = "" | ||
484 | 409 | alsa.id = "HDA Analog (*)" | ||
485 | 410 | alsa.subdevice = "0" | ||
486 | 411 | alsa.subdevice_name = "subdevice #0" | ||
487 | 412 | alsa.device = "0" | ||
488 | 413 | alsa.card = "0" | ||
489 | 414 | alsa.card_name = "sof-skl_hda_card" | ||
490 | 415 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
491 | 416 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
492 | 417 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
493 | 418 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
494 | 419 | device.bus = "pci" | ||
495 | 420 | device.vendor.id = "8086" | ||
496 | 421 | device.vendor.name = "Intel Corporation" | ||
497 | 422 | device.product.id = "02c8" | ||
498 | 423 | device.string = "hw:sofsklhdacard,0" | ||
499 | 424 | device.buffering.buffer_size = "65472" | ||
500 | 425 | device.buffering.fragment_size = "16320" | ||
501 | 426 | device.access_mode = "mmap+timer" | ||
502 | 427 | device.profile.name = "Hdmi2: hw:sofsklhdacard,0: source" | ||
503 | 428 | device.profile.description = "Headset Microphone" | ||
504 | 429 | device.description = "sof-skl_hda_card Headset Microphone" | ||
505 | 430 | module-udev-detect.discovered = "1" | ||
506 | 431 | device.icon_name = "audio-card-pci" | ||
507 | 432 | Ports: | ||
508 | 433 | [In] Headset Microphone: Headset Microphone (priority: 100, not available) | ||
509 | 434 | Active Port: [In] Headset Microphone | ||
510 | 435 | Formats: | ||
511 | 436 | pcm | ||
512 | 437 | |||
513 | 438 | Client #0 | ||
514 | 439 | Driver: module-systemd-login.c | ||
515 | 440 | Owner Module: 18 | ||
516 | 441 | Properties: | ||
517 | 442 | application.name = "Login Session 2" | ||
518 | 443 | systemd-login.session = "2" | ||
519 | 444 | |||
520 | 445 | Client #1 | ||
521 | 446 | Driver: protocol-native.c | ||
522 | 447 | Owner Module: 11 | ||
523 | 448 | Properties: | ||
524 | 449 | application.name = "GNOME Shell" | ||
525 | 450 | native-protocol.peer = "UNIX socket client" | ||
526 | 451 | native-protocol.version = "32" | ||
527 | 452 | application.id = "org.gnome.Shell" | ||
528 | 453 | application.icon_name = "start-here" | ||
529 | 454 | application.language = "en_US.UTF-8" | ||
530 | 455 | window.x11.screen = "0" | ||
531 | 456 | window.x11.display = ":0" | ||
532 | 457 | application.process.id = "2184" | ||
533 | 458 | application.process.user = "u" | ||
534 | 459 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
535 | 460 | application.process.binary = "gnome-shell" | ||
536 | 461 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
537 | 462 | application.process.session_id = "2" | ||
538 | 463 | |||
539 | 464 | Client #2 | ||
540 | 465 | Driver: protocol-native.c | ||
541 | 466 | Owner Module: 11 | ||
542 | 467 | Properties: | ||
543 | 468 | application.name = "GNOME Shell Volume Control" | ||
544 | 469 | native-protocol.peer = "UNIX socket client" | ||
545 | 470 | native-protocol.version = "32" | ||
546 | 471 | application.id = "org.gnome.VolumeControl" | ||
547 | 472 | application.icon_name = "multimedia-volume-control" | ||
548 | 473 | application.version = "3.28.4" | ||
549 | 474 | application.process.id = "2184" | ||
550 | 475 | application.process.user = "u" | ||
551 | 476 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
552 | 477 | application.process.binary = "gnome-shell" | ||
553 | 478 | application.language = "en_US.UTF-8" | ||
554 | 479 | window.x11.display = ":0" | ||
555 | 480 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
556 | 481 | application.process.session_id = "2" | ||
557 | 482 | |||
558 | 483 | Client #8 | ||
559 | 484 | Driver: module-x11-xsmp.c | ||
560 | 485 | Owner Module: 27 | ||
561 | 486 | Properties: | ||
562 | 487 | application.name = "XSMP Session on gnome-session as 102c5c5ae2e20bde3b158804149680521100000020450059" | ||
563 | 488 | xsmp.vendor = "gnome-session" | ||
564 | 489 | xsmp.client.id = "102c5c5ae2e20bde3b158804149680521100000020450059" | ||
565 | 490 | |||
566 | 491 | Client #9 | ||
567 | 492 | Driver: protocol-native.c | ||
568 | 493 | Owner Module: 11 | ||
569 | 494 | Properties: | ||
570 | 495 | application.name = "GNOME Volume Control Media Keys" | ||
571 | 496 | native-protocol.peer = "UNIX socket client" | ||
572 | 497 | native-protocol.version = "32" | ||
573 | 498 | application.id = "org.gnome.VolumeControl" | ||
574 | 499 | application.icon_name = "multimedia-volume-control" | ||
575 | 500 | application.version = "" | ||
576 | 501 | application.process.id = "2544" | ||
577 | 502 | application.process.user = "u" | ||
578 | 503 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
579 | 504 | application.process.binary = "gsd-media-keys" | ||
580 | 505 | application.language = "en_US.UTF-8" | ||
581 | 506 | window.x11.display = ":0" | ||
582 | 507 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
583 | 508 | application.process.session_id = "2" | ||
584 | 509 | |||
585 | 510 | Client #71 | ||
586 | 511 | Driver: protocol-native.c | ||
587 | 512 | Owner Module: 11 | ||
588 | 513 | Properties: | ||
589 | 514 | application.name = "gsd-power" | ||
590 | 515 | native-protocol.peer = "UNIX socket client" | ||
591 | 516 | native-protocol.version = "32" | ||
592 | 517 | window.x11.display = ":0" | ||
593 | 518 | window.x11.screen = "0" | ||
594 | 519 | application.process.id = "2488" | ||
595 | 520 | application.process.user = "u" | ||
596 | 521 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
597 | 522 | application.process.binary = "gsd-power" | ||
598 | 523 | application.language = "en_US.UTF-8" | ||
599 | 524 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
600 | 525 | application.process.session_id = "2" | ||
601 | 526 | |||
602 | 527 | Client #352 | ||
603 | 528 | Driver: protocol-native.c | ||
604 | 529 | Owner Module: 11 | ||
605 | 530 | Properties: | ||
606 | 531 | application.name = "gsd-media-keys" | ||
607 | 532 | native-protocol.peer = "UNIX socket client" | ||
608 | 533 | native-protocol.version = "32" | ||
609 | 534 | window.x11.display = ":0" | ||
610 | 535 | window.x11.screen = "0" | ||
611 | 536 | application.process.id = "2544" | ||
612 | 537 | application.process.user = "u" | ||
613 | 538 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
614 | 539 | application.process.binary = "gsd-media-keys" | ||
615 | 540 | application.language = "en_US.UTF-8" | ||
616 | 541 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
617 | 542 | application.process.session_id = "2" | ||
618 | 543 | |||
619 | 544 | Client #578 | ||
620 | 545 | Driver: protocol-native.c | ||
621 | 546 | Owner Module: 11 | ||
622 | 547 | Properties: | ||
623 | 548 | application.name = "pactl" | ||
624 | 549 | native-protocol.peer = "UNIX socket client" | ||
625 | 550 | native-protocol.version = "32" | ||
626 | 551 | application.process.id = "8383" | ||
627 | 552 | application.process.user = "u" | ||
628 | 553 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
629 | 554 | application.process.binary = "pactl" | ||
630 | 555 | application.language = "en_US.UTF-8" | ||
631 | 556 | window.x11.display = ":0" | ||
632 | 557 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
633 | 558 | application.process.session_id = "2" | ||
634 | 559 | |||
635 | 560 | Sample #0 | ||
636 | 561 | Name: bell.ogg | ||
637 | 562 | Sample Specification: float32le 1ch 44100Hz | ||
638 | 563 | Channel Map: mono | ||
639 | 564 | Volume: (invalid) | ||
640 | 565 | balance 0.00 | ||
641 | 566 | Duration: 0.2s | ||
642 | 567 | Size: 34.5 KiB | ||
643 | 568 | Lazy: no | ||
644 | 569 | Filename: n/a | ||
645 | 570 | Properties: | ||
646 | 571 | media.role = "event" | ||
647 | 572 | media.name = "bell.ogg" | ||
648 | 573 | application.name = "pactl" | ||
649 | 574 | native-protocol.peer = "UNIX socket client" | ||
650 | 575 | native-protocol.version = "32" | ||
651 | 576 | application.process.id = "2528" | ||
652 | 577 | application.process.user = "u" | ||
653 | 578 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
654 | 579 | application.process.binary = "pactl" | ||
655 | 580 | application.language = "en_US.UTF-8" | ||
656 | 581 | window.x11.display = ":0" | ||
657 | 582 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
658 | 583 | application.process.session_id = "2" | ||
659 | 584 | |||
660 | 585 | Sample #1 | ||
661 | 586 | Name: bell-window-system | ||
662 | 587 | Sample Specification: s16le 1ch 44100Hz | ||
663 | 588 | Channel Map: mono | ||
664 | 589 | Volume: (invalid) | ||
665 | 590 | balance 0.00 | ||
666 | 591 | Duration: 0.2s | ||
667 | 592 | Size: 17.2 KiB | ||
668 | 593 | Lazy: no | ||
669 | 594 | Filename: n/a | ||
670 | 595 | Properties: | ||
671 | 596 | media.role = "event" | ||
672 | 597 | application.process.id = "2709" | ||
673 | 598 | application.name = "gnome-terminal-server" | ||
674 | 599 | event.description = "Bell event" | ||
675 | 600 | event.id = "bell-window-system" | ||
676 | 601 | media.name = "bell-window-system" | ||
677 | 602 | media.filename = "/usr/share//sounds/ubuntu/stereo/bell.ogg" | ||
678 | 603 | native-protocol.peer = "UNIX socket client" | ||
679 | 604 | native-protocol.version = "32" | ||
680 | 605 | application.id = "org.gnome.Shell" | ||
681 | 606 | application.icon_name = "start-here" | ||
682 | 607 | application.language = "en_US.UTF-8" | ||
683 | 608 | window.x11.screen = "0" | ||
684 | 609 | window.x11.display = ":0" | ||
685 | 610 | application.process.user = "u" | ||
686 | 611 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
687 | 612 | application.process.binary = "gnome-shell" | ||
688 | 613 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
689 | 614 | application.process.session_id = "2" | ||
690 | 615 | |||
691 | 616 | Sample #2 | ||
692 | 617 | Name: screen-capture | ||
693 | 618 | Sample Specification: s16le 2ch 96000Hz | ||
694 | 619 | Channel Map: front-left,front-right | ||
695 | 620 | Volume: (invalid) | ||
696 | 621 | balance 0.00 | ||
697 | 622 | Duration: 0.9s | ||
698 | 623 | Size: 327.1 KiB | ||
699 | 624 | Lazy: no | ||
700 | 625 | Filename: n/a | ||
701 | 626 | Properties: | ||
702 | 627 | media.role = "event" | ||
703 | 628 | event.description = "Screenshot taken" | ||
704 | 629 | event.id = "screen-capture" | ||
705 | 630 | media.name = "screen-capture" | ||
706 | 631 | media.filename = "/usr/share//sounds/freedesktop/stereo/screen-capture.oga" | ||
707 | 632 | application.name = "gsd-media-keys" | ||
708 | 633 | native-protocol.peer = "UNIX socket client" | ||
709 | 634 | native-protocol.version = "32" | ||
710 | 635 | window.x11.display = ":0" | ||
711 | 636 | window.x11.screen = "0" | ||
712 | 637 | application.process.id = "2544" | ||
713 | 638 | application.process.user = "u" | ||
714 | 639 | application.process.host = "u-ThinkPad-X13-Gen-1" | ||
715 | 640 | application.process.binary = "gsd-media-keys" | ||
716 | 641 | application.language = "en_US.UTF-8" | ||
717 | 642 | application.process.machine_id = "d565935cdbf64125b679eb560a79c787" | ||
718 | 643 | application.process.session_id = "2" | ||
719 | 644 | |||
720 | 645 | Card #0 | ||
721 | 646 | Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic | ||
722 | 647 | Driver: module-alsa-card.c | ||
723 | 648 | Owner Module: 7 | ||
724 | 649 | Properties: | ||
725 | 650 | alsa.card = "0" | ||
726 | 651 | alsa.card_name = "sof-skl_hda_card" | ||
727 | 652 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
728 | 653 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
729 | 654 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
730 | 655 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
731 | 656 | device.bus = "pci" | ||
732 | 657 | device.vendor.id = "8086" | ||
733 | 658 | device.vendor.name = "Intel Corporation" | ||
734 | 659 | device.product.id = "02c8" | ||
735 | 660 | device.string = "0" | ||
736 | 661 | device.description = "sof-skl_hda_card" | ||
737 | 662 | module-udev-detect.discovered = "1" | ||
738 | 663 | device.icon_name = "audio-card-pci" | ||
739 | 664 | Profiles: | ||
740 | 665 | Hdmi3: Play to Hdmi3 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
741 | 666 | Hdmi2: Play to Hdmi2 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
742 | 667 | Hdmi1: Play to Hdmi1 (sinks: 1, sources: 2, priority: 1000, available: yes) | ||
743 | 668 | HiFi: Play HiFi Music (sinks: 1, sources: 2, priority: 8000, available: yes) | ||
744 | 669 | off: Off (sinks: 0, sources: 0, priority: 0, available: yes) | ||
745 | 670 | Active Profile: Hdmi2 | ||
746 | 671 | Ports: | ||
747 | 672 | [Out] HDMI3: HDMI3/DP3 Output (priority: 500, latency offset: 0 usec, not available) | ||
748 | 673 | Part of profile(s): Hdmi3 | ||
749 | 674 | [In] Dmic: Digital Microphone (priority: 100, latency offset: 0 usec) | ||
750 | 675 | Part of profile(s): Hdmi3, Hdmi2, Hdmi1, HiFi | ||
751 | 676 | [In] Headset Microphone: Headset Microphone (priority: 100, latency offset: 0 usec, not available) | ||
752 | 677 | Part of profile(s): Hdmi3, Hdmi2, Hdmi1, HiFi | ||
753 | 678 | [Out] HDMI2: HDMI2/DP2 Output (priority: 400, latency offset: 0 usec, available) | ||
754 | 679 | Part of profile(s): Hdmi2 | ||
755 | 680 | [Out] HDMI1: HDMI1/DP1 Output (priority: 300, latency offset: 0 usec, not available) | ||
756 | 681 | Part of profile(s): Hdmi1 | ||
757 | 682 | [Out] Headphone: Headphone (priority: 200, latency offset: 0 usec, not available) | ||
758 | 683 | Part of profile(s): HiFi | ||
759 | 684 | [Out] Speaker: Speaker (priority: 100, latency offset: 0 usec) | ||
760 | 685 | Part of profile(s): HiFi | ||
761 | diff --git a/checkbox_support/parsers/tests/pactl_data/sinks-desktop-bionic-x13.txt b/checkbox_support/parsers/tests/pactl_data/sinks-desktop-bionic-x13.txt | |||
762 | 0 | new file mode 100644 | 686 | new file mode 100644 |
763 | index 0000000..5c90e9e | |||
764 | --- /dev/null | |||
765 | +++ b/checkbox_support/parsers/tests/pactl_data/sinks-desktop-bionic-x13.txt | |||
766 | @@ -0,0 +1,50 @@ | |||
767 | 1 | Sink #42 | ||
768 | 2 | State: SUSPENDED | ||
769 | 3 | Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink | ||
770 | 4 | Description: sof-skl_hda_card HDMI2/DP2 Output | ||
771 | 5 | Driver: module-alsa-card.c | ||
772 | 6 | Sample Specification: s16le 2ch 48000Hz | ||
773 | 7 | Channel Map: front-left,front-right | ||
774 | 8 | Owner Module: 7 | ||
775 | 9 | Mute: no | ||
776 | 10 | Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB | ||
777 | 11 | balance 0.00 | ||
778 | 12 | Base Volume: 65536 / 100% / 0.00 dB | ||
779 | 13 | Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.Hdmi2__hw_sofsklhdacard_4__sink.monitor | ||
780 | 14 | Latency: 0 usec, configured 0 usec | ||
781 | 15 | Flags: HARDWARE DECIBEL_VOLUME LATENCY | ||
782 | 16 | Properties: | ||
783 | 17 | alsa.resolution_bits = "16" | ||
784 | 18 | device.api = "alsa" | ||
785 | 19 | device.class = "sound" | ||
786 | 20 | alsa.class = "generic" | ||
787 | 21 | alsa.subclass = "generic-mix" | ||
788 | 22 | alsa.name = "" | ||
789 | 23 | alsa.id = "HDMI2 (*)" | ||
790 | 24 | alsa.subdevice = "0" | ||
791 | 25 | alsa.subdevice_name = "subdevice #0" | ||
792 | 26 | alsa.device = "4" | ||
793 | 27 | alsa.card = "0" | ||
794 | 28 | alsa.card_name = "sof-skl_hda_card" | ||
795 | 29 | alsa.long_card_name = "LENOVO-20T2SIT004-ThinkPadX13Gen1-20T2SIT004" | ||
796 | 30 | alsa.driver_name = "snd_soc_skl_hda_dsp" | ||
797 | 31 | device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" | ||
798 | 32 | sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" | ||
799 | 33 | device.bus = "pci" | ||
800 | 34 | device.vendor.id = "8086" | ||
801 | 35 | device.vendor.name = "Intel Corporation" | ||
802 | 36 | device.product.id = "02c8" | ||
803 | 37 | device.string = "hw:sofsklhdacard,4" | ||
804 | 38 | device.buffering.buffer_size = "65472" | ||
805 | 39 | device.buffering.fragment_size = "16320" | ||
806 | 40 | device.access_mode = "mmap+timer" | ||
807 | 41 | device.profile.name = "Hdmi2: hw:sofsklhdacard,4: sink" | ||
808 | 42 | device.profile.description = "HDMI2/DP2 Output" | ||
809 | 43 | device.description = "sof-skl_hda_card HDMI2/DP2 Output" | ||
810 | 44 | module-udev-detect.discovered = "1" | ||
811 | 45 | device.icon_name = "audio-card-pci" | ||
812 | 46 | Ports: | ||
813 | 47 | [Out] HDMI2: HDMI2/DP2 Output (priority: 400, available) | ||
814 | 48 | Active Port: [Out] HDMI2 | ||
815 | 49 | Formats: | ||
816 | 50 | pcm | ||
817 | diff --git a/checkbox_support/parsers/tests/test_pactl.py b/checkbox_support/parsers/tests/test_pactl.py | |||
818 | index 31f9071..876d3d9 100644 | |||
819 | --- a/checkbox_support/parsers/tests/test_pactl.py | |||
820 | +++ b/checkbox_support/parsers/tests/test_pactl.py | |||
821 | @@ -157,7 +157,6 @@ class PropertyTests(ParsingTestCase): | |||
822 | 157 | self.assertEqual(prop.name, 'module-udev-detect.discovered') | 157 | self.assertEqual(prop.name, 'module-udev-detect.discovered') |
823 | 158 | self.assertEqual(prop.value, '1') | 158 | self.assertEqual(prop.value, '1') |
824 | 159 | 159 | ||
825 | 160 | |||
826 | 161 | class PortTests(ParsingTestCase): | 160 | class PortTests(ParsingTestCase): |
827 | 162 | 161 | ||
828 | 163 | def test_port(self): | 162 | def test_port(self): |
829 | @@ -192,6 +191,17 @@ class PortTests(ParsingTestCase): | |||
830 | 192 | self.assertEqual(port.priority, 9900) | 191 | self.assertEqual(port.priority, 9900) |
831 | 193 | self.assertEqual(port.availability, '') | 192 | self.assertEqual(port.availability, '') |
832 | 194 | 193 | ||
833 | 194 | def test_DMIC_port_with_blank_space(self): | ||
834 | 195 | port = self.assertParses( | ||
835 | 196 | pactl.Port.Syntax, ( | ||
836 | 197 | '[In] Headset Microphone: Headset Microphone ' | ||
837 | 198 | '(priority: 100, not available)') | ||
838 | 199 | )['port'] | ||
839 | 200 | self.assertEqual(port.name, 'Headset Microphone') | ||
840 | 201 | self.assertEqual(port.label, 'Headset Microphone') | ||
841 | 202 | self.assertEqual(port.priority, 100) | ||
842 | 203 | self.assertEqual(port.availability, 'not available') | ||
843 | 204 | |||
844 | 195 | def test_chinese_label(self): | 205 | def test_chinese_label(self): |
845 | 196 | port = self.assertParses( | 206 | port = self.assertParses( |
846 | 197 | pactl.Port.Syntax, ( | 207 | pactl.Port.Syntax, ( |
847 | @@ -580,6 +590,21 @@ class RecordTests(ParsingTestCase, PactlDataMixIn): | |||
848 | 580 | self.assertEqual( | 590 | self.assertEqual( |
849 | 581 | record.attribute_map['Formats'].value, ['pcm']) | 591 | record.attribute_map['Formats'].value, ['pcm']) |
850 | 582 | 592 | ||
851 | 593 | def test_DMIC_sinks(self): | ||
852 | 594 | record = self.assertParses( | ||
853 | 595 | pactl.Record.Syntax, self.get_text("sinks-desktop-bionic-x13") | ||
854 | 596 | )['record'] | ||
855 | 597 | self.assertEqual(record.name, "Sink #42") | ||
856 | 598 | self.assertEqual(record.attribute_list[0].name, "State") | ||
857 | 599 | self.assertIs(record.attribute_map['State'], record.attribute_list[0]) | ||
858 | 600 | # Probe some random things | ||
859 | 601 | self.assertEqual( | ||
860 | 602 | record.attribute_map['Ports'].value[0].name, "HDMI2") | ||
861 | 603 | self.assertEqual( | ||
862 | 604 | record.attribute_map['Properties'].value[2].value, "sound") | ||
863 | 605 | self.assertEqual( | ||
864 | 606 | record.attribute_map['Formats'].value, ['pcm']) | ||
865 | 607 | |||
866 | 583 | def test_modules(self): | 608 | def test_modules(self): |
867 | 584 | record = self.assertParses( | 609 | record = self.assertParses( |
868 | 585 | pactl.Record.Syntax, self.get_text("modules-desktop-precise-0") | 610 | pactl.Record.Syntax, self.get_text("modules-desktop-precise-0") |
869 | @@ -633,6 +658,12 @@ class DocumentTests(ParsingTestCase, PactlDataMixIn): | |||
870 | 633 | )[0] | 658 | )[0] |
871 | 634 | self.assertEqual(len(document.record_list), 34) | 659 | self.assertEqual(len(document.record_list), 34) |
872 | 635 | 660 | ||
873 | 661 | def test_DMIC_pactl_list_cards_x13(self): | ||
874 | 662 | document = self.assertParses( | ||
875 | 663 | pactl.Document.Syntax, self.get_text("cards-desktop-bionic-x13") | ||
876 | 664 | )[0] | ||
877 | 665 | self.assertEqual(len(document.record_list), 1) | ||
878 | 666 | |||
879 | 636 | def test_pactl_list_clients_bionic(self): | 667 | def test_pactl_list_clients_bionic(self): |
880 | 637 | document = self.assertParses( | 668 | document = self.assertParses( |
881 | 638 | pactl.Document.Syntax, self.get_text("desktop-bionic-t480s") | 669 | pactl.Document.Syntax, self.get_text("desktop-bionic-t480s") |
882 | diff --git a/checkbox_support/scripts/audio_settings.py b/checkbox_support/scripts/audio_settings.py | |||
883 | index f1ea9b7..f850e5a 100644 | |||
884 | --- a/checkbox_support/scripts/audio_settings.py | |||
885 | +++ b/checkbox_support/scripts/audio_settings.py | |||
886 | @@ -74,7 +74,7 @@ def _guess_hdmi_profile(pactl_list): | |||
887 | 74 | card = re.sub('.*#', '', record.name) # save the card id | 74 | card = re.sub('.*#', '', record.name) # save the card id |
888 | 75 | ports = [ | 75 | ports = [ |
889 | 76 | p for p in record.attribute_map['Ports'].value | 76 | p for p in record.attribute_map['Ports'].value |
891 | 77 | if 'HDMI / DisplayPort' in p.label] | 77 | if ('HDMI' in p.label) and (('DisplayPort' in p.label) or ('DP' in p.label))] |
892 | 78 | if not ports: | 78 | if not ports: |
893 | 79 | continue | 79 | continue |
894 | 80 | if [p for p in ports if p.availability]: | 80 | if [p for p in ports if p.availability]: |
895 | @@ -115,7 +115,7 @@ def _guess_hdmi_profile(pactl_list): | |||
896 | 115 | card, port = available_port.popitem() | 115 | card, port = available_port.popitem() |
897 | 116 | # Keep the shortest string in the profile_list including 'stereo' | 116 | # Keep the shortest string in the profile_list including 'stereo' |
898 | 117 | # it will avoid testing 'surround' profiles | 117 | # it will avoid testing 'surround' profiles |
900 | 118 | profile = min([p for p in port.profile_list if 'stereo' in p], key=len) | 118 | profile = min([p for p in port.profile_list if ('stereo' in p) or ('Hdmi' in p)], key=len) |
901 | 119 | logging.info("[ Selected profile ]".center(80, '=')) | 119 | logging.info("[ Selected profile ]".center(80, '=')) |
902 | 120 | logging.info("Card #{} Profile: {}".format(card, profile)) | 120 | logging.info("Card #{} Profile: {}".format(card, profile)) |
903 | 121 | return (card, profile) | 121 | return (card, profile) |
904 | diff --git a/checkbox_support/scripts/tests/test_audio_settings.py b/checkbox_support/scripts/tests/test_audio_settings.py | |||
905 | index dc98084..9f81f97 100644 | |||
906 | --- a/checkbox_support/scripts/tests/test_audio_settings.py | |||
907 | +++ b/checkbox_support/scripts/tests/test_audio_settings.py | |||
908 | @@ -155,6 +155,21 @@ class SetProfileTest(unittest.TestCase, PactlDataMixIn): | |||
909 | 155 | "desktop-raring-t430s-dp-available")), | 155 | "desktop-raring-t430s-dp-available")), |
910 | 156 | ('2', 'output:hdmi-stereo')) | 156 | ('2', 'output:hdmi-stereo')) |
911 | 157 | 157 | ||
912 | 158 | def test_desktop_bionic_x13(self): | ||
913 | 159 | """ | ||
914 | 160 | Bionic system with a Intel UHD Graphics chipset, it's DMIC system. | ||
915 | 161 | HDMI1, HDMI2 and HDMI3 are present in the card ports list, HDMI2 shown in the sinks list. | ||
916 | 162 | DMIC don't use "HDMI / DisplayPort " as keyword, now we use "HDMI" and "DP" keywords to find output port. | ||
917 | 163 | And in profile, there are not "hdmi-stereo" keyword any more, now we use "Hdmi". | ||
918 | 164 | Ports: | ||
919 | 165 | [...] | ||
920 | 166 | [Out] HDMI2: HDMI2/DP2 Output (priority: 400, latency offset: 0 usec, available) | ||
921 | 167 | Part of profile(s): Hdmi2 | ||
922 | 168 | """ | ||
923 | 169 | self.assertEqual( | ||
924 | 170 | _guess_hdmi_profile(self.get_text("desktop-bionic-x13")), | ||
925 | 171 | ('0', 'Hdmi2')) | ||
926 | 172 | |||
927 | 158 | class RegexTest(unittest.TestCase): | 173 | class RegexTest(unittest.TestCase): |
928 | 159 | 174 | ||
929 | 160 | def test_volume_regex_trusty(self): | 175 | def test_volume_regex_trusty(self): |
Thanks a lot for the fix, this pactl parser is a pain to maintain across releases.
Could you attach to the test collection the `pactl list` output here:
https:/ /git.launchpad. net/checkbox- support/ tree/checkbox_ support/ parsers/ tests/pactl_ data
and write a unit test for this dmic:
https:/ /git.launchpad. net/checkbox- support/ tree/checkbox_ support/ parsers/ tests/test_ pactl.py
setup.py test should also tell you if the proposed fix does not add a regression to the older behaviors.