Skip to content

Patch set to enable setting up SOF IIR EQ coefficients from user space - #112

Merged
lgirdwood merged 4 commits into
thesofproject:topic/sof-devfrom
singalsu:topic/sof-dev_add_eq_proposal
Sep 7, 2018
Merged

Patch set to enable setting up SOF IIR EQ coefficients from user space#112
lgirdwood merged 4 commits into
thesofproject:topic/sof-devfrom
singalsu:topic/sof-dev_add_eq_proposal

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

No description provided.

This patch adds the handling of snd_soc_dapm_effect that was missing.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the maximum size into the same as used currently
in DSP side.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the definitions and structs to indentical as used
on DSP side. It will help using the equalizer setup blobs in user
space.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu requested review from a user, lgirdwood and ranj063September 6, 2018 18:04
@singalsu

Copy link
Copy Markdown
CollaboratorAuthor

Please don't merge yet but give this one the full technical & kernel style review treat. There's a problem that I need to run the setup script just before play to have the EQ executed in other than bypass mode. The bypass is activated when there's no config to use in component prepare(). The component gets reset in idle somehow.

Also seems like the sof-dev kernel fails to boot even without this patch set so my testing was limited only to one day elder kernel. This is rebased to current topic/sof-dev.

@singalsu

Copy link
Copy Markdown
CollaboratorAuthor

I found some inconsistent header vs. function parameters and typos in comments. Also the build check returned some warnings, I'll update the PR...

This patch adds the binary control into topology parsing and provides
for ASoC the SOF ext bytes put and get functions.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsuforce-pushed the topic/sof-dev_add_eq_proposal branch from 3dd79ea to 90f6103CompareSeptember 7, 2018 07:07
@singalsu

Copy link
Copy Markdown
CollaboratorAuthor

The PR is now updated with changes to patches for topology.c and control.c.

@lgirdwood
lgirdwood merged commit 7cf3630 into thesofproject:topic/sof-devSep 7, 2018
plbossart pushed a commit that referenced this pull request Jul 21, 2020
serial core expects the spinlock to be initialized by the controller
driver for serial console, this patch makes sure the spinlock is
initialized, fixing the below issue:
[ 0.865928] BUG: spinlock bad magic on CPU#0, swapper/0/1
[ 0.865945] lock: sci_ports+0x0/0x4c80, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[ 0.865955] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc1+ #112
[ 0.865961] Hardware name: HopeRun HiHope RZ/G2H with sub board (DT)
[ 0.865968] Call trace:
[ 0.865979] dump_backtrace+0x0/0x1d8
[ 0.865985] show_stack+0x14/0x20
[ 0.865996] dump_stack+0xe8/0x130
[ 0.866006] spin_dump+0x6c/0x88
[ 0.866012] do_raw_spin_lock+0xb0/0xf8
[ 0.866023] _raw_spin_lock_irqsave+0x80/0xa0
[ 0.866032] uart_add_one_port+0x3a4/0x4e0
[ 0.866039] sci_probe+0x504/0x7c8
[ 0.866048] platform_drv_probe+0x50/0xa0
[ 0.866059] really_probe+0xdc/0x330
[ 0.866066] driver_probe_device+0x58/0xb8
[ 0.866072] device_driver_attach+0x6c/0x90
[ 0.866078] __driver_attach+0x88/0xd0
[ 0.866085] bus_for_each_dev+0x74/0xc8
[ 0.866091] driver_attach+0x20/0x28
[ 0.866098] bus_add_driver+0x14c/0x1f8
[ 0.866104] driver_register+0x60/0x110
[ 0.866109] __platform_driver_register+0x40/0x48
[ 0.866119] sci_init+0x2c/0x34
[ 0.866127] do_one_initcall+0x88/0x428
[ 0.866137] kernel_init_freeable+0x2c0/0x328
[ 0.866143] kernel_init+0x10/0x108
[ 0.866150] ret_from_fork+0x10/0x18
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Fixes: a3cb39d ("serial: core: Allow detach and attach serial device for console")
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1593618100-2151-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cujomalainey pushed a commit to cujomalainey/linux that referenced this pull request Oct 26, 2020
This change adds support for a configurable eir_max_name_len for
platforms which requires a larger than 48 bytes complete name in EIR.
From bluetoothctl:
[bluetooth]# system-alias
012345678901234567890123456789012345678901234567890123456789
Changing 012345678901234567890123456789012345678901234567890123456789
succeeded
[CHG] Controller DC:71:96:69:02:89 Alias:
012345678901234567890123456789012345678901234567890123456789
From btmon:
< HCI Command: Write Local Name (0x03|0x0013) plen 248 thesofproject#109
[hci0] 88.567990
Name:
012345678901234567890123456789012345678901234567890123456789
> HCI Event: Command Complete (0x0e) plen 4 thesofproject#110 [hci0] 88.663854
Write Local Name (0x03|0x0013) ncmd 1
Status: Success (0x00)
@ MGMT Event: Local Name Changed (0x0008) plen 260 {0x0004} [hci0] 88.663948
Name:
012345678901234567890123456789012345678901234567890123456789
Short name:
< HCI Command: Write Extended Inquiry Response (0x03|0x0052) plen 241
thesofproject#111 [hci0] 88.663977
FEC: Not required (0x00)
Name (complete):
012345678901234567890123456789012345678901234567890123456789
TX power: 12 dBm
Device ID: Bluetooth SIG assigned (0x0001)
Vendor: Google (224)
Product: 0xc405
Version: 0.5.6 (0x0056)
16-bit Service UUIDs (complete): 7 entries
Generic Access Profile (0x1800)
Generic Attribute Profile (0x1801)
Device Information (0x180a)
A/V Remote Control (0x110e)
A/V Remote Control Target (0x110c)
Handsfree Audio Gateway (0x111f)
Audio Source (0x110a)
> HCI Event: Command Complete (0x0e) plen 4 thesofproject#112 [hci0] 88.664874
Write Extended Inquiry Response (0x03|0x0052) ncmd 1
Status: Success (0x00)
(am from https://patchwork.kernel.org/patch/11687367/)
BUG=b:161448079
TEST=See bluetoothctl steps and validated outcome above
Signed-off-by: Alain Michaud <alainm@chromium.org>
Change-Id: Ic2cb84fb029a345c9e3901378717d1ab4e9246ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2324284
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Alain Michaud <alainm@chromium.org>
Commit-Queue: Alain Michaud <alainm@chromium.org>
aiChaoSONG pushed a commit to aiChaoSONG/linux that referenced this pull request May 6, 2021
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Fix a warning from checkpatch.pl --strict:
CHECK: Prefer kernel type 'u16' over 'uint16_t'
thesofproject#112: FILE: server.c:112:
+ uint16_t command;
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
The BPF STX/LDX instruction uses offset relative to the FP to address
stack space. Since the BPF_FP locates at the top of the frame, the offset
is usually a negative number. However, arm64 str/ldr immediate instruction
requires that offset be a positive number. Therefore, this patch tries to
convert the offsets.
The method is to find the negative offset furthest from the FP firstly.
Then add it to the FP, calculate a bottom position, called FPB, and then
adjust the offsets in other STR/LDX instructions relative to FPB.
FPB is saved using the callee-saved register x27 of arm64 which is not
used yet.
Before adjusting the offset, the patch checks every instruction to ensure
that the FP does not change in run-time. If the FP may change, no offset
is adjusted.
For example, for the following bpftrace command:
bpftrace -e 'kprobe:do_sys_open { printf("opening: %s\n", str(arg1)); }'
Without this patch, jited code(fragment):
0: bti c
4: stp x29, x30, [sp, #-16]!
8: mov x29, sp
c: stp x19, x20, [sp, #-16]!
10: stp x21, x22, [sp, #-16]!
14: stp x25, x26, [sp, #-16]!
18: mov x25, sp
1c: mov x26, #0x0 // #0
20: bti j
24: sub sp, sp, #0x90
28: add x19, x0, #0x0
2c: mov x0, #0x0 // #0
30: mov x10, #0xffffffffffffff78 // #-136
34: str x0, [x25, x10]
38: mov x10, #0xffffffffffffff80 // #-128
3c: str x0, [x25, x10]
40: mov x10, #0xffffffffffffff88 // #-120
44: str x0, [x25, x10]
48: mov x10, #0xffffffffffffff90 // #-112
4c: str x0, [x25, x10]
50: mov x10, #0xffffffffffffff98 // #-104
54: str x0, [x25, x10]
58: mov x10, #0xffffffffffffffa0 // #-96
5c: str x0, [x25, x10]
60: mov x10, #0xffffffffffffffa8 // #-88
64: str x0, [x25, x10]
68: mov x10, #0xffffffffffffffb0 // #-80
6c: str x0, [x25, x10]
70: mov x10, #0xffffffffffffffb8 // #-72
74: str x0, [x25, x10]
78: mov x10, #0xffffffffffffffc0 // #-64
7c: str x0, [x25, x10]
80: mov x10, #0xffffffffffffffc8 // #-56
84: str x0, [x25, x10]
88: mov x10, #0xffffffffffffffd0 // #-48
8c: str x0, [x25, x10]
90: mov x10, #0xffffffffffffffd8 // #-40
94: str x0, [x25, x10]
98: mov x10, #0xffffffffffffffe0 // #-32
9c: str x0, [x25, x10]
a0: mov x10, #0xffffffffffffffe8 // #-24
a4: str x0, [x25, x10]
a8: mov x10, #0xfffffffffffffff0 // #-16
ac: str x0, [x25, x10]
b0: mov x10, #0xfffffffffffffff8 // #-8
b4: str x0, [x25, x10]
b8: mov x10, #0x8 // thesofproject#8
bc: ldr x2, [x19, x10]
[...]
With this patch, jited code(fragment):
0: bti c
4: stp x29, x30, [sp, #-16]!
8: mov x29, sp
c: stp x19, x20, [sp, #-16]!
10: stp x21, x22, [sp, #-16]!
14: stp x25, x26, [sp, #-16]!
18: stp x27, x28, [sp, #-16]!
1c: mov x25, sp
20: sub x27, x25, #0x88
24: mov x26, #0x0 // #0
28: bti j
2c: sub sp, sp, #0x90
30: add x19, x0, #0x0
34: mov x0, #0x0 // #0
38: str x0, [x27]
3c: str x0, [x27, thesofproject#8]
40: str x0, [x27, thesofproject#16]
44: str x0, [x27, thesofproject#24]
48: str x0, [x27, thesofproject#32]
4c: str x0, [x27, thesofproject#40]
50: str x0, [x27, thesofproject#48]
54: str x0, [x27, thesofproject#56]
58: str x0, [x27, thesofproject#64]
5c: str x0, [x27, thesofproject#72]
60: str x0, [x27, thesofproject#80]
64: str x0, [x27, thesofproject#88]
68: str x0, [x27, thesofproject#96]
6c: str x0, [x27, thesofproject#104]
70: str x0, [x27, thesofproject#112]
74: str x0, [x27, thesofproject#120]
78: str x0, [x27, thesofproject#128]
7c: ldr x2, [x19, thesofproject#8]
[...]
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220321152852.2334294-4-xukuohai@huawei.com
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
With latest upstream llvm18, the following test cases failed:
$ ./test_progs -j
thesofproject#13/2 bpf_cookie/multi_kprobe_link_api:FAIL
thesofproject#13/3 bpf_cookie/multi_kprobe_attach_api:FAIL
thesofproject#13 bpf_cookie:FAIL
thesofproject#77 fentry_fexit:FAIL
thesofproject#78/1 fentry_test/fentry:FAIL
thesofproject#78 fentry_test:FAIL
thesofproject#82/1 fexit_test/fexit:FAIL
thesofproject#82 fexit_test:FAIL
thesofproject#112/1 kprobe_multi_test/skel_api:FAIL
thesofproject#112/2 kprobe_multi_test/link_api_addrs:FAIL
[...]
thesofproject#112 kprobe_multi_test:FAIL
thesofproject#356/17 test_global_funcs/global_func17:FAIL
thesofproject#356 test_global_funcs:FAIL
Further analysis shows llvm upstream patch [1] is responsible for the above
failures. For example, for function bpf_fentry_test7() in net/bpf/test_run.c,
without [1], the asm code is:
0000000000000400 <bpf_fentry_test7>:
400: f3 0f 1e fa endbr64
404: e8 00 00 00 00 callq 0x409 <bpf_fentry_test7+0x9>
409: 48 89 f8 movq %rdi, %rax
40c: c3 retq
40d: 0f 1f 00 nopl (%rax)
... and with [1], the asm code is:
0000000000005d20 <bpf_fentry_test7.specialized.1>:
5d20: e8 00 00 00 00 callq 0x5d25 <bpf_fentry_test7.specialized.1+0x5>
5d25: c3 retq
... and <bpf_fentry_test7.specialized.1> is called instead of <bpf_fentry_test7>
and this caused test failures for thesofproject#13/thesofproject#77 etc. except thesofproject#356.
For test case thesofproject#356/17, with [1] (progs/test_global_func17.c)), the main prog
looks like:
0000000000000000 <global_func17>:
0: b4 00 00 00 2a 00 00 00 w0 = 0x2a
1: 95 00 00 00 00 00 00 00 exit
... which passed verification while the test itself expects a verification
failure.
Let us add 'barrier_var' style asm code in both places to prevent function
specialization which caused selftests failure.
[1] llvm/llvm-project#72903
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231127050342.1945270-1-yonghong.song@linux.dev
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@singalsu@lgirdwood