-
Notifications
You must be signed in to change notification settings - Fork 349
dai: overwrite hardware frame_fmt parameter with private frame_fmt #2421
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
dai: overwrite hardware frame_fmt parameter with private frame_fmt #2421
Conversation
lgirdwood
left a comment
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.
Can you give me an example use case here.
|
@lgirdwood |
src/audio/dai.c
Outdated
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.
@bkokoszx can you clarify for me the commit message and comment above "DAI component is able to convert stream with different frame_fmt's"?
It was my understanding that the DAI operates with a fixed format, and conversions are e.g. handled in a volume component. What am I missing?
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.
@plbossart
For some time the DAI component has been able to make frame_fmt conversion. We do not need volume component to do that. This capability has been added in PR #2029.
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.
@bkokoszx best to add more context to this comment. This is about back propagating the DAI format back through the pipeline so that any converter component can convert from format X -> Y if needed.
I would also make this a static inline since it will be used as part of runtime by multi-DAI support.
|
@bkokoszx how do we choose which componet will do the format conversion ? e.g from your example |
|
@lgirdwood |
src/audio/dai.c
Outdated
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.
@bkokoszx best to add more context to this comment. This is about back propagating the DAI format back through the pipeline so that any converter component can convert from format X -> Y if needed.
I would also make this a static inline since it will be used as part of runtime by multi-DAI support.
44b30fe to
3b5b926
Compare
|
@lgirdwood |
|
@bkokoszx can you fix conflicts. |
3b5b926 to
2e2a64c
Compare
|
@lgirdwood |
|
SOFCI TEST |
|
@bkokoszx I'm seeing the known KD CI failure, but I'm also seeing ALH loopback failures. Can you check. |
|
SOFCI TEST |
|
@bkokoszx seeing a new fail on internal CI with WHL. Can you check. |
|
@lgirdwood |
|
I will check |
|
@lgirdwood |
juimonen
left a comment
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.
LGTM, I can only comment code changes, not the underlying functionality. Anyway conversation seems to be settled.
Overwrite frame_fmt hardware parameters with DAI private frame_fmt in dai_comp_get_hw_params() function as DAI component is able to convert stream with different frame_fmt's Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2e2a64c to
e8733fb
Compare
|
@lgirdwood |
Overwrite
frame_fmthardware parameters withDAIprivateframe_fmtin
dai_comp_get_hw_params()function asDAIcomponent is able toconvert stream with different frame_fmt's.
e.g.
In following topology:
DAI (DMIC, 32 bit) --> IIR ---> host (16 bit)
We have two components that potentially can make
frame_fmtconversion -DAIandEQ_IIR. With above patch we can choose which component willmake this conversion. If we create
DAIcomponent withframe_fmtequalto
SOF_IPC_FRAME_S32_LEinstruct sof_ipc_comp_config, conversion willhappen on
IIRcomponent, otherwise if we createDAIcomponent withSOF_IPC_FRAME_S16_LEformat, conversion will happen on DAI.Signed-off-by: Bartosz Kokoszko bartoszx.kokoszko@linux.intel.com