Skip to content

Conversation

@bkokoszx
Copy link
Collaborator

@bkokoszx bkokoszx commented Feb 21, 2020

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.

e.g.
In following topology:
DAI (DMIC, 32 bit) --> IIR ---> host (16 bit)

We have two components that potentially can make frame_fmt conversion -
DAI and EQ_IIR. With above patch we can choose which component will
make this conversion. If we create DAI component with frame_fmt equal
to SOF_IPC_FRAME_S32_LE in struct sof_ipc_comp_config, conversion will
happen on IIR component, otherwise if we create DAI component with
SOF_IPC_FRAME_S16_LE format, conversion will happen on DAI.

Signed-off-by: Bartosz Kokoszko bartoszx.kokoszko@linux.intel.com

Copy link
Member

@lgirdwood lgirdwood left a 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.

@bkokoszx
Copy link
Collaborator Author

@lgirdwood
I've updated PR description.

src/audio/dai.c Outdated
Copy link
Member

@plbossart plbossart Feb 21, 2020

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?

Copy link
Collaborator Author

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.

Copy link
Member

@lgirdwood lgirdwood Feb 24, 2020

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.

@lgirdwood
Copy link
Member

@bkokoszx how do we choose which componet will do the format conversion ? e.g from your example

In following topology:
DAI (DMIC, 32 bit) --> IIR ---> host (16 bit)

We have two components that potentially can make frame_fmt conversion -
DAI and EQ_IIR```

@bkokoszx
Copy link
Collaborator Author

@lgirdwood
DAI component has bigger priority. I've updated PR description, which I think, answers your question. :)

src/audio/dai.c Outdated
Copy link
Member

@lgirdwood lgirdwood Feb 24, 2020

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 bkokoszx force-pushed the dai-ovewrite-hw-frame-fmt branch from 44b30fe to 3b5b926 Compare February 25, 2020 11:58
@bkokoszx
Copy link
Collaborator Author

@lgirdwood
I have just updated PR.

@lgirdwood
Copy link
Member

@bkokoszx can you fix conflicts.

@bkokoszx bkokoszx force-pushed the dai-ovewrite-hw-frame-fmt branch from 3b5b926 to 2e2a64c Compare February 27, 2020 07:55
@bkokoszx
Copy link
Collaborator Author

@lgirdwood
Updated

@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

@bkokoszx I'm seeing the known KD CI failure, but I'm also seeing ALH loopback failures. Can you check.

@bkokoszx
Copy link
Collaborator Author

bkokoszx commented Mar 1, 2020

SOFCI TEST

@lgirdwood
Copy link
Member

@bkokoszx seeing a new fail on internal CI with WHL. Can you check.

@bkokoszx
Copy link
Collaborator Author

bkokoszx commented Mar 2, 2020

@lgirdwood
TestLoadFwExtended and TestLoadFwBasic tests failed also for other PR's. I guess, there was something wrong with WHL CI platform. Platform was rebooted - this PR has been retriggered.

@bkokoszx
Copy link
Collaborator Author

bkokoszx commented Mar 2, 2020

I will check TestAlhLoopbackVolume48000Hz16b16b8ch test

@lgirdwood
Copy link
Member

@bkokoszx ok great, btw we are still seeing the KD test regression for all PRs now. @wwittbrx has this been bisected yet ? or are we expecting a fix from @mrajwa or @akloniex ?

@bkokoszx
Copy link
Collaborator Author

bkokoszx commented Mar 2, 2020

@lgirdwood
KD regression should be fixed by @tlauda PR #2454

Copy link

@juimonen juimonen left a 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>
@bkokoszx bkokoszx force-pushed the dai-ovewrite-hw-frame-fmt branch from 2e2a64c to e8733fb Compare March 2, 2020 12:02
@bkokoszx
Copy link
Collaborator Author

bkokoszx commented Mar 2, 2020

@lgirdwood
I've updated PR. CI passes.

@lgirdwood lgirdwood merged commit 01b4128 into thesofproject:master Mar 2, 2020
@bkokoszx bkokoszx deleted the dai-ovewrite-hw-frame-fmt branch March 10, 2020 12:11
Sign up for free to 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.

4 participants