-
Notifications
You must be signed in to change notification settings - Fork 5.3k
TAS5805M codec driver improvement #7149
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
base: rpi-6.12.y
Are you sure you want to change the base?
TAS5805M codec driver improvement #7149
Conversation
…te change, correct work with alsa-restore service (preserve across reboots)
|
As far as I know, there is nothing Pi-specific about the TAS5805M or your changes to its driver. We are reluctant to accept random patches into our downstream branches unless it is Pi-specific, or is considered useful to Pi users but rejected upstream for some reason. You could try sending the patches to the maintainers of the "sound" subsystem: However, they are likely to reject you moving the #defines into a header (and the addition of the |
I'd looked at it and thought exactly the same. You've got a The patch commit texts are very vague as to what they're doing, and the subject lines don't follow the kernel contribution guidelines for prefixes (should be |
|
Thanks for the feedback. I have a lot to learn. I will prepare a patch for the upstream code. Have no idea how the mail distributions work; I need to figure it out. I'm only familiar with GitHub workflows. |
|
Would it make sense to keep multiple commits (fixing the commit messages), or squashed commit is a better approach? |
|
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#separate-your-changes
Contributing patches upstream is a bit of a learning curve. If you want to update this PR with your patches once tidied up, then one of us should be able to do a cursory review of them for any obvious issues. None of us are experts in the sound subsystem though. Also note that upstream patches need to be based on the latest kernel (https://github.com/torvalds/linux/), or even better is the relevant tree for the subsystem (https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for the sound one). I can highly recommend |

The goal of this PR is to provide a set of essential updates to the TAS5805M DAC (datasheet)
[X] Provide clearer register names and values
[X] Make DSP configuration binary optional (for those who do not have TI PPC3 application access)
[X] Fix digital volume control bug: It is currently possible to set volume value before DSP control sequence is sent, which is not allowed according to the datasheet (7.5.3.1 Startup Procedures)
[X] Add more ALSA hardware controls:
[X] DAC bridge mode (2 channel or 1 channel with double power),
[X] modulation mode (BD, 1SPW, Hybrid, affects power consumption and THD),
[X] analog gain (affects driver output voltage swing, should be selected based on the DAC VCC)
[X] read and dump fault details if any are detected
[X] reset faults if present
[X] Eq enable switch (for upcoming equilizer functionality)
[O] Mexer controls (coming in a different PR)
[O] EQ controls (coming in a different PR)
All changes are tested on Louder Raspberry Pi Hat by Sonocotta
A bit of background:
I am a hardware developer, a person behind Sonocotta audio boards, created for both Raspberry and ESP32. I created few Raspi Hats using TAS5805M DAC (and planning to move forward to TAS5825M model). I originally used TI-provided DAC driver code with my boards, pulled from their forums. I was happy to see that it was pulled into kernel source, however by that time I already started using mode advanced DAC features wih ESP32 and started to bake them into my custom driver code. At this point I know a lot about this DAC and have quite an extensive experience with this DAC. I see few bugs and logic errors were baked into TI version of the driver, leaving aside how poor subset of DAC functions were implemented. So my goal is to fix bugs and errors first, to unblock the road to implement the most cool features of the TAS5805M DSP, starting few a few simple but important settings affecting power consumption and performance, and moving forward to enable 15 band equilizer, mixer controls, and few other great features of this DAC.
I hope to drop my custom driver, as soon as all changes move to the raspi kernel source. I hope to see that as a part of the standard raspi image in the end, as I naturally want every personusing my Hats to be able to set them up without a need to build anything
I'm open to critique and ready to absorb every valuable piece of commentary.