-
Notifications
You must be signed in to change notification settings - Fork 140
[RFC] Demux tokens #1758
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
[RFC] Demux tokens #1758
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,6 +174,22 @@ struct sof_ipc_comp_asrc { | |
| uint32_t reserved[4]; | ||
| } __attribute__((packed)); | ||
|
|
||
| struct mux_stream_data { | ||
| uint32_t data_id; | ||
| uint32_t pipeline_id; | ||
| uint8_t num_channels; | ||
| uint8_t mask[8]; | ||
| uint8_t reserved[3]; /* padding */ | ||
| } __packed; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we have u8 in IPC definitions? Are you sure we're not going to have endianness issues or other shenanigangs?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no I'm not. Actually the 8 and 3 in the mask and reserved are also dubious as we have variable size for those in FW depending on platform (for e.g. 8 for apl, 4 for byt). So actually I would like us also to rationalize the mux/demux structs, if they are made public in kernel, so that it would be same for all platforms and have some sane types. I mean pipeline_id is uint32 and channels is uint8? Are we going to have 2 million pipelines? So why don't just set everything to uint16 and fix the max channels to 8? I think the space save we get from these hacks is minimal. So this is more for mux/demux component developer, but as these structs could be mirrored in kernel, they should take into account other issues as minimal size also... |
||
|
|
||
| struct sof_mux_config { | ||
| uint16_t frame_format; | ||
| uint16_t num_channels; | ||
| uint16_t num_streams; | ||
| uint16_t reserved; /* padding to ensure proper alignment */ | ||
| struct mux_stream_data streams[]; | ||
| } __packed; | ||
|
|
||
| /* generic MUX component */ | ||
| struct sof_ipc_comp_mux { | ||
| struct sof_ipc_comp comp; | ||
|
|
||
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.
what does the mask represent?
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.
so these are copied from FW and should be explained there. As I understand it, it is a channel mask for this stream, so which stream and channel is copied and where? @akloniex any comments?