[haiku] HDA (audio) driver - feedback

I finally got around to testing out the HDA driver today (under R5),
so I thought I'd report back on the results.

An old version of the Haiku media kit mixer was used for the test,
which only offers drop-sample resampling. As a result, there was some
aliasing audible during sound playback, caused by resampling 44.1kHz
audio files to the 192kHz used by the driver.

However apart from that, the sound playback was free of other
distortion: it was click- and crackle-free and there were no missed
interrupts encountered even during heavy system load.
I seem to recall seeing in Cortex that a rather large audio buffer
size was being used, so I'm not sure how well it would fare with a
more responsive buffer size (32 - 128 sample frames).

Also, no KDLs or other stability problems were detected during a few
hours of use.


I did encounter a couple of problems. Firstly there seemed to be
something wrong with the output level, possibly to do with the codec
configuration? The output level seems to be roughly 40-60dB quieter
than a line-level signal, even with the codec mixer gains cranked
as far as they'll go. Decreasing the codec mixer levels decreased the
signal output as expected, and the mute controls functioned normally.
Increasing the output level from the media kit mixer (master fader)
caused clipping, suggesting the signal attenuation is happening
somewhere after conversion from float to PCM.

I tested both the front outputs and the side outputs (which are
driven by different circuitry on the codec chip -- no headphone amp)
and both had the same low output level. The microphone-level inputs
on a mixing desk were used to raise the signal to an audible level
for the test.


The second issue was that recording didn't seem to work. I only
tested briefly with R5's SoundRecorder (so it might be a format
mismatch?), but although SoundRecorder started up okay, the VU meters
remained fixed at the top (left meter) and somewhere in the middle
(right meter), unrelated to an external signal via any jack socket
or the mixer settings.


The hardware configuration used was:
Chipset: P965 with ICH8R southbridge
HDA codec chip: Realtek ALC882
S/PDIF I/O was not connected.

(it's worth mentioning that I've never tested HDA with another OS,
so there's a remote possibility these issues might be undiscovered
hardware faults)


Apart from those two issues though, the results look pretty
promising!


Regarding the sample rate (192kHz), would it be possible to
reconfigure the driver to operate at a different rate, such as
44.1kHz?

Aside from providing the best possible quality (due to elimination
of all resampling), it would open up the possibility of using the
multi-channel features later -- which only function up to 96kHz.
Considering there are 10 independent outputs and the media kit mixer
already has the necessary routing, this would be very useful!


Other related posts: