Skip to content
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

Headphone amp driver doesn't work for inputs without a decimal point #5

Open
tvannoy opened this issue May 28, 2020 · 2 comments · May be fixed by #8
Open

Headphone amp driver doesn't work for inputs without a decimal point #5

tvannoy opened this issue May 28, 2020 · 2 comments · May be fixed by #8
Labels
bug Something isn't working

Comments

@tvannoy
Copy link
Member

tvannoy commented May 28, 2020

When writing to the volume register, values without a decimal point do not get parsed correctly. For example, writing -20 to the volume register results in

[  914.313055] Maximum attenuation exceeded.
[  914.313062] Setting attenuation to -100 dB.

being printed to the kernel log.

In light of this, perhaps all of our drivers should use shared (and tested) string parsing/conversion functions.

@tvannoy tvannoy added the bug Something isn't working label May 28, 2020
@fe-wickham
Copy link
Member

This would be stemming from a bug in the set_fixed_num function, correct? As you are seeing, it looks like the function just doesn't handle there not being a decimal point.

@tvannoy
Copy link
Member Author

tvannoy commented Jun 8, 2020

Yes, that should be the case. set_fixed_num in custom_functions.h should have a working implementation. I'd vote for including that header in this driver to avoid duplicating code.

@fe-wickham fe-wickham linked a pull request Jun 8, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants