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

aaf plugin not working raspberry pi cm4 #39

Open
steeley opened this issue Nov 9, 2021 · 5 comments
Open

aaf plugin not working raspberry pi cm4 #39

steeley opened this issue Nov 9, 2021 · 5 comments

Comments

@steeley
Copy link

steeley commented Nov 9, 2021

trying to send to the ALSA device aaf0. pI cm4 with kernel setup to support avb/tsn correctly.
(Linux cm432 5.10.76-v7l-AVB_KERNEL+ #3 SMP Sat Nov 6 22:50:41 GMT 2021 armv7l GNU/Linux).

PCIe i210 network card is the interface set up correctly according to: https://tsn.readthedocs.io/avb.html

Error is:
`sudo speaker-test -p 2500 -F S16_BE -c 2 -r 48000 -D aaf0

speaker-test 1.1.9

Playback device is aaf0
Stream parameters are 48000Hz, S16_BE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 1 to 206158430
Period size range from 0 to 206158431
Requested period time 2500 us
Periods = 4
was set period_size = 120
was set buffer_size = 480
0 - Front Left
ALSA lib pcm_aaf.c:670:(aaf_tx_pdu) Failed to send AAF PDU
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error
`

@perexg
Copy link
Member

perexg commented Nov 9, 2021

It's an error from the sendmsg syscall. See https://github.com/alsa-project/alsa-plugins/blob/master/aaf/pcm_aaf.c#L668 .

@steeley
Copy link
Author

steeley commented Nov 10, 2021

yes thanks. I'm trying to find why aaf->pdu_size is wrong size but no clue why.

@petipok
Copy link

petipok commented Nov 30, 2021

Hello,
I have the same error when starting the talker, using the following command:
speaker-test -F S16_BE -c 2 -r 48000 -D aaf0 -p 12500

The strange thing is that by monitoring the traffic on the interface with Wireshark, I can see a few (~100) AVB packages, so something is transmitted before throwing the error.

My frames_per_pdu is set to 6 that gives 125 microseconds at 48kHz sampling rate, so the 12500 microseconds period time should be fine, I don't get why this plugins throws this error.

Any idea?

@karno-ian
Copy link

don't know. - never got this to work. Assume it doesn't work and is just broken

@aditpape
Copy link
Contributor

aditpape commented Jun 8, 2022

ALSA lib pcm_aaf.c:670:(aaf_tx_pdu) Failed to send AAF PDU

The return value/errno of sendmsg() syscall itself is of interest here.
It may return an error (likely non-recoverable) or signal a 'partial write' (if possible in that setup..) which can be handled with a loop around sendmsg() until all data is accepted by socket.

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

5 participants