Skip to content

ASoC: SOF: topology: send ipc for all found DAIs in sof_set_dai_config - #1982

Merged
kv2019i merged 3 commits into
thesofproject:topic/sof-devfrom
bardliao:dai-config
Apr 21, 2020
Merged

kv2019i merged 3 commits into
thesofproject:topic/sof-devfrom
bardliao:dai-config

Conversation

@bardliao

@bardliao bardliao commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator

We may find more than one DAIs in sof_set_dai_config(). All the DAIs will share the same config and we have to send ipc for each of them.

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First patch looks good and is a nicer reduction of code overall.
The second patch is a bit harder to digest. Maybe this is aligned with the overall approach we have taken with multiple DAIs on one link. Some questions inline.

Comment thread sound/soc/sof/topology.c
@plbossart

Copy link
Copy Markdown
Member

I've personally never quite understood the topology and dai/dailink management, @ranj063 this is for you really to comment on...

@ranj063

ranj063 commented Apr 6, 2020

Copy link
Copy Markdown
Collaborator

@bardliao @plbossart the direction is correct here. The only thing is we need one more step to remove sof_link_hda_process() and replace it call with sof_set_dai_config() as well and then the code will look clean and possibly even look a bit self-explanatory

@bardliao

bardliao commented Apr 7, 2020

Copy link
Copy Markdown
Collaborator Author

@bardliao @plbossart the direction is correct here. The only thing is we need one more step to remove sof_link_hda_process() and replace it call with sof_set_dai_config() as well and then the code will look clean and possibly even look a bit self-explanatory

@ranj063 Good suggestion. Updated. @RanderWang Can you review the HDA change?

@bardliao
bardliao requested a review from RanderWang April 7, 2020 01:52
Comment thread sound/soc/sof/topology.c Outdated
@bardliao bardliao changed the title [RFC]: ASoC: SOF: topology: send ipc for all found DAIs in sof_set_dai_config ASoC: SOF: topology: send ipc for all found DAIs in sof_set_dai_config Apr 7, 2020
ranj063
ranj063 previously approved these changes Apr 7, 2020

@ranj063 ranj063 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bardliao. LGTM

kv2019i
kv2019i previously approved these changes Apr 7, 2020

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now!

Comment thread sound/soc/sof/topology.c
@plbossart

Copy link
Copy Markdown
Member

I am a bit nervous about the last patch. IIRC there were some tricks between playback and capture and something about a mask not shared. We should make sure @RanderWang reviews and tests.

Also CI reports consistent failure on Up2-Nocodec, that's odd. We should verify this.

@plbossart

Copy link
Copy Markdown
Member

oh and I forget, those changes are at the core level so our friends at NXP should chime in. @dbaluta @paulstelian97 please check if those patches have any adverse effect on your solution

@RanderWang

Copy link
Copy Markdown

@bardliao LGTM. you can get help from QA to test it on HDA codec.

@ClarexZhou

Copy link
Copy Markdown

Verified this PR on Lenovo X1 Yoga with ALC285 in HDA mode. All works ok. No regression issue.

RanderWang
RanderWang previously approved these changes Apr 8, 2020

@RanderWang RanderWang left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread sound/soc/sof/topology.c Outdated
struct snd_soc_dai_link *link,
struct sof_ipc_dai_config *config)
{
struct sof_ipc_reply reply;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still prefer keeping the scope as small as possible. In this case it would mean defining both reply and ret in the code block where they're really needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still prefer keeping the scope as small as possible. In this case it would mean defining both reply and ret in the code block where they're really needed.

Thanks @lyakh Updated.

@bardliao
bardliao dismissed stale reviews from RanderWang, kv2019i, and ranj063 via 39d0f29 April 9, 2020 07:36
@bardliao

Copy link
Copy Markdown
Collaborator Author

oh and I forget, those changes are at the core level so our friends at NXP should chime in. @dbaluta @paulstelian97 please check if those patches have any adverse effect on your solution

@dbaluta @paulstelian97 Do you have any concern about this PR?

RanderWang
RanderWang previously approved these changes Apr 10, 2020
ranj063
ranj063 previously approved these changes Apr 10, 2020
plbossart
plbossart previously approved these changes Apr 10, 2020
lyakh
lyakh previously approved these changes Apr 14, 2020
@kv2019i

kv2019i commented Apr 14, 2020

Copy link
Copy Markdown
Collaborator

@dbaluta @paulstelian97 -- I'll give you some time to comment on this (see question above in comment)

We may find more than one DAIs in sof_set_dai_config() and we should
send message to DSP for each DAI we found.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The ipc dai config dai_index is from topology. However, the same dai
config will be applied to all DAIs in the same dai link. We have to
ensure that the ipc dai config's dai_index match to the component's
dai_index.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Now we send ipc in sof_set_dai_config(), too. Therefore, we can use
sof_set_dai_config() in sof_link_hda_load() just like other link load
functions do.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@bardliao

Copy link
Copy Markdown
Collaborator Author

rebased to fix the conflict in topology.c

@kv2019i

kv2019i commented Apr 21, 2020

Copy link
Copy Markdown
Collaborator

Ok, this been open for more comments for two weeks and no further findings, so time to move ahead. Tests look ok (ICL failure is a boot retry failure which is known, GLK load/unload is known as well), so proceeding with merge.

@kv2019i
kv2019i merged commit 7136b5a into thesofproject:topic/sof-dev Apr 21, 2020
@dbaluta

dbaluta commented Apr 21, 2020

Copy link
Copy Markdown
Collaborator

@plbossart sorry, this got lost under the tons of notifications. This looks good to me, if there is any problem we will send a fix.

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.

8 participants