MOTU AVB series sample rate issue, JACK, and PulseAudio

classic Classic list List threaded Threaded
8 messages Options
Be
Reply | Threaded
Open this post in threaded view
|

MOTU AVB series sample rate issue, JACK, and PulseAudio

Be
tl;dr: Has anyone figured out a convenient, reliable way to setup MOTU
AVB series interfaces?

Hi, I recently got a MOTU Ultralite AVB to replace my RME Babyface Pro.
RME advertise the Babyface Pro as working with Linux without proprietary
drivers and because all essential functions can be controlled directly
from the device, but that is not true. It is not possible to directly
monitor a mono input on both sides of a stereo output. It is possible to
hack around this with Y splitter cables on the inputs, but that's clunky
and halves the number of available inputs. I contacted RME about this
and pointed out an unused button on the device that could be used for
toggling mono/stereo direct monitoring with a firmware update, but they
did not care. It seems they only care about their own use cases, namely
iOS. Apparently they can't be bothered to make minor changes for Linux
users but are happy to misleadingly advertise Linux compatibility.

So I got a MOTU Ultralite AVB to replace the RME Babyface Pro. The sound
quality is on par with the Babyface Pro but the Ultralite AVB has more
I/O and features for a lower cost (although if recording guitar is
important for you, IMO the Babyface Pro's instrument inputs sound
clearer than the Ultralite AVB -- but keep in mind the direct monitoring
issue). The Babyface Pro has some quirks when using it with GNU/Linux
(which I think are caused by the 2 channel mode it has for iOS), but the
Ultralite AVB has different quirks.

As discussed on this list previously, there are some oddities trying to
set the Ultralite AVB's sample rate. This seems to cause some issues
with PulseAudio. If I start PulseAudio with the Ultralite AVB plugged
in, it works briefly but randomly drops out. When I plug in the
Ultralite AVB after PulseAudio is started, it does not appear as an
output for PulseAudio and I see this in PulseAudio's output:

E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card"
(argument: "device_id="1"
name="usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
card_name="alsa_card.usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
deferred_volume=yes use_ucm=yes
card_properties="module-udev-detect.discovered=1""): initialization failed.

Occasionally I also see this in the output when I start PulseAudio with
it plugged in already. This seems to appear randomly and is not
correlated with PulseAudio output dropping out:
E: [alsa-sink-USB Audio] alsa-sink.c: ALSA woke us up to write new data
to the device, but there was actually nothing to write.
E: [alsa-sink-USB Audio] alsa-sink.c: Most likely this is a bug in the
ALSA driver 'snd_usb_audio'. Please report this issue to the ALSA
developers.
E: [alsa-sink-USB Audio] alsa-sink.c: We were woken up with POLLOUT set
-- however a subsequent snd_pcm_avail() returned 0 or another value <
min_avail.

Sometimes it looks like PulseAudio tries to set the Ultralite AVB to a
different sample rate. I sometimes notice the LCD display on the
Ultralite AVB showing 192 kHz when PulseAudio tries to use it. I tried
setting this in /etc/pulse/daemon.conf:

default-sample-rate = 44100

but it made no difference.

So I have tried using JACK regularly with the PulseAudio to JACK bridge.
Unfortunately this has some quirks too. JACK won't start unless I wait
several seconds after plugging in the Ultralite AVB. If the Ultralite
AVB is plugged in when I boot up and log into KDE, QJackCtl autostarting
JACK doesn't work. I think this is because PulseAudio tries to grab the
device before JACK starts. I have to wait a few seconds and manually
start JACK. If the Ultralite AVB's firmware is set to a different sample
rate than JACK is configured for, JACK won't start.

Has anyone contacted MOTU about the sample rate switching issue? Ideally
they could make it just work when the computer tells the audio interface
to switch sample rates.

Also, has anyone contacted them about possibly changing the firmware so
the web interface is available over USB on Linux? I think if they used
the RNDIS Ethernet-over-USB protocol that Android uses for tethering it
could be plug-and-play with Linux. Or has anyone started working on a
custom driver to make this work? In the meantime I got a cheap little
GL-MT300A router ( http://www.gl-inet.com/mt300a/ ) to use the web
control interface away from my home network. It's neat. :)
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Paul Davis


On Tue, Sep 19, 2017 at 12:36 PM, Be <[hidden email]> wrote:


So I have tried using JACK regularly with the PulseAudio to JACK bridge. Unfortunately this has some quirks too. JACK won't start unless I wait several seconds after plugging in the Ultralite AVB. I

​I've seen this and I just live with it. I change SR once in a blue moon. It just isn't that important to me. ​ I suspect it really does that the MOTU unit a long time to reset to a new SR. JACK will start eventually.
 
Has anyone contacted MOTU about the sample rate switching issue? Ideally they could make it just work when the computer tells the audio interface to switch sample rates.

Also, has anyone contacted them about possibly changing the firmware so the web interface is available over USB on Linux?

​if you have an AVB unit, why bother with USB?​ My impression (which could be wrong) was that it would work if you have the correct kernel module loaded. I don't know which module that is.


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Be
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Be
On 09/19/2017 11:55 AM, Paul Davis wrote:

>
>
> On Tue, Sep 19, 2017 at 12:36 PM, Be <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     ​
>
>     So I have tried using JACK regularly with the PulseAudio to JACK
>     bridge. Unfortunately this has some quirks too. JACK won't start
>     unless I wait several seconds after plugging in the Ultralite AVB. I
>
>
> ​I've seen this and I just live with it. I change SR once in a blue
> moon. It just isn't that important to me. ​ I suspect it really does
> that the MOTU unit a long time to reset to a new SR. JACK will start
> eventually.

I don't want to change sample rate either, but the device's sample rate
changes when I don't want it to. When it starts up it defaults to 192
kHz and there's also that quirkiness with PulseAudio trying to change
the sample rate. Perhaps I could ask MOTU to have it set the same rate
on startup to what it was on the last shutdown in a firmware update.
That seems like it would be pretty easy for them to implement
considering it has some persistent storage onboard.

>
>     Has anyone contacted MOTU about the sample rate switching issue?
>     Ideally they could make it just work when the computer tells the
>     audio interface to switch sample rates.
>
>     Also, has anyone contacted them about possibly changing the firmware
>     so the web interface is available over USB on Linux?
>
>
> ​if you have an AVB unit, why bother with USB?​ My impression (which
> could be wrong) was that it would work if you have the correct kernel
> module loaded. I don't know which module that is.
> ​

Do you mean why bother with the web interface over USB? So I don't need
a router to use the web interface at a gig. At home it's no problem to
leave an Ethernet cable plugged in. I've tried plugging an Ethernet
cable directly from the Ultralite AVB to my laptop but that doesn't
work. I'm getting a new laptop soon and new laptops generally don't have
space for RJ45 jacks anymore, so that wouldn't be an option.

AFAIK AVB is completely unsupported on Linux. Has something changed
recently? Even if it is supported in software, doesn't it require a
special high end NIC?
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Be
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Be


On 09/19/2017 12:26 PM, Be wrote:

> On 09/19/2017 11:55 AM, Paul Davis wrote:
>>
>>
>> On Tue, Sep 19, 2017 at 12:36 PM, Be <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     ​
>>
>>     So I have tried using JACK regularly with the PulseAudio to JACK
>>     bridge. Unfortunately this has some quirks too. JACK won't start
>>     unless I wait several seconds after plugging in the Ultralite AVB. I
>>
>>
>> ​I've seen this and I just live with it. I change SR once in a blue
>> moon. It just isn't that important to me. ​ I suspect it really does
>> that the MOTU unit a long time to reset to a new SR. JACK will start
>> eventually.
>
> I don't want to change sample rate either, but the device's sample rate
> changes when I don't want it to. When it starts up it defaults to 192
> kHz and there's also that quirkiness with PulseAudio trying to change
> the sample rate. Perhaps I could ask MOTU to have it set the same rate
> on startup to what it was on the last shutdown in a firmware update.
> That seems like it would be pretty easy for them to implement
> considering it has some persistent storage onboard.
>

Even when the Ultralite AVB is set to the same sample rate as JACK, I
have to wait ~10-15 seconds after plugging in the Ultralite AVB before
starting JACK works. This seems like an issue with Linux or JACK rather
than the Ultralite AVB. Anyone have an idea what's going on with that?

>>
>>     Has anyone contacted MOTU about the sample rate switching issue?
>>     Ideally they could make it just work when the computer tells the
>>     audio interface to switch sample rates.
>>
>>     Also, has anyone contacted them about possibly changing the firmware
>>     so the web interface is available over USB on Linux?
>>
>> ​if you have an AVB unit, why bother with USB?​ My impression (which
>> could be wrong) was that it would work if you have the correct kernel
>> module loaded. I don't know which module that is.
>> ​
>
> Do you mean why bother with the web interface over USB? So I don't need
> a router to use the web interface at a gig. At home it's no problem to
> leave an Ethernet cable plugged in. I've tried plugging an Ethernet
> cable directly from the Ultralite AVB to my laptop but that doesn't
> work. I'm getting a new laptop soon and new laptops generally don't have
> space for RJ45 jacks anymore, so that wouldn't be an option.

Plus, the MOTU Ultralite Mk4 doesn't have an Ethernet port so its web
interface is only accessible over USB.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Len Ovens
In reply to this post by Be
On Tue, 19 Sep 2017, Be wrote:

> As discussed on this list previously, there are some oddities trying to set
> the Ultralite AVB's sample rate. This seems to cause some issues with
> PulseAudio. If I start PulseAudio with the Ultralite AVB plugged in, it works
> briefly but randomly drops out. When I plug in the Ultralite AVB after
> PulseAudio is started, it does not appear as an output for PulseAudio and I
> see this in PulseAudio's output:
>
> E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
> E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument:
> "device_id="1" name="usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
> card_name="alsa_card.usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
> namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
> deferred_volume=yes use_ucm=yes
> card_properties="module-udev-detect.discovered=1""): initialization failed.

It looks like pulse audio does not yet have a profile for the Motu but
sometimes matches it with something else... or, it does have a profile,
but because the Motu can have different numbers of IOs it can't always
match the Motu profile it has to the real Motu interface. I do not know if
the PA profiles can be made that deal well with varying port numbers.

In my opinion, run jackd as your audio backend and use PA only as a
desktop front end bridged to jack. Pulse should be started with both the
ALSA and udev modules unloaded (or they should be unloaded prior to
bridging to jack). I have in the past used the PA -jackdus-detect module,
but now have a script that loads the jacksink/source modules the way I
want. It is important that PA does not see any physical device when using
jackd as PAs audio IF. The reason for this is that if PA can find any
device it will use sync from it and that device will limit the jack master
device to the device PA is synced to and (at least in my case) not allow
jackd to freerun properly.

So Ardour export with PA bridged and PA can see the internal (HDA) audio
IF equals crash. But if PA has no ALSA module loaded, everything is fine
and reliable. If you wish to send PA's output to another IF besides the
jackd master, use ALSA_out or zita-j2a to make it another jack output and
run it through jackd. There can be as many PA to jackd bridges as you need
(want) so that the movie you are watching can go through one IF and the
skype call through another.

By running jackd as the PA backend, you present PA with a "sound card"
that has a SR it knows it can't change (48k or whatever) and will do what
it needs to for the input and output to match.

--
Len Ovens
www.ovenwerks.net

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Be
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Be
On 09/19/2017 01:44 PM, Len Ovens wrote:
> In my opinion, run jackd as your audio backend and use PA only as a
> desktop front end bridged to jack.

Yeah, that seems to be the best course of action. I set QJackCtl to load
on KDE startup and put this in Options > Execute script after Startup in
QJackCtl's settings:

pactl load-module module-jack-sink channels=18; pactl load-module
module-jack-source channels=18; pacmd set-default-sink jack_out

That tells PulseAudio to send audio to JACK by default. (On Fedora I had
to install pulseaudio-module-jack for that). Configuring PulseAudio to
not load its ALSA backend would be annoying because I sometimes use my
onboard sound card on my laptop outside of home (not for music,
generally for hearing speech in videos).

But this is still annoying because JACK won't start when I plug in the
Ultralite AVB until I wait a few seconds. Plus I have to make sure the
Ultralite AVB's sample rate is set to the same sample rate I have JACK
configured for, and if not, change it with the controls on the Ultralite
AVB.

  Pulse should be started with both the

> ALSA and udev modules unloaded (or they should be unloaded prior to
> bridging to jack). I have in the past used the PA -jackdus-detect
> module, but now have a script that loads the jacksink/source modules the
> way I want. It is important that PA does not see any physical device
> when using jackd as PAs audio IF. The reason for this is that if PA can
> find any device it will use sync from it and that device will limit the
> jack master device to the device PA is synced to and (at least in my
> case) not allow jackd to freerun properly.
>
> So Ardour export with PA bridged and PA can see the internal (HDA) audio
> IF equals crash. But if PA has no ALSA module loaded, everything is fine
> and reliable. If you wish to send PA's output to another IF besides the
> jackd master, use ALSA_out or zita-j2a to make it another jack output
> and run it through jackd. There can be as many PA to jackd bridges as
> you need (want) so that the movie you are watching can go through one IF
> and the skype call through another.
>
> By running jackd as the PA backend, you present PA with a "sound card"
> that has a SR it knows it can't change (48k or whatever) and will do
> what it needs to for the input and output to match.
>
> --
> Len Ovens
> www.ovenwerks.net
>
> _______________________________________________
> Linux-audio-user mailing list
> [hidden email]
> https://lists.linuxaudio.org/listinfo/linux-audio-user
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Be
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Be
In reply to this post by Be
One other quirk of the Ultralite AVB, for anyone considering getting
one, is that the 1/4" (6.35mm) jacks on the back are packed together so
tightly that two XLR adapters can't be plugged in adjacent to each
other. It's a pretty funny problem to have, but can easily be solved
with 1/4" -> XLR cables. I think I'll solder my own short 1/4" -> XLR
cables so I can plug into venues' XLR cables easily without needing to
carry long cables around all the time (no one seems to make premade
cables like these shorter than 2 feet).

FWIW there is not a way to control the gains of the 1/4" line input &
output jacks from the encoders on the Ultralite AVB. Only the main
outputs, headphone output, mic inputs, and guitar inputs have gain
controls on the encoders. They're still accessible via the web
interface, but it would be convenient if I could just reach over and
turn an encoder. I'll ask MOTU if it may be possible to control them
with a future firmware update. I have added a software gain control for
booth output to Mixxx, but it would be nice to easily access the
hardware controls.

On 09/19/2017 11:36 AM, Be wrote:

> tl;dr: Has anyone figured out a convenient, reliable way to setup MOTU
> AVB series interfaces?
>
> Hi, I recently got a MOTU Ultralite AVB to replace my RME Babyface Pro.
> RME advertise the Babyface Pro as working with Linux without proprietary
> drivers and because all essential functions can be controlled directly
> from the device, but that is not true. It is not possible to directly
> monitor a mono input on both sides of a stereo output. It is possible to
> hack around this with Y splitter cables on the inputs, but that's clunky
> and halves the number of available inputs. I contacted RME about this
> and pointed out an unused button on the device that could be used for
> toggling mono/stereo direct monitoring with a firmware update, but they
> did not care. It seems they only care about their own use cases, namely
> iOS. Apparently they can't be bothered to make minor changes for Linux
> users but are happy to misleadingly advertise Linux compatibility.
>
> So I got a MOTU Ultralite AVB to replace the RME Babyface Pro. The sound
> quality is on par with the Babyface Pro but the Ultralite AVB has more
> I/O and features for a lower cost (although if recording guitar is
> important for you, IMO the Babyface Pro's instrument inputs sound
> clearer than the Ultralite AVB -- but keep in mind the direct monitoring
> issue). The Babyface Pro has some quirks when using it with GNU/Linux
> (which I think are caused by the 2 channel mode it has for iOS), but the
> Ultralite AVB has different quirks.
>
> As discussed on this list previously, there are some oddities trying to
> set the Ultralite AVB's sample rate. This seems to cause some issues
> with PulseAudio. If I start PulseAudio with the Ultralite AVB plugged
> in, it works briefly but randomly drops out. When I plug in the
> Ultralite AVB after PulseAudio is started, it does not appear as an
> output for PulseAudio and I see this in PulseAudio's output:
>
> E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
> E: [pulseaudio] module.c: Failed to load module "module-alsa-card"
> (argument: "device_id="1"
> name="usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
> card_name="alsa_card.usb-MOTU_UltraLite_AVB_0001f2fffe005a12-00"
> namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no
> deferred_volume=yes use_ucm=yes
> card_properties="module-udev-detect.discovered=1""): initialization failed.
>
> Occasionally I also see this in the output when I start PulseAudio with
> it plugged in already. This seems to appear randomly and is not
> correlated with PulseAudio output dropping out:
> E: [alsa-sink-USB Audio] alsa-sink.c: ALSA woke us up to write new data
> to the device, but there was actually nothing to write.
> E: [alsa-sink-USB Audio] alsa-sink.c: Most likely this is a bug in the
> ALSA driver 'snd_usb_audio'. Please report this issue to the ALSA
> developers.
> E: [alsa-sink-USB Audio] alsa-sink.c: We were woken up with POLLOUT set
> -- however a subsequent snd_pcm_avail() returned 0 or another value <
> min_avail.
>
> Sometimes it looks like PulseAudio tries to set the Ultralite AVB to a
> different sample rate. I sometimes notice the LCD display on the
> Ultralite AVB showing 192 kHz when PulseAudio tries to use it. I tried
> setting this in /etc/pulse/daemon.conf:
>
> default-sample-rate = 44100
>
> but it made no difference.
>
> So I have tried using JACK regularly with the PulseAudio to JACK bridge.
> Unfortunately this has some quirks too. JACK won't start unless I wait
> several seconds after plugging in the Ultralite AVB. If the Ultralite
> AVB is plugged in when I boot up and log into KDE, QJackCtl autostarting
> JACK doesn't work. I think this is because PulseAudio tries to grab the
> device before JACK starts. I have to wait a few seconds and manually
> start JACK. If the Ultralite AVB's firmware is set to a different sample
> rate than JACK is configured for, JACK won't start.
>
> Has anyone contacted MOTU about the sample rate switching issue? Ideally
> they could make it just work when the computer tells the audio interface
> to switch sample rates.
>
> Also, has anyone contacted them about possibly changing the firmware so
> the web interface is available over USB on Linux? I think if they used
> the RNDIS Ethernet-over-USB protocol that Android uses for tethering it
> could be plug-and-play with Linux. Or has anyone started working on a
> custom driver to make this work? In the meantime I got a cheap little
> GL-MT300A router ( http://www.gl-inet.com/mt300a/ ) to use the web
> control interface away from my home network. It's neat. :)
> _______________________________________________
> Linux-audio-user mailing list
> [hidden email]
> https://lists.linuxaudio.org/listinfo/linux-audio-user
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: MOTU AVB series sample rate issue, JACK, and PulseAudio

Peter P.-2
In reply to this post by Be
* Be <[hidden email]> [2017-09-19 19:26]:
[...]
> Do you mean why bother with the web interface over USB? So I don't need a
> router to use the web interface at a gig. At home it's no problem to leave
> an Ethernet cable plugged in. I've tried plugging an Ethernet cable directly
> from the Ultralite AVB to my laptop but that doesn't work.
I got this kind of setup to work. I am issuing
        sudo ifconfig eth0 up 192.168.1.2
on my laptop and set the Motu Interface to 192.168.1.3 (i think, as I am
not next to it right now). I can then point my browser to its web
application mixer.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user