Page MenuHomeFreeBSD

snd_hdspe(4): Optional unified pcm device.
ClosedPublic

Authored by dev_submerge.ch on Feb 9 2024, 12:17 AM.
Tags
None
Referenced Files
F81928507: D43798.id134487.diff
Tue, Apr 23, 8:07 AM
F81883624: D43798.id.diff
Mon, Apr 22, 3:41 PM
Unknown Object (File)
Mon, Apr 22, 10:28 AM
Unknown Object (File)
Sun, Apr 21, 10:17 PM
Unknown Object (File)
Mon, Apr 8, 10:33 PM
Unknown Object (File)
Sat, Apr 6, 12:14 AM
Unknown Object (File)
Mon, Mar 25, 10:39 PM
Unknown Object (File)
Mon, Mar 25, 10:39 PM
Subscribers

Details

Summary

Add a sysctl tunable to unify all physical ports of an HDSPe sound card
into one pcm device, with up to 14 (AIO) or 36 (RayDAT) channels. This
makes all ports available in multi-channel audio software.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This was tested with a HDSPe RayDAT. @br, could you at least test the analog outputs of the AIO? You probably need audio/jack or audio/virtual_oss to handle that many channels. Just ask me if you need help with the setup.

This was tested with a HDSPe RayDAT. @br, could you at least test the analog outputs of the AIO? You probably need audio/jack or audio/virtual_oss to handle that many channels. Just ask me if you need help with the setup.

I have set hw.hdspe.unified_pcm=1 and tested playback mono (s32le:1.0) and stereo on Line output

help needed with jackit config to test this properly!

In D43798#1002381, @br wrote:

This was tested with a HDSPe RayDAT. @br, could you at least test the analog outputs of the AIO? You probably need audio/jack or audio/virtual_oss to handle that many channels. Just ask me if you need help with the setup.

I have set hw.hdspe.unified_pcm=1 and tested playback mono (s32le:1.0) and stereo on Line output

help needed with jackit config to test this properly!

My general notes on Jack are here, Jack settings described here, and there's man jackd.

For a quick test I would do (roughly):

  1. Set hw.hdspe.unified_pcm="1" in /boot/loader.conf.
  2. Reboot.
  3. Check cat /dev/sndstat | grep HDSPe, should be one pcm device named "all".
  4. sysctl dev.hdspe.0.speedshould be 0.
  5. sysctl dev.hdspe.0.clock_source should be internal.
  6. sysctl dev.pcm.0.bitperfect should be 1 (use pcm number of HDSPe AIO).
  7. Set dev.pcm.0.rec.vchans=0 and dev.pcm.0.play.vchans=0.
  8. Start jackd -d oss --rate 48000 -p 1024 -w 32 --inchannels 14 --outchannels 16 --capture /dev/dsp0 --playback /dev/dsp0.
  9. Open Hydrogen (audio/hydrogen) and load a demo from the examples.
  10. Use the connection editor of QJackCtl (audio/qjackctl) to plug Hydrogen output into other playback ports (phones should be 3 and 4).

Sorry, I just see that the number of outchannels (playback) and inchannels (recording) in the man page are wrong.
I think the correct ones would be 16 | 14 up to 48kHz, 12 | 10 up to 96kHz, 10 | 8 up to 192kHz. Could you verify that? I'll fix the man page tomorrow.

Hope this helps, if you are stuck somewhere I need more details.

Correct man page regarding number of channels for HDSPe AIO cards.

In D43798#1002381, @br wrote:

This was tested with a HDSPe RayDAT. @br, could you at least test the analog outputs of the AIO? You probably need audio/jack or audio/virtual_oss to handle that many channels. Just ask me if you need help with the setup.

I have set hw.hdspe.unified_pcm=1 and tested playback mono (s32le:1.0) and stereo on Line output

help needed with jackit config to test this properly!

My general notes on Jack are here, Jack settings described here, and there's man jackd.

For a quick test I would do (roughly):

  1. Set hw.hdspe.unified_pcm="1" in /boot/loader.conf.
  2. Reboot.
  3. Check cat /dev/sndstat | grep HDSPe, should be one pcm device named "all".
  4. sysctl dev.hdspe.0.speedshould be 0.
  5. sysctl dev.hdspe.0.clock_source should be internal.
  6. sysctl dev.pcm.0.bitperfect should be 1 (use pcm number of HDSPe AIO).
  7. Set dev.pcm.0.rec.vchans=0 and dev.pcm.0.play.vchans=0.
  8. Start jackd -d oss --rate 48000 -p 1024 -w 32 --inchannels 14 --outchannels 16 --capture /dev/dsp0 --playback /dev/dsp0.
  9. Open Hydrogen (audio/hydrogen) and load a demo from the examples.
  10. Use the connection editor of QJackCtl (audio/qjackctl) to plug Hydrogen output into other playback ports (phones should be 3 and 4).

Sorry, I just see that the number of outchannels (playback) and inchannels (recording) in the man page are wrong.
I think the correct ones would be 16 | 14 up to 48kHz, 12 | 10 up to 96kHz, 10 | 8 up to 192kHz. Could you verify that? I'll fix the man page tomorrow.

Hope this helps, if you are stuck somewhere I need more details.

All seems to work. I have only line output connected here at home, so only hear sound on first two playback ports in qjackctl.
I can check phone (port 3,4) output on my different machine during the week.

In D43798#1002933, @br wrote:

All seems to work. I have only line output connected here at home, so only hear sound on first two playback ports in qjackctl.
I can check phone (port 3,4) output on my different machine during the week.

Jack tested ports 3,4 in qjackctl enable my left and right channels in headphones.
I will commit this then.
Thank you!

This revision was not accepted when it landed; it landed in state Needs Review.Feb 25 2024, 9:48 PM
This revision was automatically updated to reflect the committed changes.