ALSA AAF PCM: speaker-test reports "Write error: -32, Broken pipe" with -p option but works with -P option

GitHub issues - opened <[email protected]>
Newsgroups org.alsa-project.alsa-devel
Message-ID <[email protected]>
alsa-project/alsa-utils issue #333 was opened from liuyq0509-ux:

Hi everyone,

I am testing an ALSA AAF PCM plugin for AVTP audio streaming on an ARM development board. The PCM configuration is as follows:

```
pcm.aaf0 {
type aaf
ifname eth0.5
addr 01:AA:AA:AA:AA:AA
prio 2
streamid AA:BB:CC:DD:EE:FF:000B
mtt 50000
time_uncertainty 1000
frames_per_pdu 12
ptime_tolerance 100
}
```

When I run `speaker-test` with the following command:

`speaker-test -p 25000 -F S16_BE -c 2 -r 48000 -D aaf0`


The device is opened successfully and the hardware parameters are set:
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 25000 us
Periods = 4
was set period_size = 1200
was set buffer_size = 4800
0 - Front Left
Write error: -32, Broken pipe
Write error: -32, Broken pipe
Write error: -32, Broken pipe
...

However, if I change the command to use `-P`:

`speaker-test -P 480 -F S16_BE -c 2 -r 48000 -D aaf0`

The test runs normally without any `Broken pipe` errors:


layback 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
Periods = 480
was set period_size = 12000
was set buffer_size = 5760000
0 - Front Left
1 - Front Right
Time per period = 0.283478
0 - Front Left
1 - Front Right
Time per period = 0.242246

Does anyone know why `-p 25000` causes `Broken pipe` while `-P 480` works?

Could this be related to:
- ALSA buffer/period configuration?
- AAF plugin internal scheduling?
- AVTP packet timing requirements?
- PTP synchronization?
- CBS/QoS configuration?

Any suggestions would be appreciated. Thanks!

Issue URL     : https://github.com/alsa-project/alsa-utils/issues/333
Repository URL: https://github.com/alsa-project/alsa-utils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.