[Linux] DaVinci Resolve monopolising audio output

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Bink19th

  • Posts: 36
  • Joined: Tue Jun 19, 2018 6:24 am
  • Real Name: David Armstrong

[Linux] DaVinci Resolve monopolising audio output

PostThu Apr 29, 2021 2:43 am

I'll open with understanding that CentOS is the official Linux distribution supported by DaVinci Resolve and that my issue may be related to my choice to use something else (EndeavourOS / Arch Linux). I hope to understand what might be considered normal (eg: expected CentOS behaviour), whilst fishing for thoughts from users of any Linux distro who may have hit the same issue.

I'm able to playback audio from multiple applications simultaneously, such as VLC, Dragon Player, web browser. None monopolise audio output.

DaVinci Resolve plays differently though:
  • If an application is playing audio before DaVinci Resolve starts, DaVinci Resolve will not output audio until audio is stopped in the other application.
  • If DaVinci Resolve is able to play audio, it will monopolise audio output on the whole system, until DaVinci Resolve is closed completely. That is, I can't playback audio in any other application.

This presents a hurdle if I want to edit a sound file externally, or check sound/video files, or hey even listening to music while working.
Ryzen 9 5900X 64GB RAM, NVidia RTX A4000, EndeavourOS
Davinci Resolve Studio 19.1.3 BUILD 7
Offline

smunaut

  • Posts: 524
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: [Linux] DaVinci Resolve monopolising audio output

PostThu Apr 29, 2021 7:04 am

Resolve uses ALSA directly and only one app can have a given ALSA pcm device open at once.

The way you can have multiple apps playing sound on linux is :
- Instead of having app using the "hw" ALSA device, you can have virtual devices that will handle software mixing down to the actual hw devices.
- Or use a sound server, like Pulse Audio which is pretty common on distribution nowadays. In that case, PulseAudio will access ALSA and offers a custom API for apps to talk to Pulse. This requires application to be written _for_ PulseAudio.

Now obviously having apps needing to be rewritten for PulseAudio isn't super practical so there is a PulseAudio module that offers ALSA emulation, basically presenting an ALSA compatible interface to the apps (the app think it's talking to a hw device through ALSA but in reality it's talking to the sound server).

And then you need to have your system setup so that the default alsa device is this emulation layer so that any app that's not aware of PulseAudio will use it instead of the real hw card. At least on my ubuntu setup that's what's done by default, it seems that on yours it's not the case.
Resolve Studio - Ryzen 5800X3D - AMD RX6600 / NVidia RTX 4070 (switching between the 2) - Linux
Offline

Bink19th

  • Posts: 36
  • Joined: Tue Jun 19, 2018 6:24 am
  • Real Name: David Armstrong

Re: [Linux] DaVinci Resolve monopolising audio output

PostFri Apr 30, 2021 4:59 am

smunaut wrote:...there is a PulseAudio module that offers ALSA emulation, basically presenting an ALSA compatible interface to the apps (the app think it's talking to a hw device through ALSA but in reality it's talking to the sound server)...


Thank you for this. It's given me an avenue to explore.

PulseAudio is installed under EndeavourOS and the virtual output device is active, but something must still be amiss. The theory you've provided is helpful though and I know what to look for now, much appreciated.
Ryzen 9 5900X 64GB RAM, NVidia RTX A4000, EndeavourOS
Davinci Resolve Studio 19.1.3 BUILD 7
Offline

Bink19th

  • Posts: 36
  • Joined: Tue Jun 19, 2018 6:24 am
  • Real Name: David Armstrong

Re: [Linux] DaVinci Resolve monopolising audio output

PostMon May 03, 2021 3:29 am

@smunaut was on the money with this.

Under EndeaverOS, I did two things to put into practice what Sylvain suggested.

1. I installed pulseaudio-alsa. Details as to why its needed can be found here.
2. I created the file /etc/asound.conf with the following content:
Code: Select all
pcm.!default pulse
ctl.!default pulse

3. Rebooted (may not be necessary, but I did anyway).

The Arch Linux Wiki (completely relevant to EndeavourOS) actually addresses this precise issue with DaVinci Resolve, and contains other useful tips too:
https://wiki.archlinux.org/title/DaVinci_Resolve#No_audio_during_video_preview
Ryzen 9 5900X 64GB RAM, NVidia RTX A4000, EndeavourOS
Davinci Resolve Studio 19.1.3 BUILD 7

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], nicepost, Pquigley25 and 210 guests