-
Notifications
You must be signed in to change notification settings - Fork 133
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
soundwire: cadence_master: set frame shape and divider based on actual clk freq #5179
base: topic/sof-dev
Are you sure you want to change the base?
Conversation
not following why you have 2 PRs that look mostly identical @bardliao? Which one do you want us to review? |
SOFCI TEST |
7ded0c4
to
059f9ed
Compare
Rebase to the latest topic/sof-dev branch and the CI test result looks good to me. |
drivers/soundwire/cadence_master.c
Outdated
if (!prop->default_frame_rate || !prop->default_row) { | ||
dev_err(cdns->dev, "Default frame_rate %d or row %d is invalid\n", | ||
prop->default_frame_rate, prop->default_row); | ||
return; |
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.
I think we should return an error in this case, so change the return type from void to int for this function?
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.
I think we should return an error in this case, so change the return type from void to int for this function?
Agree, done
…l clk freq Frame shap and curr_dr_freq could be updated by sdw_compute_bus_params(). And Peripherals will set curr_dr_freq as their frequency. Managers should do the same. Then update frame shape according to the actual bus frequency. Signed-off-by: Bard Liao <[email protected]>
Now, we can support more than 1 soundwire bus clock frequency. This reverts commit c326356. Signed-off-by: Bard Liao <[email protected]>
"soundwire: cadence_master: set frame shape and divider based on actual clk freq" is the only new commit. CI reports below error without this commit.
The issue happens randomly when cdns_init_clock_ctrl() and cdns_bus_conf() set different divider. In theory, divider could be changed. But, the existing code set max_clk_freq in cdns_init_clock_ctrl() and set curr_dr_freq in sdw_initialize_slave() which doesn't make sense to me. The PR suggests setting curr_dr_freq if it is present.
To reproduce the issue:
Run 2 times for each below command one by one on LNL_SDW_AIOC devices.
TPLG=/lib/firmware/intel/sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg MODEL=LNLM_SDW_AIOC SOF_TEST_INTERVAL=5 ~/sof-test/test-case/check-playback.sh -d 3 -l 3 -r 1
TPLG=/lib/firmware/intel/sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg MODEL=LNLM_SDW_AIOC SOF_TEST_INTERVAL=5 ~/sof-test/test-case/check-capture.sh -d 3 -l 3 -r 1
TPLG=/lib/firmware/intel/sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg MODEL=LNLM_SDW_AIOC SOF_TEST_INTERVAL=5 ~/sof-test/test-case/check-playback.sh -d 3 -l 1 -r 3
TPLG=/lib/firmware/intel/sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg MODEL=LNLM_SDW_AIOC SOF_TEST_INTERVAL=5 ~/sof-test/test-case/check-capture.sh -d 3 -l 1 -r 3