Loud and distorted output on JACK

Hello,

I have a MacBook Pro 8,1 with the default Intel audio card. Anything that I play through JACK (playing something on Ardour, a wav file through Audacious,etc…) will sound very loud and hugely distorted, I have tried to adjust sound levels with ALSA mixer but even if I make it sound very softly, it’s still very distorted. Can anyone please give me some troubleshooting hints? I’ve played with the ALSA mixer and qjack ctl settings but I don’t know where else to look.

I’m in Ubuntu Studio 11.04 but I booted from an AVLinux live cd and had the same problem.

Audio recording seems to be ok (the waveform looks ok in Ardour, when I play it, it’s distorted :P)

I realize this is not an Ardour specific question but I don’t know where to go with JACK questions, if this is not adequate here, please direct me to the right forum.

Thanks in advance! :slight_smile:

could be a samplerate problem. i remember that on my macbook in linux i had to set the samplerate to 48000 for it to work without distortion. (you do that in qjacktl settings)

Thanks for the reply lokki, I already tried 41200 and 48000. I’ll try other samplerates when I get home.

41200

That was a typo right?

Seablade

Hi,

You may want to try increasing your frames per period or add another period per buffer since some onboard HDA’s like 3 rather than 2 periods/buffer, I have a USB Audio device that sounds horrible if I run the frames per period too low even though it doesn’t visibly show any xruns, if I run it at 512fpp/3ppb it works as expected. I know you aren’t using USB but that may be worth a try.

@seablade: yeah, that was a typo, I meant 42100

@everyone: Thanks for your suggestions, however, I can’t get jack to work properly, I’ve tried many combinations of sample rates, buffer sizes, etc.

Is there a command that I can use to ping the sound card for capabilities and use it’s output to set jack options? Or maybe a good read that explains all the theory behind all the settings?

< Frustration and impatience growing :expressionless: >

Thanks for any pointers :slight_smile:

@rvega: its not really posible to create a set of “capabilities”. let me give you a trivial example of the sort of thing that can happen. an RME digiface has 26 inputs and 26 outputs, consisting of 24 ADAT channels each, plus 1 S/PDIF stereo pair in each direction. oh but wait, that’s only true if you run it at 44100 or 48000 Hz. At 88200 or 96000 Hz, it has only 12 ADAT channels in each direction.

More generally, and in particular with the Intel HDA crap found all over most motherboards these days, you need to keep in mind that this hardware has been designed without “full duplex” operation in mind (simultaneous recording and playback). A few HDA implementations actually do a good job with this, and they will work well with a different set of parameters than the majority, which tend to work not so well. How to find out which one you have? You can’t … except by trying parameters out.

Thanks for the insight, Paul.

I just did this experiment: I rebooted to my mac os partition, installed jackpilot and ardour and everything there works fine.

Is there any way to get all the parameters that jackpilot is using and trying them in qjackctl?
Also, given that audio output on ALSA is fine, i’m not trying to install new kexts/drivers. Should I?

RV.

@rvega: jackpilot will store the command it executes to start JACK in a file called .jackdrc in your home folder.

Here are some settings that make the output sound fine. The latency is terrible but I’ll just bear with it for now until I learn more about audio drivers, JACK and Linux in general (Latency is better when running under MAC OS)

Started jackd with:
jackd -dalsa -Strue -p4096

And configured the alsa module by adding the following line to /etc/modprobe.d/alsa-base.conf
options snd-hda-intel position_fix=1 model=mbp55

And then restarted ALSA:
sudo alsa force-reload

Thanks for everyone’s input!

OOT: This is the first time that the author of a software package that I use replies to my questions himself, what a great welcome to the Linux world!! :slight_smile:

Cheers!

Do you have your user set up for realtime capabilities?
What distro are you running?