Topic: MADIface 192 kHz problem

Hi all,

I'm trying to get a MADIface (with a MA32 A converter) to run at 192 kHz under Linux (on x86_64 Gentoo).

I can set the sampling rate using:

# amixer -c 1 cset numid=2 9
numid=2,iface=MIXER,name='Sample Clock Source'
  ; type=ENUMERATED,access=rw------,values=1,items=10
  ; Item #0 'AutoSync'
  ; Item #1 'Internal 32.0 kHz'
  ; Item #2 'Internal 44.1 kHz'
  ; Item #3 'Internal 48.0 kHz'
  ; Item #4 'Internal 64.0 kHz'
  ; Item #5 'Internal 88.2 kHz'
  ; Item #6 'Internal 96.0 kHz'
  ; Item #7 'Internal 128.0 kHz'
  ; Item #8 'Internal 176.4 kHz'
  ; Item #9 'Internal 192.0 kHz'
  : values=9

But when I try to read data at 192 kHz I always get a :

Warning: Unable to set the number of hardware channels to 32: Invalid argument
Unable to set hardware parameters: Invalid argument

The ALSA-lib (i.e., asound.so) function for getting the number of available channels seems to return the wrong max and min number of channels when running at 192 kHz. The max-number of channels should be 16 at 192 kHz. I works fine if I let the card run at 48 kHz.

I also tried to start jack at 192 kHz with this result:

# jackd -v  -d alsa -r 192000 -p 64 -n 2 -C hw:1,0
jackd 0.118.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

getting driver descriptor from /usr/lib64/jack/jack_dummy.so
getting driver descriptor from /usr/lib64/jack/jack_net.so
getting driver descriptor from /usr/lib64/jack/jack_alsa.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
apparent rate = 192000
creating alsa driver ... -|hw:1,0|64|2|192000|0|0|nomon|swmeter|-|32bit
control device hw:0
new client: alsa_pcm, id = 1 type 1 @ 0x6091a0 fd = -1
configuring for 192000Hz, period = 64 frames (0.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: cannot set channel count to 64 for capture
ALSA: cannot configure capture channel
cannot load driver module alsa
starting server engine shutdown
stopping server thread
server thread back from poll
last xrun delay: 0.000 usecs
max delay reported by backend: 0.000 usecs
freeing engine shared memory
max usecs: 0.000, engine deleted
WARNING: 1 message buffer overruns!
cleaning up shared memory
cleaning up files
unregistering server `default'


The kernel is:

# uname -a
Linux fllap5 2.6.34-gentoo-r11 #1 SMP PREEMPT Mon Oct 11 08:17:48 CEST 2010 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux

Am I missing some setting to get this to work?

Regards,

/Fredrik

Re: MADIface 192 kHz problem

Not sure if this helps, but MADI only has 16 channels at 192k.

Regards,
Jeff Petersen
Synthax Inc.

Re: MADIface 192 kHz problem

I use the ALSA-lib functions:

snd_pcm_hw_params_get_channels_max(hwparams,&max1);
snd_pcm_hw_params_get_channels_min(hwparams,&min1);

to get the max and min number of channels (see for example the alsa/pcm.h file) but looks like the driver reports 64 channels at 192 kHz when it should report 16!?

I also have a Multiface II card and when I switch to 96 kHz (from 44.1 kHz) I can see that the number of channels decreses (in HDSPMixer) but this don't seem to happend for the MADIface card.

As it is now I can run the card at 44.1/48 kHz but the double and quad speeds seems to fail when trying to set the number of channels.

Regards,

/Fredrik

PS. BTW where can I find the hdspmmixer?

Re: MADIface 192 kHz problem

Did you post this to the alsa mailing list (http://www.alsa-project.org/main/index. … ling-lists)? They're developing the drivers for linux and should be able to correct this bug quickly.

Hope this helps

Re: MADIface 192 kHz problem

Yes I did post at the alsa-devel list and it turns out that the in-kernel driver is not working. But help is on its way from one of the developers. I will post here if I get it to work.

Re: MADIface 192 kHz problem

We have had a Linux driver debugging session (in Feb. and March) for the HDSPe type cards (MADIface, HDSPe MADI), HDSPe AES etc. So the Linux driver should now work with these cards. The driver is in the ALSA git repo. Get it with:

git clone git://git.alsa-project.org/alsa-kernel.git alsa-kernel

The hdspmixer have also been changed to support these cards. Get it with:

git clone git://git.alsa-project.org/alsa-tools.git alsa-tools

For details look (search for "hdsp") at:

http://mailman.alsa-project.org/piperma … hread.html
http://mailman.alsa-project.org/piperma … hread.html

/Fredrik

7 (edited by frli8848 2011-04-19 07:41:00)

Re: MADIface 192 kHz problem

Yes it works in Linux with the new driver (mentioned above). MADIface, HDSPe AES, HDSP AES32, RayDAT, AIO and most likely (HDSP/HDSPe) MADI works too now. Just copy the hdspm.c and hdspm.h files to your kernel sources and rebuild the kernel (modules).

/Fredrik

Re: MADIface 192 kHz problem

frli8848 wrote:

Yes it works in Linux with the new driver (mentioned above). MADIface, HDSPe AES, HDSP AES32, RayDAT, AIO and most likely (HDSP/HDSPe) MADI works too now. Just copy the hdspm.c and hdspm.h files to your kernel sources and rebuild the kernel (modules).

/Fredrik

Dear frli8848,

I am a newbie in Linux Ubuntu, recently I have installed Ubuntu Studio 10.04 64 bit with rt 2.6.31.11 Kernel (Real time Kernel). I have managed to have the above two files: hdspm.c and hdspm.h. from the git Alsa repository.

I have download the kernel sources from link below ,  rt 2.6.31.11, three files for 64 bit on 11-Jun-2010

http://mirrors.kernel.org/ubuntu/pool/u … t/?C=S;O=A

please kindly direct where should I copy these two files ? which specific folder of the rt sources and how to rebuild the kernel modules, which means no need to compile the whole kernel source?

I am not young and  only had some Xbase progarmming experiences in 1990's, just know .h file is a head file and .c is C file and need to be compiled.

Thank you again,

RT26