Page MenuHomeFreeBSD

snd_hdsp(4): RME HDSP 9632 and HDSP 9652 sound card driver.
ClosedPublic

Authored by dev_submerge.ch on Tue, May 7, 12:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 11, 6:40 AM
Unknown Object (File)
Thu, May 9, 11:37 PM
Unknown Object (File)
Thu, May 9, 7:29 PM
Unknown Object (File)
Wed, May 8, 1:02 PM
Unknown Object (File)
Wed, May 8, 12:49 AM
Unknown Object (File)
Wed, May 8, 12:48 AM
Unknown Object (File)
Tue, May 7, 10:25 PM
Unknown Object (File)
Tue, May 7, 9:26 PM
Subscribers

Details

Summary

Add a sound(4) bridge device driver for the RME HDSP 9632 and HDSP 9652
sound cards. These cards require a nowadays rare PCI 32bit (not PCIe)
slot, but still see use due to their value and wealth of features.
The HDSP 9632 is mostly comparable to the newer HDSPe AIO, while the
HDSP 9652 is similar to the HDSPe RayDAT. These HDSPe PCIe cards are
supported by the snd_hdspe(4) driver which was taken as a starting point
for development of snd_hdsp(4).

Implementation is kept separately due to substantial differences in
hardware configuration and to allow easy removal in case PCI 32bit
support would be phased out in the future.

The snd_hdsp(4) kernel module is not enabled by default, and can be
loaded at runtime with kldload(8) or during boot via loader.conf(5).
Basic operation was tested with both cards, not including all optional
cable connectors and expansion boards. Features should be roughly on par
with the snd_hdspe(4) supported cards.

Diff Detail

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

Event Timeline

For those not familiar with snd_hdspe(4), it may be best to compare this with the hdspe.h, hdspe.c and hdspe-pcm.c files in the same directory (sys/dev/sound/pci).

I'll try to find other people who own a HDSP card and may be able to test this with hardware through multimedia@. Apart from that I'm happy for some more eyes on the code and eventually someone to commit it.

@christos I wanted to keep you in the loop here, since you were about to remove some PCI drivers. Also it may give you an idea what features could be possibly supported by mixer(8) or some future audioctl tool. Among those are:

  • Analog input levels (Lo Gain, +4dBu, -10dBV), similar to recsrc settings.
  • Analog output levels for line (Hi Gain, +4dBu, -10dBV) and phones (0dB, -6dB, -12dB)
  • Various options regarding SPDIF input and output.
  • n x n hardware mixer for both input -> output and playback -> output routing.
  • Show sync state and select clock source for digital inputs.

The last point is already implemented as sysctl, but would be a good fit for mixer(4), IMHO. I may also implement analog levels as sysctl in a followup commit, since phones output is awfully loud ATM.

good idea — these cards are high in quality to cost ratio, if not the best out all the PCI/PCIe cards we have?

sys/dev/sound/pci/hdsp-pcm.c
412

in case of error, is devlist initialized to pass it to free() ?
you can just return 1 here I think

lwhsu added inline comments.
sys/modules/sound/driver/hdsp/Makefile
2

Very minor stuff: the first while line in other older Makefile was coming from the leftover of removing the VCS comment line. For new Makefile I don't think it's really necessary.

sys/dev/sound/pci/hdsp-pcm.c
412

The promise given in device_get_children(9) is that it leaves the parameters unchanged on error, but no word about allocation. I think the correct solution is to initialize devlist and devcount parameters, then we can return here or after free(). I'll probably redo the bad: label part too, it's not a good fit here.

We may want to adopt these changes in hdspe-pcm.c later.

sys/modules/sound/driver/hdsp/Makefile
2

This is an artifact from the hdspe Makefile I copied, thanks for reporting.

Address the issues reported by Li-Wen Hsu and Ruslan Bukin.

@br does hdsp_running() look correct now? I did some brief tests, seems to work.

I do not really have the hardware to test the driver, but the code looks good to me at a first glance.

This revision is now accepted and ready to land.Thu, May 9, 4:39 PM