Uh oh!
There was an error while loading. Please reload this page.
mux: using channel map as mux configuration - #2212
Conversation
paulstelian97
left a comment
There was a problem hiding this comment.
So in short you just transmit which channels are to be muxed together using the channel map, then the actual config options come from the connected buffers themselves?
Should be more reliable if I understood this correctly.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I think docs description (and examples) will be better than my words :)
https://github.com/mmaka1/sof-docs/blob/channel-mapping/api/uapi/channel-mapping.rst
There was a problem hiding this comment.
@abonislawski sorry I mean comment this code inline. i.e. briefly describe what it is doing at each block otherwise it's hard to follow.
There was a problem hiding this comment.
@abonislawski any eta for the comments, this can be merged soon. thanks.
There was a problem hiding this comment.
@lgirdwood sorry, its done now but please note this cannot be merged before #2216
abonislawski
commented
Dec 17, 2019
Yes but the most important part is to use channel map for configuration. Num channels and frame format is small thing which should be done anyway |
lgirdwood
commented
Jan 9, 2020
@abonislawski can you check ICL CI report. |
lgirdwood
commented
Jan 9, 2020
@abonislawski oh and these is some alignment issue picked up by checkpatch, can you fix. |
@lgirdwood alignment fixed but not sure about CI because its only "Build not found." info for unit tests |
lgirdwood
commented
Jan 10, 2020
@zrombel CI has the build not found error, can you please check as it's blocking merge. |
Mux unit tests fail for all targets. |
abonislawski
commented
Jan 13, 2020
Tests updated with channel map generation, please review this part (more changes than expected) @lgirdwood@jajanusz@paulstelian97 |
lgirdwood
left a comment
There was a problem hiding this comment.
In general (not just this PR), I want to see comments added to any block of code that is non obvious, I'd like to see that here to to allow the reader easier understanding of the code.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Previous sof_mux_config will be deleted along with global frame_format and num_channels for mux. Mux will obtain format data from buffer params. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
lgirdwood
commented
Jan 15, 2020
@abonislawski can you ping this PR once the dependency is merged. Thanks. |
lgirdwood
commented
Jan 20, 2020
@abonislawski any update ? |
abonislawski
commented
Jan 21, 2020
@lgirdwood dependency #2216 is ready to merge but not merged yet, kernel PR is ready to merge too |
zrombel
commented
Jan 23, 2020
Due to merge of PR#2303 this PR must be rebased or test results for KD tests with audio format 24b/32b ignored. |
juimonen
commented
Feb 4, 2020
@abonislawski you have the topology part for the configuration or are you doing with some new binary blo generator? I made #2345 to demonstrate the topology for demux, so I can modify it for this and we would have proper topology/configuration support. We would really need some documentation for mux/demux usage, I've been at least 2 times searching for it with @singalsuo because of need to use mux/demux. I only had some pre-historic mail from @akloniex that I've lost on the way... |
lgirdwood
commented
Feb 4, 2020
@juimonen care to create feature request for the docs and write them, I think you are the new expert now ! |
juimonen
commented
Feb 6, 2020
@abonislawski@mmaka1 how is the ch_coeffs array in sof_ipc_channel_map used? |
abonislawski
commented
Feb 7, 2020
@juimonen ch_coeffs is a flexible array to be as small as possible, so in your example you will have ch_coeffs[0] and ch_coeffs[1] |
juimonen
commented
Feb 7, 2020
@abonislawski ok thanks. this will be "pita" to parse from topology in kernel, but I'll see what I can do :) |
lgirdwood
commented
Feb 7, 2020
@juimonen why do we need to parse coeffs in the kernel ? We should just need to find them and pass them to FW at most ? |
juimonen
commented
Feb 7, 2020
@lgirdwood So I guess these coeffs would be coming from topology? And if the amount of coeffs varies between 0-32, so this kind of variable amount of tokens is just nasty. You can't easily copy it from tuples arrays to ipc structs. You can do it, but requires much more effort than simple fixed amount of tuples, that map almost directly to ipc. |
juimonen
commented
Feb 7, 2020
@lgirdwood and the problem with channel map is even worse as you might have many of those in one wodget. All can have different size. You can't even reserve correct amount of memory for ipc struct before parsing the whole area (to find out total variable size of all channel maps) |
lgirdwood
commented
Feb 7, 2020
@juimonen can you remind us of the structures we are passing here by pasting in reply. |
@lgirdwood I'm talking about the structs in src/include/ipc/channel_map.h structsof_ipc_channel_map {
uint32_tch_index;
uint32_text_id;
uint32_tch_mask;
uint32_treserved;
int32_tch_coeffs[0];
} __packed;
andstructsof_ipc_stream_map {
structsof_ipc_cmd_hdrhdr;
uint32_tnum_ch_map;
uint32_treserved[3];
structsof_ipc_channel_mapch_map[0];
} __packed;So we should parse these from topology. stream_map contains variable amount of channel maps. channel_map contains variable amount of coeffs. |
lgirdwood
commented
Feb 7, 2020
@juimonen looks like we need a v2 for sof_ipc_stream_map and sof_ipc_channel_map since we have 2 variable length blobs in the array (making it impossible to easily index) |
jajanusz
commented
Mar 25, 2020
Depends on #2216 |
lgirdwood
commented
Sep 17, 2020
Moving to v1.7 |
mwasko
commented
Jan 25, 2021
The recommendation is to cancel this PR due to fact that there is no functional use-case for this PR and it is more a refactor how the configuration is passed which include ABI upgrade (do not want to do that if not really needed). |
Previous sof_mux_config will be deleted along with global frame_format and num_channels for mux.
Mux will obtain format data from buffer params.