Skip to content

dai-zephyr: do not set local buffer if no process func found - #7690

Closed
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202305-local-buffer-set-refactor
Closed

dai-zephyr: do not set local buffer if no process func found#7690
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202305-local-buffer-set-refactor

Conversation

@kv2019i

@kv2019i kv2019i commented May 25, 2023

Copy link
Copy Markdown
Collaborator

Rework set_new_local_buffer() to not set dd->local_buffer multiple times.

@kv2019i

kv2019i commented May 25, 2023

Copy link
Copy Markdown
Collaborator Author

Not sure @lyakh this helps much, but we do avoid one extra dd->local_buffer write.

@juimonen juimonen 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.

not sure I understand the optimization, but looks innocent enough to me

@lyakh lyakh 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.

looks good, thanks for fixing it! But need to fix one hick up.

Comment thread src/audio/dai-zephyr.c Outdated
@lyakh

lyakh commented May 26, 2023

Copy link
Copy Markdown
Collaborator

@kv2019i @juimonen Given two possibilities:

	never_fails();
	ret = might_fail();
	if (ret < 0) {
		undo_never_fails();
		return ret;
	}

and

	ret = might_fail();
	if (ret < 0)
		return ret;

	never_fails();

as long as the order indeed isn't important - often both will work correctly, but I think one is clearly preferable over the other and should be used whenever possible.

Comment thread src/audio/dai-zephyr.c Outdated
Rework set_new_local_buffer() to not set dd->local_buffer multiple
times. Also remove erroneous __sparse_cache attribute for "local_buf".

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
kv2019i force-pushed the 202305-local-buffer-set-refactor branch from 55ceca3 to 1ac1ea1 Compare June 5, 2023 12:49
@kv2019i

kv2019i commented Jun 5, 2023

Copy link
Copy Markdown
Collaborator Author

V2 uploaded, please review.

@kv2019i
kv2019i requested review from btian1 and lyakh June 5, 2023 16:06
@kv2019i

kv2019i commented Jun 6, 2023

Copy link
Copy Markdown
Collaborator Author

The Intel CI System/merge/build fails to one run of "TestSrcFullScope::test_01_04_src" indicating a glitch on one platform. I don't think it can be related to this PR, but need to do another run to be sure.

@lgirdwood

Copy link
Copy Markdown
Member

SOFCI TEST

@lgirdwood

Copy link
Copy Markdown
Member

@kv2019i still failing CI, can you check. Thanks

@kv2019i kv2019i closed this Sep 13, 2023
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.

7 participants