Skip to contentSkip to conversation

Strange trigger_htstamp after snd_pcm_drop

DISCUSSION GitHub issues - reopened 1 participant 1 message Mar 11, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

alsa-project/alsa-lib issue #387 was reopened from z-s-e:

I have conceptually the following situation (actual code can be found [here](https://gitlab.com/z-s-e/alpe/-/blob/main/src/alpe_alsa.cpp?ref_type=heads#L590)):

```
// sound is currently playing
snd_pcm_status(pcm, pcm_status);
snd_pcm_status_get_htstamp(pcm_status, &ts1);
snd_pcm_drop(pcm);
snd_pcm_status(pcm, pcm_status);
snd_pcm_status_get_trigger_htstamp(status, &ts2);
```

On my hardware I get a ts2 timestamp that is earlier than ts1. From my understanding that should be impossible, as ts2 should contain the timestamp of when the drop happened, which should obviously be after ts1. Is that a bug or do I misunderstand the meaning of those timestamps?

Issue URL : https://github.com/alsa-project/alsa-lib/issues/387
Repository URL: https://github.com/alsa-project/alsa-lib