[Jack-Devel] jack vs. motu (usb)

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Tue Oct 25 23:30:16 CEST 2016

On 10/25/2016 01:28 PM, Fons Adriaensen wrote:
> On Tue, Oct 25, 2016 at 12:49:44PM -0700, Fernando Lopez-Lezcano wrote:
>> When using aplay to help debug this it turns out that aplay does not
>> complain, and it happily plays the soundfile, but nothing comes out
>> of the speakers for the first few seconds - I presume until the card
>> switches sampling rate.
> Is that sampling rate actually set by aplay, or before by using HW
> controls ?

Just using aplay alone... it plays "fine" except that it takes a few 
seconds for sound to actually appear in the outputs.

>> Once the sampling rate has been defined at least _once_ then Jack
>> has no problem to start (over and over again) and aplay plays files
>> with sound from the beginning.
>> If you access the status and configuration web server in the Motu
>> you can switch the sampling rate and you see the clock lock icon
>> turn blinking red and then solid white once the change is done.
>> Also, alsamixer and amixer show a single read only "control" that is
>> actually the lock status indicator (the lsusb descriptors also show
>> another r/w control that can be used to _set_ the frequency but that
>> is somehow not reflected in the alsamixer/amixer interface).
> A few lines of python could probably set the sample rate using the
> web interface, wait until the card is ready, then start Jack.
> Or find out what's required on the usb endpoint that sets the
> sample rate.

Or just have a script that tries to start jack, fails, waits a bit and 
tries again (replacing jackd - a nasty hack).

It would be best to not depend on the web interface as that might not be 
always available when we connect through usb.

I have not looked at the jack source to try to figure out why it is not 
working while aplay does - maybe the card no longer generates 
interrupts? Also, if the clock somehow changes while jack is running 
(for example I disconnect the clock source if slaving to external 
clock), jack goes into la-la land and we need to quit everything and 
restart it to get things going again. Too bad...[*]

-- Fernando

[*] eventually I want to get these cards working with AVB...

More information about the Jackaudio mailing list