Closed Mystfit closed 2 years ago
I don't update with every change of the kernel. But in your case (kernel 5.4.0) the following may help:
in igb_main.c
change all occurences of
`
to
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
and in the function igb_io_error_detected
comment out (or delete) the whole part
#ifdef CONFIG_PCI_IOV
...
#endif /* CONFIG_PCI_IOV */
Thanks for that! I've gone through and commented out some other things to try and get this up and running but I've probably broken some things in the process.
My Motu Ultralite AVB can now see the AVB stream but I'm constantly getting new/join events which I'm unsure if that's indicative of a successful connection. Not sure if I've put the correct MAC addresses into avb-config.h
I'm using Carla to test the the input/output audio using ALSA but no sound is being received or transmitted back to the Motu yet.
/* configuration data for the AVB stream */
/* currently we use the locally administered MAAP MAC address base for our Talker stream */
#define MAAP_LOCALLY_ADMINISTRATORED_BASE 0x91e0f000fe00ul
#define OWN_TALKER_MAC_BASE MAAP_LOCALLY_ADMINISTRATORED_BASE
/* Set the MAC address of the i210 */
#define OWN_MAC 0x0007327b1af7ul
/* Note: The following can be drived by looking at the maap announce messages */
/* of the AVB device using wireshark (set the filter for maap) */
/* The MAC address of the remote AVB device */
#define AVB_DEVICE_SOURCE_MAC 0x0001f200ea90ul
/* The MAAP MAC address used by the AVB device for its Talker stream */
#define AVB_DEVICE_TALKER_MAC_BASE 0x91e0f000a2d5ul
The log from avb_up.sh
root@vstup-1:~# avb_up.sh enp5s0 48000
rmmod: ERROR: Module igb_avb is not currently loaded
driver: igb_avb
version: 5.3.2_AVB
firmware-version: 3.25, 0x800005d0
expansion-rom-version:
bus-info: 0000:05:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
Starting daemons on enp5s0
INFO : GPTP [00:42:51:651] gPTP starting
ERROR : GPTP [00:42:51:653] Using clock device: /dev/ptp2
STATUS : GPTP [00:42:51:653] Starting PDelay
process_events()
ERROR : GPTP [00:42:51:751] Error (TX) timestamping PDelay request, error=-72
STATUS : GPTP [00:42:52:198] LINKUP
STATUS : GPTP [00:42:52:199] Link Speed: 100000 kb/sec
STATUS : GPTP [00:42:53:244] AsCapable: Enabled
STATUS : GPTP [00:42:54:653] *** Announce Timeout Expired - Becoming Master
STATUS : GPTP [00:42:54:653] New Grandmaster "00:07:32:FF:FE:7B:1A:F7" (previous "00:00:00:00:00:00:00:00")
index=9
PARSE: C=6,P=3,V=0002
rc = 0, mrp_register_domain
PARSE: I=0002
rc = 0, mrp_join_vlan
Setting samplerate to 48000.
VNE 0002 R=000000000000 VN/MT
VNE 0002 R=000000000000 VN/MT
unhandled from mrpd
SJO D:C=6,P=3,V=0002,N=3 R=0001f200ea90 AA/IN
SJO D:C=6,P=3,V=0002,N=3 R=0001f200ea90 AA/IN
Done setting samplerate.
Mac: 00-07-32-7b-1a-f7
S+L:L=0001f200ea900000, D=2
rc = 0, done sending ready
rc = 0, advertising stream
PARSE: L=0001f200ea900000, D=2
PARSE: S=0007327b1af70000,A=91e0f000fe00,V=0002,Z=224,I=1,P=112,L=95
SNE L:D=2,S=0001f200ea900000 R=000000000000 VN/MT
EVENT on STREAM ID=0001f200ea900000 with state ready
got a new/join indication
listener:
mode JOIN
stream: 0001f200ea900000
listener: 000000000000
SNE L:D=2,S=0001f200ea900000 R=000000000000 VN/MT
SNE T:S=0007327b1af70000,A=91e0f000fe00,V=0002,Z=224,I=1,P=112,L=95 R=000000000000 VN/MT
talker:
mode JOIN
stream: 0007327b1af70000
dst_mac: 91e0f000fe00
vid: 2
SNE T:S=0007327b1af70000,A=91e0f000fe00,V=0002,Z=224,I=1,P=112,L=95 R=000000000000 VN/MT
talker 1f2fffe00ea90, entity 732fffe7b1af7
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
EVENT on STREAM ID=0007327b1af70000 with state ready
got a new/join indication
listener:
mode JOIN
stream: 0007327b1af70000
listener: 0001f200ea90
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
VNE 0002 R=0001f200ea90 AA/IN
VNE 0002 R=0001f200ea90 AA/IN
unhandled from mrpd
VNE 0002 R=0001f200ea90 QA/IN
VNE 0002 R=0001f200ea90 QA/IN
unhandled from mrpd
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
EVENT on STREAM ID=0007327b1af70000 with state ready
got a new/join indication
listener:
mode JOIN
stream: 0007327b1af70000
listener: 0001f200ea90
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
VNE 0002 R=0001f200ea90 QA/IN
VNE 0002 R=0001f200ea90 QA/IN
unhandled from mrpd
SNE T:S=0001f200ea900000,A=91e0f000a2d5,V=0002,Z=224,I=1,P=112,L=95 R=0001f200ea90 VO/IN
talker:
mode JOIN
stream: 0001f200ea900000
dst_mac: 91e0f000a2d5
vid: 2
SNE T:S=0001f200ea900000,A=91e0f000a2d5,V=0002,Z=224,I=1,P=112,L=95 R=0001f200ea90 VO/IN
VNE 0002 R=0001f200ea90 QA/IN
VNE 0002 R=0001f200ea90 QA/IN
unhandled from mrpd
SNE T:S=0001f200ea900000,A=91e0f000a2d5,V=0002,Z=224,I=1,P=112,L=95 R=0001f200ea90 VO/IN
talker:
mode JOIN
stream: 0001f200ea900000
dst_mac: 91e0f000a2d5
vid: 2
SNE T:S=0001f200ea900000,A=91e0f000a2d5,V=0002,Z=224,I=1,P=112,L=95 R=0001f200ea90 VO/IN
VJO 0002 R=0001f200ea90 QA/IN
VJO 0002 R=0001f200ea90 QA/IN
unhandled from mrpd
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
EVENT on STREAM ID=0007327b1af70000 with state ready
got a new/join indication
listener:
mode JOIN
stream: 0007327b1af70000
listener: 0001f200ea90
SNE L:D=2,S=0007327b1af70000 R=0001f200ea90 VO/IN
VNE 0002 R=0001f200ea90 AA/IN
...
That's odd. after the VJO you should only get VJO and SJO instead of VNE and SNE.
Do you see any activity for AVB-0 in the Motu routing matrix when trying to playback anything through alsa ?
My apologies, I managed to get audio going but it was an unrelated issue! I was routing audio from the Motu to Carla, but I've done further testing with Audacity and managed to get it to both record audio and playback on the Motu. So it's my Carla routing that is the issue.
In the ALSA audio driver device picker in Carla, I have either 2 or 3 instances (it changes) of hw:AVB,0
show up but regardless of which one I pick, I can't send or receive audio.
In comparison, audacity gives me a list of
AVB: - (hw:1,0)
AVB: - (hw:3,0)
AVB: - (hw:4,0)
but I can only record and play on AVB: - (hw:3,0)
Ok, I managed to get audio working in Carla using PulseAudio using the last AVB device that showed up in the input and output device lists. Sound is generally fine, but every several seconds there is a loud click which sounds like a single sample out of place.
You can set the PRESENTATION_TIME_OFFSET (wich means added latency) in alsa.c to a higher value. Probably start at 1000000 (1ms). Also, if you use a kernel with threaded irqs, set the threat priority of the NICs tx/rx-0 irq thread to a high value (e,g, 80).
Closing this issue as the original problem was fixed by dropping the version numbers for some kernel version checks down to 5.4 I've circumvented this by installing the latest Ubuntu Studio. Still haven't fixed the clicks yet but that's not related to this issue.
I'm trying to build this but I'm getting a few compiler errors in the igb library.
Most errors seem to relate to
skb_frag_
structs being incompatible pointer types. Am I missing a dependency?Machine: Up Core Plus x86-64 single-board computer OS: Ubuntu 20.04 Compiler gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1\~20.04) Kernel: Linux vstup-1 5.4.0-1-generic #0~upboard5-Ubuntu SMP Fri Jan 7 11:53:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Ethernet: Intel i210 Ethernet controller on a Net Core Plus daughter board
Make log: