mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
parent
42418bece5
commit
771f71f622
3 changed files with 6 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ common_flags = [
|
||||||
|
|
||||||
cc_flags = common_flags + [
|
cc_flags = common_flags + [
|
||||||
'-D_GNU_SOURCE',
|
'-D_GNU_SOURCE',
|
||||||
'-DFASTPATH',
|
# '-DFASTPATH',
|
||||||
# '-DSPA_DEBUG_MEMCPY',
|
# '-DSPA_DEBUG_MEMCPY',
|
||||||
'-Werror=implicit-function-declaration',
|
'-Werror=implicit-function-declaration',
|
||||||
'-Werror=int-conversion',
|
'-Werror=int-conversion',
|
||||||
|
|
|
||||||
|
|
@ -1529,6 +1529,7 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
|
||||||
state->have_format, state->started);
|
state->have_format, state->started);
|
||||||
|
|
||||||
state->use_mmap = !state->disable_mmap;
|
state->use_mmap = !state->disable_mmap;
|
||||||
|
state->force_position = false;
|
||||||
|
|
||||||
switch (fmt->media_subtype) {
|
switch (fmt->media_subtype) {
|
||||||
case SPA_MEDIA_SUBTYPE_raw:
|
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_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO,
|
||||||
IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER,
|
IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER,
|
||||||
0, aes3);
|
0, aes3);
|
||||||
|
state->force_position = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPA_MEDIA_SUBTYPE_dsd:
|
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))
|
if (SPA_UNLIKELY((pos = state->position) == NULL))
|
||||||
return 0;
|
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_duration = state->period_frames;
|
||||||
target_rate = SPA_FRACTION(1, state->rate);
|
target_rate = SPA_FRACTION(1, state->rate);
|
||||||
pos->clock.target_duration = target_duration;
|
pos->clock.target_duration = target_duration;
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,7 @@ struct state {
|
||||||
unsigned int auto_link:1;
|
unsigned int auto_link:1;
|
||||||
unsigned int linked:1;
|
unsigned int linked:1;
|
||||||
unsigned int is_batch:1;
|
unsigned int is_batch:1;
|
||||||
|
unsigned int force_position:1;
|
||||||
|
|
||||||
uint64_t iec958_codecs;
|
uint64_t iec958_codecs;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue