diff options
author | Mike Brady <mikebrady@eircom.net> | 2019-04-09 11:06:52 +0100 |
---|---|---|
committer | Mike Brady <mikebrady@eircom.net> | 2019-04-09 11:06:52 +0100 |
commit | 986f2fb4bdba5a79c14a930c44d3376e3549821c (patch) | |
tree | a57b126e1cc249aca881352ddac1c0a710b07753 /audio_alsa.c | |
parent | aac57c9cdc7ac209bcce7ba926af970a08cf3c16 (diff) |
hook up the alsa "use_precision_timing" option and update the sample conf file.
Diffstat (limited to 'audio_alsa.c')
-rw-r--r-- | audio_alsa.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/audio_alsa.c b/audio_alsa.c index 4987ee1..86016a3 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -533,6 +533,17 @@ int actual_open_alsa_device(void) { "length (%ld) you have chosen.", actual_buffer_length, config.audio_backend_buffer_desired_length); } + + + if (config.use_precision_timing == YNA_YES) + delay_and_status = precision_delay_and_status; + else if (config.use_precision_timing == YNA_AUTO) { + const char *output_device_name = snd_pcm_name(alsa_handle); + if (strstr(output_device_name,"hw:") == output_device_name) { + delay_and_status = precision_delay_and_status; + debug(1,"alsa: using precision timing"); + } + } if (alsa_characteristics_already_listed == 0) { alsa_characteristics_already_listed = 1; @@ -1702,7 +1713,7 @@ int precision_delay_available() { precision_delay_available_status = YNDK_NO; debug(2,"alsa: precision delay timing not available."); if (config.disable_standby_mode != disable_standby_off) - inform("Note: disable_standby_mode has been turned off because the output device \"%s\" does not support precision delay timing.", snd_pcm_name(alsa_handle)); + inform("Note: disable_standby_mode has been turned off because precision timing is not available.", snd_pcm_name(alsa_handle)); } } } |