-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rockchip64: rk3308 tidy up and rockpi-s fixes #7519
Conversation
I'll try this on my Rockpi-s with the built-in codec right now... |
Tried on 6.6 kernel... |
@paolosabatino |
That's because the built-in codec is disabled in the device tree in kernel 6.12 and unused on rockchip 6.6. I ask the question because the original "disabled" patch contained both, and only the pcm5102 DAC works on my board, so I don't know what is the real hardware on other boards/revisions |
It's using the built-in analog codec. |
Somehow, in all the thrashing, the analog sound node got completely deleted. |
@brentr I updated the pull request with another commit. It enables both the built-in analog codec and the pcm5102a codec. The analog is bound to I2S channel 2 and pcm5012 is bound to I2S channel 0. I tried on my board and clearly the analog codec does not sound since it is not wired, but The analog built-in codec appears as
On kernel 6.12 I also removed the "version B" unsupported error: it will be treated like "version A", so the analog codec device should be recognized anyway. I don't know the differences among A and B, so expect anything from that. On kernel 6.6, it should work without any pain. It is interesting to test if it works on kernel 6.12 to think about a potential backporting of the driver, which is much better than the current three-patches-driver; but anyway kernel 6.6 is going to phase-out soon so I don't know if the effort is worthy. |
patch/kernel/archive/rockchip64-6.12/board-rockpis-dts-fixes.patch
Outdated
Show resolved
Hide resolved
patch/kernel/archive/rockchip64-6.12/board-rockpis-dts-fixes.patch
Outdated
Show resolved
Hide resolved
Here's the score: Kernel 6.12: Almost works now! You might want to rename these patch rk3308... instead of rock-pi-s... Otherwise, I think its ready to merge. Certainly is better than what we have now! |
Let me know when you think the patch is in its final form. |
@brentr Ok, I pushed another commit removing the I spotted some other missing things from the original device tree, but I will introduce them in another pull request. edit: about the low volume on kernel 6.12, perhaps the difference among "version A" and "version B" relates to some bits in the mixer to control the volume. I saw that "version C" has a few extra lines in the driver in a couple of places, maybe "version B" needs the same minor corrections to fully work. |
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.
Confirmed that RockPI-S audio does work again for the 6.6 kernel.
There is still work to do on RockPI-S audio in the 6.12 kernel.
The mainlined rk3308 acodec mixer is still very broken.
But, with this patch, the built-in audio device becomes available again, albeit without meaningful level controls.
I'll leave it to you to choose how to merge this. |
if @igorpecovnik agrees, I would go for a regular rebase |
Description
Tidy up rk3308 patchset in rockchip64 family: patches were introduced with
board-rockpis-*
prefix, but actually there were meant for the whole rk3308 SoC family, so they have been renamed and cleaned were necessary. Some other unnecessary patches (because useful only for vendor kernel) were removed.This should also restore the sound on Rock Pi S board (at least it does so on my Rock Pi S Core SoM board) on both kernel 6.6 and 6.12
Kernel 6.12 patches have been decimated due to many things being mainlined, and also tsadc and thermal zones are now finally working correctly.
A note about audio:
My Rock Pi S Core SoM module does not use the rk3308 built-in audio analog codec, but instead uses an external high quality PCM5102 DAC and works perfectly. I don't know if this is true for other board revisions.
The built-in rk3308 analog codec is currently disabled in the device tree. In kernel 6.6, there are 3 patches to bring in the analog audio driver; in kernel 6.12 the analog audio driver is already in mainline but is probably different. If the built-in analog codec is needed for other board revisions, probably it is much better to backport the 6.12 driver to 6.6, but at the moment the mainline driver is complaining that it does not support "variant b" chips, thus it does not work yet.
GitHub issue reference:
Jira reference number AR-2543
This also address the Jira Task https://armbian.atlassian.net/browse/AR-2542 @brentr
How Has This Been Tested?
Checklist: