Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: simple driver2driver network test #83

Open
neoscopio opened this issue May 13, 2022 · 7 comments
Open

Documentation: simple driver2driver network test #83

neoscopio opened this issue May 13, 2022 · 7 comments

Comments

@neoscopio
Copy link

Hi, I've looked at devices.md, and I'm missing a way to stream audio from aes67 virtual driver to another aes67 virtual driver.
I've setup two devices (a desktop and a raspeberry pi). Both sources show up in the respective web interfaces, but I cant get audio to play across network.
At this moment I can't run a dante controller, (I don't have a window machine right now) and I can't find another way to connect sources to sinks. I'm probably missing something, but is there a way to test this without using a controller, from the command line or web interface?

Also: can the "Buttler" thing from ravenna be used here?

Thanks

@bondagit
Copy link
Owner

First of all you need to have a PTP master clock running on the LAN.
Use the WebUI on both devices and make sure that the PTP status in the PTP tab is locked.
Then you need to configure a Sink. On one of the two devices (or on both) go to the Sink tab, click on the Plus (+) button, check on Use SDP and select the SDP file of the remote device.
Once you are done you have to run a playback on the Source device to activate the streaming that you can record on the Sink.
For example on the Source device you can run:
speaker-test -D plughw:RAVENNA -r 48000 -c 2 -t sine
to record on the Sink device you can use:
arecord -D plughw:RAVENNA -c 2 -f cd -d 30 -r 48000 -t wav sink.wav

@neoscopio
Copy link
Author

neoscopio commented May 18, 2022

Hi, couldn't get this to work. My guess is about the ptp clock not locking, but can't figure out why.

I started a master in a desktop with:
sudo ptp4l -i enp1s0 -m -l7 -S
I started a slave in the pi with:
sudo ptp4l -i eth0 -m -l7 -s -S

  • The Slave ppt show correctly locked to the master GMID (mac address)
  • The master ppt, allways shows MODE slave, STATUS unlocked, GMID 00-00-00-00-00-00-00-00
    Still, output from ppt4l seems ok
    If I reverse roles, its still the same.

Since slave is locked to the correct master, I've tried to go ahead anyway:

  • Started the drivers, checked: TIC frame size @1fs ; 48000 sample rate
  • Started a source on desktop L24, 48 1ms
  • Started a sink on the pi using SDP, desktop source appeared

Tried to play on the source, record on the pi, but arecord hangs and doesn't finish. [ctrl-c] to exit, sink.wav only 44 bytes.
Reversed roles, now arecord records 30sec of silence

Can you help?

@bondagit
Copy link
Owner

HI there,
by default you cannot run the master clock on the same board where you run the AES67 daemon, and you have to run ptp4l on a third board. The reason is that the original version of ptp4l disable the local multicast (it's possible tp patch it but you have to recompile it from the sources, see #34 )
On the boards where you run the daemon you don't need to run the ptp slave because it is embedded in the driver.
Before running playback/capture verify on the two boards using the WebUI that your PTP slave clock is locked otherwise it cannot work.

@neoscopio
Copy link
Author

neoscopio commented May 18, 2022

Ah! ok, I'll try that, thanks!

@neoscopio
Copy link
Author

So, it works, some problems:

In the source I did:
speaker-test -D plughw:RAVENNA -r 48000 -c 2 -t wave -l 4
to get the "Front Left","Front Right" repeated four times

In the sink (raspberry) I did:
arecord -D plughw:RAVENNA -c 2 -f cd --duration=30 -r 48000 -t wav sink.wav

then aplay sink.wav :

I notice a somewhat long silence on the start, then it starts playing OK, but the recording ends sooner, on the last "Front Right" stops after the "Front..." never recording the last "Right" word.

Is there an easy way for the driver to output directly to the plughw:1,0 (raspeberry headphone jack?), or alsa default sink, that in my case are the same?

Thanks!

@neoscopio
Copy link
Author

neoscopio commented May 19, 2022

Just tried to listening directly using:

sudo nice -n -10 alsaloop -c 2 -r 48000 -f S16_LE -C plughw:RAVENNA -P plughw:1,0

I hear some "clicks" not present in the recording, and the sound still ends sooner missing the last "Right" word.
(also tried with S32_LE)

@neoscopio
Copy link
Author

... I've managed to get rid of the "click" sounds, specifying "-b" option. I could also get a better flow using "-t" option with a greater latency, but I'm trying to get that to the bare minimum.

Still, I get these weird results, e.g:

aplay -D plughw:RAVENNA /usr/share/sounds/alsa/Side_Left.wav

It should be on the "LEFT side" of my headphones, but it plays on the "RIGHT" side. Still cuts the last word, as saying. "Side Le...". Same with the speakertest.

If I specify a buffer, like:

speaker-test -b1000 -D plughw:RAVENNA -r 48000 -c 2 -t wave -l 4

It gets to play to the end, but channels are still reversed.

Any ideas?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants