Commit 92f54f0b authored by Max Kellermann's avatar Max Kellermann

output/alsa: disable DoP if it fails

parent ddce544b
...@@ -31,6 +31,7 @@ ver 0.20 (not yet released) ...@@ -31,6 +31,7 @@ ver 0.20 (not yet released)
- alsa: fix multi-channel order - alsa: fix multi-channel order
- alsa: remove option "use_mmap" - alsa: remove option "use_mmap"
- alsa: support DSD_U32 - alsa: support DSD_U32
- alsa: disable DoP if it fails
- jack: reduce CPU usage - jack: reduce CPU usage
- pulse: set channel map to WAVE-EX - pulse: set channel map to WAVE-EX
- recorder: record tags - recorder: record tags
......
...@@ -731,13 +731,25 @@ AlsaOutput::SetupOrDop(AudioFormat &audio_format, PcmExport::Params &params, ...@@ -731,13 +731,25 @@ AlsaOutput::SetupOrDop(AudioFormat &audio_format, PcmExport::Params &params,
Error &error) Error &error)
{ {
#ifdef ENABLE_DSD #ifdef ENABLE_DSD
if (dop && audio_format.format == SampleFormat::DSD) { Error dop_error;
if (dop && audio_format.format == SampleFormat::DSD &&
SetupDop(audio_format, params, dop_error)) {
params.dop = true; params.dop = true;
return SetupDop(audio_format, params, error); return true;
} }
#endif #endif
return AlsaSetup(this, audio_format, params, error); if (AlsaSetup(this, audio_format, params, error))
return true;
#ifdef ENABLE_DSD
if (dop_error.IsDefined())
/* if DoP was attempted, prefer returning the original
DoP error instead of the fallback error */
error = std::move(dop_error);
#endif
return false;
} }
inline bool inline bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment