Skip to content

Why does the ALSA AAF plugin transmit more than 96,000 AVTP packets per second? #334

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions