diff --git a/meson.build b/meson.build index 87d65edb2..6fe45ac9c 100644 --- a/meson.build +++ b/meson.build @@ -98,7 +98,7 @@ common_flags = [ cc_flags = common_flags + [ '-D_GNU_SOURCE', - '-DFASTPATH', + # '-DFASTPATH', # '-DSPA_DEBUG_MEMCPY', '-Werror=implicit-function-declaration', '-Werror=int-conversion', diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 356778e90..f5e0edafc 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -1529,6 +1529,7 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_ state->have_format, state->started); state->use_mmap = !state->disable_mmap; + state->force_position = false; switch (fmt->media_subtype) { case SPA_MEDIA_SUBTYPE_raw: @@ -1591,6 +1592,7 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_ IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO, IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER, 0, aes3); + state->force_position = true; break; } case SPA_MEDIA_SUBTYPE_dsd: @@ -2378,7 +2380,8 @@ static inline int check_position_config(struct state *state) if (SPA_UNLIKELY((pos = state->position) == NULL)) return 0; - if (state->disable_tsched && state->started && !state->following) { + if (state->force_position || + (state->disable_tsched && state->started && !state->following)) { target_duration = state->period_frames; target_rate = SPA_FRACTION(1, state->rate); pos->clock.target_duration = target_duration; diff --git a/spa/plugins/alsa/alsa-pcm.h b/spa/plugins/alsa/alsa-pcm.h index 4027c72be..92b355794 100644 --- a/spa/plugins/alsa/alsa-pcm.h +++ b/spa/plugins/alsa/alsa-pcm.h @@ -219,6 +219,7 @@ struct state { unsigned int auto_link:1; unsigned int linked:1; unsigned int is_batch:1; + unsigned int force_position:1; uint64_t iec958_codecs;