pcm: dmix: fix sw_params handling of timestamp types in direct plugins

In pcms using direct plugins (dmix/dsnoop/dshare), the timestamp type could
be different from the terminating hw plugin, then the kernel driver.

Be sure such pcms have plugins using consistently the same timestamp type.

signed-off-by: Sylvain Bertrand <sylvain.bertrand@legeek.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
sylvain.bertrand@gmail.com 2020-04-15 00:44:39 +00:00 committed by Takashi Iwai
parent fb48ad9e4f
commit d12df1dc9c
9 changed files with 60 additions and 1 deletions

View file

@ -591,6 +591,7 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
dsnoop->ipc_key = opts->ipc_key;
dsnoop->ipc_perm = opts->ipc_perm;
dsnoop->ipc_gid = opts->ipc_gid;
dsnoop->tstamp_type = opts->tstamp_type;
dsnoop->semid = -1;
dsnoop->shmid = -1;
@ -780,6 +781,9 @@ pcm.name {
# roundup
# rounddown
# auto (default)
tstamp_type STR # timestamp type
# STR can be one of the below strings :
# default, gettimeofday, monotonic, monotonic_raw
slave STR
# or
slave { # Slave definition