Page MenuHomeFreeBSD

snd_hdspe(4): Add sysctls to select analog signal levels.
Needs ReviewPublic

Authored by dev_submerge.ch on Sun, Nov 3, 2:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 1:59 PM
Unknown Object (File)
Mon, Nov 4, 9:01 PM
Unknown Object (File)
Sun, Nov 3, 2:12 PM
Subscribers

Details

Reviewers
br
christos
Summary

RME HDSPE AIO sound cards support different sensitivity levels at the
analog input, and different gain levels for the analog line and phones
outputs. Expose these settings as sysctl tunables.

Test Plan

The following tests on hardware should be performed if possible:

  • Phones output volume changes according to sysctl setting (caution, still extremely loud).
  • Create loop to feedback the line output to line input, recording the sound played.
  • Iterate through input signal levels and observe volume changes in recorded audio.
  • Iterate through output signal levels and observe volume changes in recorded audio.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60359
Build 57243: arc lint + arc unit

Event Timeline

@br: This is the equivalent of D47330 for HDSPe AIO, as promised. Could you test it on real hardware (see test plan)? Please check that the default levels are safe, they should always be the most quiet.

There were some differences about the register used, and the RME terminology for the phones output levels is different from HDSP 9632. Watch out for copy'n'paste errors.

Great work, thanks!

I managed to switch phone level to +4dBU and then to HighGain, but could not switch back to -10dBV which was default

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=+4dbU
dev.hdspe.0.phones_level: -10dBV -> +4dBu

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=HighGain
dev.hdspe.0.phones_level: +4dBu -> HighGain

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=+4dBU
dev.hdspe.0.phones_level: HighGain -> +4dBu

Fail:
0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=-10dBV
dev.hdspe.0.phones_level: +4dBu -> +4dBu

(Note that default setting (-10dBV) is loudest, then +4dbU is lower, and HighGain is lowest volume)

In D47412#1081377, @br wrote:

Great work, thanks!

I managed to switch phone level to +4dBU and then to HighGain, but could not switch back to -10dBV which was default

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=+4dbU
dev.hdspe.0.phones_level: -10dBV -> +4dBu

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=HighGain
dev.hdspe.0.phones_level: +4dBu -> HighGain

0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=+4dBU
dev.hdspe.0.phones_level: HighGain -> +4dBu

Fail:
0 pie:/home/br %sudo sysctl dev.hdspe.0.phones_level=-10dBV
dev.hdspe.0.phones_level: +4dBu -> +4dBu

Thanks for the feedback, although I can't explain it from the code yet. I hope it's not the command line swallowing the "-" or something like that?

(Note that default setting (-10dBV) is loudest, then +4dbU is lower, and HighGain is lowest volume)

Interesting, should be the other way round. The linux code doesn't seem to label these explicitly, which is why I expected the 0 value to be safe (quiet) similar to HDSP 9632. Chances are the input and output levels work the same and are in wrong order too, could you check them?