Closed sinlam closed 3 years ago
Hi @sinlam,
Can you describe the issues you are facing? I'd expect that anything after 19.10 would Just Work (TM).
Hi @edersondisouza, Thanks for your message. I tried to install AVB in Ubuntu 20.04.2, after installed alsa-lib with the git version v1.1.9, immediately after reboot my sound output device become Dummy Output.
If I use the latest source for alsa-lib, alsa-utils and alsa-plugins, the sound device is ok. But I encountered no tone heard in the AVB Audio Talker/Listener Example using Alsa Framework.
I also tried AVB Video Talker/Listener Example using Gstreamer Framework using single machine only, no video is displayed in the listener screen. Do I need to install VLC or other software?
Can I check if the examples will work in single machine with Intel i210 card? Hope to hear your suggestion! Thank you!
Hi,
Just to be clear, is your setup a single machine, or two machines and just one with the i210? Assuming the second scenario, you can test using the i210 one as talker. But note that you won't get PTP to sync both machines. For a single machine, options are quite limited.
Hi @edersondisouza, My setup is two machines (Intel NUC Hades Canyon and Ghost Canyon), each machine has two network ports: i210 port and i219 port. I tried Debian 10 with Kernel 4.19 and use only Console login without UI for both machines. I installed Alsa Plugin and GStreamer Plugin (gstreamer, gst-plugins-base, gst-plugins-bad, gst-plugins-good, gst-plugins-ugly, gst-libav, gst-vaapi, gstreamer-vaapi) from source. Tested aplay and the sound is detected.
The two machines connected to my router using i219 ports, and connect to each other using network cable on i210 ports. For each machine, I setup static IP for i210 port, create VLAN 5 with another static IP. Then I setup Qdiscs configuration from the documentation. PTP Time synchronization using PTP is working for the two machines.
When I tried to run AVB Audio Talker/Listener Examples using Alsa Framework, the 'speaker-test' and 'arecord/aplay' run fine but I cannot hear the sound in the listener machine.
I also tried to run AVB Audio Talker/Listener Examples using GStreamer Framework, both 'gst-launch-1.0' run fine but I cannot hear the sound in the listener machine.
Finally I tried AVB Video Talker/Listener Examples using GStreamer Framework, the talker 'gst-launch-1.0' run fine, but the listener failed to run because 'vaapih264dec' is not found. I changed it to 'avdec_h264' and there is a core dump.
So I failed to run all 3 examples, hope you can give some hints how to fix these issues. Thank you!
Hi @sinlam,
Thanks for the description of your setup. It does look that it indeed should be able to run the samples. Note that the examples are on layer 2, so no need for the IP layer for them.
Some tests that can help bring more light on what is going on:
GST_DEBUG=avtp*:6 sudo -E gst-launch-1.0 (...)
?Hi @edersondisouza, Sorry for the late reply as I only have some time to troubleshoot it during the weekend. Below is the tests of the log that is running with GST_DEBUG=avtp*:6 sudo -E gst-launch-1.0 (...), and I also skip ETF setup step on both the talker/listener. I got the same result, i.e. no audio is heard from the Listener host. Please let me know what I can do further test. Thank you!
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.1 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::56b2:3ff:fe94:313d prefixlen 64 scopeid 0x20<link>
ether 54:b2:03:94:31:3d txqueuelen 1000 (Ethernet)
RX packets 2815 bytes 191464 (186.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1859485 bytes 159688316 (152.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xdc100000-dc11ffff
enp5s0.5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::56b2:3ff:fe94:313d prefixlen 64 scopeid 0x20<link>
ether 54:b2:03:94:31:3d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1840715 bytes 158301386 (150.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@HadesCanyon:~# tc qdisc show dev enp5s0
qdisc mqprio 6666: root tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2
queues:(0:0) (1:1) (2:3)
qdisc cbs 8888: parent 6666:2 hicredit 12 locredit -113 sendslope -996352 idleslope 3648 offload 1
qdisc pfifo 0: parent 8888: limit 1000p
qdisc pfifo 0: parent 7777: limit 1000p
qdisc pfifo_fast 0: parent 6666:4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent 6666:3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc cbs 7777: parent 6666:1 hicredit 153 locredit -1389 sendslope -901312 idleslope 98688 offload 1
root@HadesCanyon:~# GST_DEBUG=avtp*:6 sudo -E gst-launch-1.0 clockselect. \( clock-id=realtime \
audiotestsrc samplesperbuffer=12 is-live=true ! \
audio/x-raw,format=S16BE,channels=2,rate=48000 ! \
avtpaafpay mtt=50000000 tu=1000000 streamid=0xAABBCCDDEEFF000B processing-deadline=0 ! \
avtpsink ifname=enp5s0.5 address=54:b2:03:94:31:3d priority=2 processing-deadline=0 \)
0:00:00.012499175 756 0x55d534cfa580 DEBUG avtpbasepayload gstavtpbasepayload.c:163:gst_avtp_base_payload_set_property:<avtpaafpay0> prop_id 2
0:00:00.012520899 756 0x55d534cfa580 DEBUG avtpbasepayload gstavtpbasepayload.c:163:gst_avtp_base_payload_set_property:<avtpaafpay0> prop_id 3
0:00:00.012548973 756 0x55d534cfa580 DEBUG avtpbasepayload gstavtpbasepayload.c:163:gst_avtp_base_payload_set_property:<avtpaafpay0> prop_id 1
0:00:00.012556660 756 0x55d534cfa580 DEBUG avtpbasepayload gstavtpbasepayload.c:163:gst_avtp_base_payload_set_property:<avtpaafpay0> prop_id 4
0:00:00.012628325 756 0x55d534cfa580 DEBUG avtpsink gstavtpsink.c:173:gst_avtp_sink_set_property:<avtpsink0> prop_id 1
0:00:00.012637581 756 0x55d534cfa580 DEBUG avtpsink gstavtpsink.c:173:gst_avtp_sink_set_property:<avtpsink0> prop_id 2
0:00:00.012657472 756 0x55d534cfa580 DEBUG avtpsink gstavtpsink.c:173:gst_avtp_sink_set_property:<avtpsink0> prop_id 3
Setting pipeline to PAUSED ...
0:00:00.014099911 756 0x55d534cfa580 DEBUG avtpsink gstavtpsink.c:315:gst_avtp_sink_start:<avtpsink0> AVTP sink started
0:00:00.014148006 756 0x55d534cfa580 DEBUG avtpaafpay gstavtpaafpay.c:199:gst_avtp_aaf_pay_change_state:<avtpaafpay0> transition 10
0:00:00.014180194 756 0x55d534cfa580 DEBUG avtpaafpay gstavtpaafpay.c:199:gst_avtp_aaf_pay_change_state:<avtpaafpay0> transition 19
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.014445718 756 0x55d534cfa580 DEBUG avtpaafpay gstavtpaafpay.c:199:gst_avtp_aaf_pay_change_state:<avtpaafpay0> transition 28
0:00:00.014453578 756 0x55d534cfbc00 DEBUG avtpaafpay gstavtpaafpay.c:383:gst_avtp_aaf_pay_sink_event:<avtpaafpay0> event stream-start
0:00:00.014466397 756 0x55d534cfbc00 DEBUG avtpbasepayload gstavtpbasepayload.c:217:gst_avtp_base_payload_sink_event:<avtpaafpay0> event stream-start
New clock: DebugGstSystemClock
0:00:00.014554437 756 0x55d534cfbc00 DEBUG avtpaafpay gstavtpaafpay.c:383:gst_avtp_aaf_pay_sink_event:<avtpaafpay0> event caps
0:00:00.014567492 756 0x55d534cfbc00 DEBUG avtpaafpay gstavtpaafpay.c:372:gst_avtp_aaf_pay_new_caps:<avtpaafpay0> channels 2, depth 16, rate 48000, format S16BE
0:00:00.015230031 756 0x55d534cfbc00 DEBUG avtpaafpay gstavtpaafpay.c:383:gst_avtp_aaf_pay_sink_event:<avtpaafpay0> event segment
0:00:00.015237496 756 0x55d534cfbc00 DEBUG avtpbasepayload gstavtpbasepayload.c:217:gst_avtp_base_payload_sink_event:<avtpaafpay0> event segment
0:00:00.015263190 756 0x55d534cfbc00 DEBUG avtpaafpay gstavtpaafpay.c:383:gst_avtp_aaf_pay_sink_event:<avtpaafpay0> event tag
0:00:00.015289577 756 0x55d534cfbc00 DEBUG avtpbasepayload gstavtpbasepayload.c:217:gst_avtp_base_payload_sink_event:<avtpaafpay0> event tag
0:00:00.015327928 756 0x55d534cfbc00 DEBUG avtpbasepayload gstavtpbasepayload.c:246:gst_avtp_base_payload_calc_ptime:<avtpaafpay0> latency 0:00:00.000250000
Redistribute latency...
0:00:13.5 / 99:99:99.
enp112s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.2 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a6ae:11ff:fe1e:557e prefixlen 64 scopeid 0x20<link>
ether a4:ae:11:1e:55:7e txqueuelen 1000 (Ethernet)
RX packets 19441 bytes 1452210 (1.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2956 bytes 201308 (196.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0x6e100000-6e17ffff
enp112s0.5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a6ae:11ff:fe1e:557e prefixlen 64 scopeid 0x20<link>
ether a4:ae:11:1e:55:7e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 936 (936.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@GhostCanyon:~# tc qdisc show dev enp112s0
qdisc mqprio 6666: root tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2
queues:(0:0) (1:1) (2:3)
qdisc cbs 8888: parent 6666:2 hicredit 12 locredit -113 sendslope -996352 idleslope 3648 offload 1
qdisc pfifo 0: parent 8888: limit 1000p
qdisc pfifo 0: parent 7777: limit 1000p
qdisc pfifo_fast 0: parent 6666:4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent 6666:3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc cbs 7777: parent 6666:1 hicredit 153 locredit -1389 sendslope -901312 idleslope 98688 offload 1
root@GhostCanyon:~# GST_DEBUG=avtp*:6 sudo -E gst-launch-1.0 clockselect. \( clock-id=realtime avtpsrc ifname=enp112s0.5 address=a4:ae:11:1e:55:7e ! queue max-size-buffers=0 max-size-time=0 ! avtpaafdepay streamid=0xAABBCCDDEEFF000B ! audioconvert ! autoaudiosink \)
0:00:00.007202561 887 0x5599518b6090 DEBUG avtpsrc gstavtpsrc.c:158:gst_avtp_src_set_property:<avtpsrc0> prop_id 1
0:00:00.007217201 887 0x5599518b6090 DEBUG avtpsrc gstavtpsrc.c:158:gst_avtp_src_set_property:<avtpsrc0> prop_id 2
0:00:00.007529569 887 0x5599518b6090 DEBUG avtpbasedepayload gstavtpbasedepayload.c:142:gst_avtp_base_depayload_set_property:<avtpaafdepay0> prop_id 1
Setting pipeline to PAUSED ...
0:00:00.140164386 887 0x5599518b6090 DEBUG avtpsrc gstavtpsrc.c:250:gst_avtp_src_start:<avtpsrc0> AVTP source started
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
0:00:00.140828613 887 0x559951887c00 DEBUG avtpbasedepayload gstavtpbasedepayload.c:178:gst_avtp_base_depayload_sink_event:<avtpaafdepay0> event stream-start
Setting pipeline to PLAYING ...
0:00:00.141083325 887 0x559951887c00 DEBUG avtpbasedepayload gstavtpbasedepayload.c:178:gst_avtp_base_depayload_sink_event:<avtpaafdepay0> event caps
New clock: DebugGstSystemClock
Hi,
Note that the address
parameter usually describes the multicast address that both Talkers and Listeners join to transmit some stream. However, you are defining each machine own MAC address - so, each is roughly listening/talking to itself. Try removing the address
parameter altogether - avtpsink
and avtpsrc
will simply fallback to multicast address 01:AA:AA:AA:AA:AA
and things should just work. In case you want to define your own multicast address, I suggest taking a look at https://en.wikipedia.org/wiki/Multicast_address#Ethernet.
If you want to use unicast address, then you should, on the talker, give the address to the listeners - and on the listener, use it's own address - but you usually don't want to do that, as it has some implications when using routers along the way.
Hi @edersondisouza, thank you for the detailed explaination. It really helps! Now I can run both Talker / Listener example using ALSA framework and GStreamer plugins. Thank you for your time!
Regards, Sin Lam
May I know which Linux distribution should I use, to try the tutorial "Getting Started with AVB on Linux"? I tried Ubuntu 20 and faced some issues, the kernel version 5.8.0 is different from the document. Thanks for any info!