I was able to get working my Motu 16A under linux 6.7.7 using the following patch applied to the kernel:
Code: Select all
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 6ec95b2ed..c3dbc9c16 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -91,9 +91,10 @@ struct snd_usb_endpoint {
struct snd_usb_packet_info {
uint32_t packet_size[MAX_PACKS_HS];
int packets;
- } next_packet[MAX_URBS];
+ } next_packet[MAX_URBS + 2];
unsigned int next_packet_head; /* ring buffer offset to read */
unsigned int next_packet_queued; /* queued items in the ring buffer */
+ unsigned int startup_wait_urbs; /* number of capture URBS - 1 before starting playback for implicit feedback */
struct list_head ready_playback_urbs; /* playback URB FIFO for implicit fb */
unsigned int nurbs; /* # urbs */
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index a676ad093..90b8875bf 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -180,7 +180,8 @@ static bool uac_clock_source_is_valid_quirk(struct snd_usb_audio *chip,
* Sample rate changes takes more than 2 seconds for this device. Clock
* validity request returns false during that period.
*/
- if (chip->usb_id == USB_ID(0x07fd, 0x0004)) {
+ if (chip->usb_id == USB_ID(0x07fd, 0x0004) ||
+ chip->usb_id == USB_ID(0x07fd, 0x0005)) {
count = 0;
while ((!ret) && (count < 50)) {
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 8f65349a0..91c99674b 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -468,8 +468,10 @@ int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
int err, i;
spin_lock_irqsave(&ep->lock, flags);
- if ((!implicit_fb || ep->next_packet_queued > 0) &&
+ if ((!implicit_fb || ep->next_packet_queued > ep->startup_wait_urbs) &&
!list_empty(&ep->ready_playback_urbs)) {
+ /* once started stop waiting */
+ ep->startup_wait_urbs = 0;
/* take URB out of FIFO */
ctx = list_first_entry(&ep->ready_playback_urbs,
struct snd_urb_ctx, ready_list);
@@ -1588,7 +1590,9 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)
if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
!(ep->chip->quirk_flags & QUIRK_FLAG_PLAYBACK_FIRST)) {
- usb_audio_dbg(ep->chip, "No URB submission due to implicit fb sync\n");
+ printk(KERN_INFO "MOTU Patch - 6.0.3");
+ usb_audio_dbg(ep->chip, "Delaying URB submission due to implicit fb sync\n");
+ ep->startup_wait_urbs = ep->nurbs - 1;
i = 0;
goto fill_rest;
}
There are two issues with the motu avb devices family:
Sample rate cannot be changed too fast (and if is changed too fast there will be errors printed in dmesg)
Need of the wait of URB submission for implicit fb sync
For the first issue there is already workaround in the kernel for that, but is activated by default only for the MOTU MicroBook II device.
For the second issue - the patch was already provided in this thread for fixing it
Observation: by fixing implicit fb sync issue device cannot play any sound for ~ 2 seconds after it is opened/activated by software - but since DAWs are activating device for the entire time since DAW startup - that is absolutely no issue in the context of musical production usage. Also for the casual usage pulseaudio should be able to make the device always opened by disabling module module-suspend-on-idle.
I guess it should be possible to upstream that patch (and even add more supported devices from the avb family) by implementing proper device quirks, but I'm not a c programmer