-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/nocodec nohdmi #255
Fix/nocodec nohdmi #255
Conversation
Make sure we can test without the HDMI/HDAC dependencies Signed-off-by: Pierre-Louis Bossart <[email protected]>
Make sure the machine driver goes through its .remove step. This enables load/unload module cases. Tested on Up2 with Hifiberry DAC+ (no HDA/HDMI to avoid HDAC contagion) Signed-off-by: Pierre-Louis Bossart <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks for the fix to PCM512x, I forget to make the PR for that.
The machine platform device is unregistered in the SOF core .remove. Doing this here creates problems with sysfs, likely due to a device hierarchy issue (only the parent should unregister the child?) Signed-off-by: Pierre-Louis Bossart <[email protected]>
platform_device_register_data only returns an ERR_PTR Signed-off-by: Pierre-Louis Bossart <[email protected]>
The machine platform device is unregistered in the SOF core .remove Also remove an error case handling which isn't possible. If the platform device creation fails then the machine platform device isn't created either. Signed-off-by: Pierre-Louis Bossart <[email protected]>
platform_device_register_data only returns an ERR_PTR Signed-off-by: Pierre-Louis Bossart <[email protected]>
The machine platform device is unregistered in the SOF core .remove Signed-off-by: Pierre-Louis Bossart <[email protected]>
platform_device_register_data only returns an ERR_PTR Signed-off-by: Pierre-Louis Bossart <[email protected]>
platform_device_register_data only returns an ERR_PTR Signed-off-by: Pierre-Louis Bossart <[email protected]>
The "sof-" prefix is added by the code, don't add it to the card name. This helps make sure the card is named "sof-nocodec" instead of "sof-sof-nocodec", e.g. root@ubilinux4:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sofnocodec [sof-nocodec], device 0: Port0 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 Signed-off-by: Pierre-Louis Bossart <[email protected]>
eca168d
to
0ac74e3
Compare
SOFCI TEST |
Travis CI is in the weeds, it's taking the wrong SHA1s for checkpatch? Commit 6ec97fc ("ASoC: SOF: sof-priv.h: add fw_version in sof_dev") has no obvious style problems and is ready for submission. -> this is not part of the commit list... |
@plbossart It seems to be patches in this PR is not in a strict time line order?? (not sure either) |
@plbossart |
When building on ARM in thumb mode with gcc-11.3 at -O2 or -O3, nolibc-test segfaults during the select() tests. It turns out that at this level, gcc recognizes an opportunity for using memset() to zero the fd_set, but it miscompiles it because it also recognizes a memset pattern as well, and decides to call memset() from the memset() code: 000122bc <memset>: 122bc: b510 push {r4, lr} 122be: 0004 movs r4, r0 122c0: 2a00 cmp r2, #0 122c2: d003 beq.n 122cc <memset+0x10> 122c4: 23ff movs r3, thesofproject#255 ; 0xff 122c6: 4019 ands r1, r3 122c8: f7ff fff8 bl 122bc <memset> 122cc: 0020 movs r0, r4 122ce: bd10 pop {r4, pc} Simply placing an empty asm() statement inside the loop suffices to avoid this. Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Add various tests to check maximum number of supported programs being attached: # ./vmtest.sh -- ./test_progs -t tc_opts [...] ./test_progs -t tc_opts [ 1.185325] bpf_testmod: loading out-of-tree module taints kernel. [ 1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel [ 1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz [ 1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns [ 1.276408] clocksource: Switched to clocksource tsc #252 tc_opts_after:OK #253 tc_opts_append:OK #254 tc_opts_basic:OK #255 tc_opts_before:OK #256 tc_opts_chain_classic:OK #257 tc_opts_chain_mixed:OK #258 tc_opts_delete_empty:OK #259 tc_opts_demixed:OK #260 tc_opts_detach:OK #261 tc_opts_detach_after:OK #262 tc_opts_detach_before:OK #263 tc_opts_dev_cleanup:OK #264 tc_opts_invalid:OK #265 tc_opts_max:OK <--- (new test) #266 tc_opts_mixed:OK #267 tc_opts_prepend:OK #268 tc_opts_replace:OK #269 tc_opts_revision:OK Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Add a new test case which performs double query of the bpf_mprog through libbpf API, but also via raw bpf(2) syscall. This is testing to gather first the count and then in a subsequent probe the full information with the program array without clearing passed structs in between. # ./vmtest.sh -- ./test_progs -t tc_opts [...] ./test_progs -t tc_opts [ 1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz [ 1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns [ 1.402734] clocksource: Switched to clocksource tsc [ 1.426639] bpf_testmod: loading out-of-tree module taints kernel. [ 1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel #252 tc_opts_after:OK #253 tc_opts_append:OK #254 tc_opts_basic:OK #255 tc_opts_before:OK #256 tc_opts_chain_classic:OK #257 tc_opts_chain_mixed:OK #258 tc_opts_delete_empty:OK #259 tc_opts_demixed:OK #260 tc_opts_detach:OK #261 tc_opts_detach_after:OK #262 tc_opts_detach_before:OK #263 tc_opts_dev_cleanup:OK #264 tc_opts_invalid:OK #265 tc_opts_max:OK #266 tc_opts_mixed:OK #267 tc_opts_prepend:OK #268 tc_opts_query:OK <--- (new test) #269 tc_opts_replace:OK #270 tc_opts_revision:OK Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Add a new test case to query on an empty bpf_mprog and pass the revision directly into expected_revision for attachment to assert that this does succeed. ./test_progs -t tc_opts [ 1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz [ 1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns [ 1.412419] clocksource: Switched to clocksource tsc [ 1.428671] bpf_testmod: loading out-of-tree module taints kernel. [ 1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel #252 tc_opts_after:OK #253 tc_opts_append:OK #254 tc_opts_basic:OK #255 tc_opts_before:OK #256 tc_opts_chain_classic:OK #257 tc_opts_chain_mixed:OK #258 tc_opts_delete_empty:OK #259 tc_opts_demixed:OK #260 tc_opts_detach:OK #261 tc_opts_detach_after:OK #262 tc_opts_detach_before:OK #263 tc_opts_dev_cleanup:OK #264 tc_opts_invalid:OK #265 tc_opts_max:OK #266 tc_opts_mixed:OK #267 tc_opts_prepend:OK #268 tc_opts_query:OK #269 tc_opts_query_attach:OK <--- (new test) #270 tc_opts_replace:OK #271 tc_opts_revision:OK Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
clean up the code to enable compilation without SND_SOC_SOF_HDA, restore support for nocodec mode and start testing module insertion/removal. Both nocodec and pcm512x modes support module load/unload with the caveat that topology problems need to be fixed (issues filed)
For the HDA case things are less clear, the module load/unload crashes the Up2 board with no dmesg logs, we don't seem to handle well the dependencies between SOF and the HDAC library both on init and exit, but it'll be for another PR.