Why does the ALSA AAF plugin transmit more than 96,000 AVTP packets per second?
GitHub issues - opened <[email protected]>
| Newsgroups | org.alsa-project.alsa-devel |
|---|---|
| Message-ID | <[email protected]> |
alsa-project/alsa-utils issue #334 was opened from liuyq0509-ux:
Question
I'm using an ALSA AAF PCM plugin to transmit audio over AVTP.
My audio configuration is:
Sample rate: 48000 Hz
Format: S16_BE
Channels: 2
frames_per_pdu: 12
According to my understanding, frames_per_pdu = 12 means each AVTP AAF packet contains 12 audio frames.
Therefore, the expected packet rate should be:
48000 / 12 = 4000 packets/s
However, when I run:
speaker-test -p 25000 \
-F S16_BE \
-c 2 \
-r 48000 \
-D aaf0
and capture the traffic with tcpdump, I see more than 96,000 AVTP packets per second.
This is much higher than the expected 4,000 packets/s.
For example:
Expected:
48000 frames/s / 12 frames/PDU = 4000 AVTP packets/s
Observed:
> 96000 AVTP packets/s
I would like to understand where this packet transmission rate is coming from.
Questions
Does speaker-test control the actual AVTP packet transmission rate?
Is speaker-test -p 25000 related to the AVTP packet transmission interval, or does it only control the ALSA PCM period size?
With:
48 kHz
2 channels
frames_per_pdu = 12
should the AAF plugin normally transmit approximately:
4000 AVTP packets/s
regardless of the speaker-test period setting?
If I observe more than 96,000 packets/s, could the AAF plugin be sending the same audio data repeatedly, or could there be multiple packets generated for each ALSA frame/period?
What is the recommended way to determine which component controls the actual AVTP transmission timing — speaker-test, ALSA, or the AAF PCM plugin?
I have confirmed that the captured packets are AVTP AAF packets. I would appreciate any explanation of how the ALSA AAF plugin determines the AVTP packet transmission interval.
Issue URL : https://github.com/alsa-project/alsa-utils/issues/334
Repository URL: https://github.com/alsa-project/alsa-utils