mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: hw: do not reset tstamp_type in SND_PCM_APPEND mode
When the first client of plugins such as dshare open the hw device they set a default tstamp_type in snd_pcm_direct_initialize_slave based on tstamp_type from the config file. But when subsequent clients open the same plugin the snd_pcm_hw_open_fd function clobbers this default. Closes: https://github.com/alsa-project/alsa-lib/pull/450 Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
a4e47461ec
commit
7e01443ecc
1 changed files with 18 additions and 16 deletions
|
|
@ -1665,6 +1665,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(mode & SND_PCM_APPEND)) {
|
||||||
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
|
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
|
||||||
if (SNDRV_PROTOCOL_VERSION(2, 0, 9) <= ver) {
|
if (SNDRV_PROTOCOL_VERSION(2, 0, 9) <= ver) {
|
||||||
struct timespec timespec;
|
struct timespec timespec;
|
||||||
|
|
@ -1687,6 +1688,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hw = calloc(1, sizeof(snd_pcm_hw_t));
|
hw = calloc(1, sizeof(snd_pcm_hw_t));
|
||||||
if (!hw) {
|
if (!hw) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue