[alsa-devel] Can't get capturing from RME Hammerfall MADI card to work: sound loops & silcence

Niels Laukens niels.laukens at innovatie.vrt.be
Fri Sep 27 08:08:59 CEST 2013


I'm trying to capture audio from an RME Hammerfall MADI card (PCI ID
10ee:3fc6). The setup previously worked fine on Windows, so I'm currently
assuming that the card and the input signal is OK.

I wrote a very simple ALSA-application that simply opens the device, sets
the access format to NONINTERLEAVED (which seems to be the only option the
card likes), selects 32bit sampling (although the audio is 24bit, ALSA
rejects this option), 48kHz sampling and 64 channels (also, the only
option the card accepts). Next, it loops with snd_pcm_readn() to get 100ms
worth of audio, and dumps channel 10 to file. (Full source in attachement)

The result is strange for various reasons:

* The second half of every buffer returned by snd_pcm_readn() is always

* The call seems to return way to fast: I would expect to get 48000
frames/second, but judging from the timing of the snd_pcm_readn() call,
it's more like 1536000 frames/second (i.e. 32 fold faster).

* When playing back the resulting file, I do recognize some music, but it
sounds like it's the same part over and over again. Also, restarting the
capture program minutes later, returns the same (at least as far as my
ears & brain can recall) fragment of audio.

What am I doing wrong here? (Samples of the PCM-file are available upon

I've also tried a related test with `arecord`, with similar but different

* The audio was also interspersed with silence

* The capture duration did not match the requested '-d' option: the
recording was a factor of 2 shorter than requested.

* There was more audio in the recording: if I manually cut out the silent
parts, the audio sounded reasonable.

What am I missing here?

Is this the right place to ask? Or should this go to the RME forum?

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capture.cpp
Type: text/x-c++src
Size: 2449 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130927/6cb73396/attachment-0001.bin>

More information about the Alsa-devel mailing list