Repository navigation
include: user: move selector and kpb structures - #1351
Conversation
|
As discussed in PR #1304 |
jajanusz
left a comment
There was a problem hiding this comment.
Can you split it into 2 commits: 1 for selector 1 for kpb, please?
9c1acd6 to
27ed66d
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Is there an equivalent PR for kernel ?
|
@lgirdwood is a kernel change really necessary here? |
|
@slawblauciak @wwittbrx yes, any PR that touches UAPI must be reflected in both kernel and FW. The same applies the other way around too. |
The question is rather: does the kernel need to know all this since we don't have corresponding tokens or IPC to set those files? If no, then this change does not belong in the UAPI files. |
|
|
@lgirdwood Why is this ABI change? ABI is the same, just struct defs are moved. |
|
@jajanusz this has been moved from internal header to external header so is an ABI addition. |
|
@lgirdwood Yea you are right, I incorrectly assumed that if they are not using it already there is no problem, but it's backward-compatible addition so it's minor change probly |
|
@lgirdwood Please classify it in https://github.com/orgs/thesofproject/projects/2 so PRs author will know which number to bump up |
|
@wwittbrx MINOR 9, also need PR for kernel too linked to this PR. |
|
@jajanusz done, Minors 7 & 8 are unmerged and in progress too, but are closer to merging atm. |
That doesn't tell me who uses these structures? the kernel doesn't, userspace doesn't, so why is this needed? External files should only be used for exchange of information. NAK on this one until I get an explanation. |
|
@keyonjie Please chime in here. I don't know where in kernel is this data set. From slim driver tests perspective this data is needed to either create the components with the provided config or to set the config after they are created. If we don't set this data then we are using default parameters for the components. Take detect dummy component for example. You can create the component without any config, but you may wish to have different activation threshold or keyphrase length. You would need to take this structure and append it to sof_ipc_comp_process IPC. Alternatively you can send this data as a binary blob with sof_ipc_ctrl_data IPC. Either way you need to know how the configuration structure looks, which makes it a part of uapi. |
jajanusz
left a comment
There was a problem hiding this comment.
Looks good, but needs PR in kernel and other ABI changing PRs to be merged with that, so keeping as 'Request changes' for now.
|
@plbossart @keyonjie |
|
@jajanusz binary blobs in topology are not parsed in any way by the kernel, they are sent as such to FW. so the struct definition is not needed by kernel in any way. As I see it kernel headers should be only used for stuff that is used by the kernel somehow, so kernel needs to link to this struct somehow. This is of course debatable, but to me kernel seems like really wrong place to have these... |
Yea, but what I meant is that you could also just compose some IPCs and send them, you just decided to send blobs. I'm noob in driver things, so feel free to tell me if I write some bullshit ;) In regard to UAPI, we can look at it as interface to use FW, we do something that run somewhere (in this case on DSP) and you can use it via this interface. In this case our user of the FW is driver, we expose to user what we can do but he decides how to use it. I prefer to look at it in more abstract way, not that it's just FW and one kind of SW using it, so idk if it's convincing for you. |
|
@jajanusz Currently with linux driver there's no way of just composing ipc message in userspace and sending it to dsp. I think this should be very strictly forbidden for users to do :) We decided exactly to use binary in these special component's so that we don't have to carve to stone the tokens and live with backwards compatibility etc. So all PROCESS components are subtypes of alsa/dapm effects type and we might be in real trouble if we would define tokens for all these (as we have now quite exotic ones). The issue here is that we could probably export in kernel sof uapi headers whatever (because we kind of own it), but people would soon start to ask what are these headers for as there is no other reference to them in kernel. There should be user space programs to generate the blobs from these headers (blobs which are then included to topology text file), but what is the correct place to have the include headers? I would rather see FW to export these to some include dir. I guess this is also related to the thing that we combined the sof and soft (sof tools) repositories. So as I see it, the user space program should be in soft and the headers in sof. I don't recall how it was done then. |
Yea, I see we cannot run away from having another includes folder for that kind of things. We noticed that problem already in #1405
It was previously something like that, but it was hard to manage dependencies that these tools had on f.e. fw headers. (we had to manage deps for 3 repos instead like now for 2). |
|
@lgirdwood @plbossart @juimonen Ok, so what are we gonna do? Imo even if you use blobs you indirectly use this api, but ok, we can have another headers folder for 'tools api', at least we will have less definitions on kernel side. Are you ok with this idea? |
|
Feel free to state your points in related issue - #1471 |
|
@jajanusz blobs will only go to FW via binary kcontrols for runtime tuning/config of components. i.e. they will be constructed by userspace commands using a shared header and C structure. |
|
@lgirdwood So I guess you agree that it'd be good to separate uapi headers into userspace/driver headers. |
|
@jajanusz yes. |
|
@wwittbrx Please update to match new headers structure. Now your headers should go to |
|
@xiulipan Travis issue: |
|
@juimonen @plbossart Is new solution ok for you? |
|
@jajanusz |
Move selector configuration structure to user header folder to expose it to users such as applications/tools. The configuration structure is needed to create a binary blob that allows to control the component. Signed-off-by: WojciechX Wittbrodt <wojciechx.wittbrodt@linux.intel.com>
Move kpb configuration structure to user header folder to expose it to users such as applications/tools. The configuration structure is needed to create a binary blob that allows to control the component. Signed-off-by: WojciechX Wittbrodt <wojciechx.wittbrodt@linux.intel.com>
Move selector and kpb configuration structures to /sof/src/include/uapi/user to match eq and detect dummy structures configuration;
Signed-off-by: Wojciech Wittbrodt wojciechx.wittbrodt@linux.intel.com