2014-10-12 22:43:12 -04:00
---
2015-04-10 16:17:45 -04:00
layout: doc
2015-10-13 23:31:03 -04:00
title: External Audio
2015-10-28 18:14:40 -04:00
permalink: /doc/external-audio/
2015-10-11 03:04:59 -04:00
redirect_from:
2015-10-28 18:14:40 -04:00
- /en/doc/external-audio/
2015-10-11 03:04:59 -04:00
- /doc/ExternalAudio/
- /wiki/ExternalAudio/
2014-10-12 22:43:12 -04:00
---
Using External Audio Devices
============================
Why you want to use external audio devices
------------------------------------------
2018-02-07 06:14:34 -05:00
Qubes audio virtualization protocol does not implement latency reporting for security reasons, keeping the protocol as simple as possible.
Also, in a compromise between low latency and low CPU usage, latency may be around 200 ms.
So applications demanding higher audio quality (even Skype) need a better environment.
But Qubes flexibility fully allows that using external audio devices.
These are mostly USB audio cards, but firewire devices also might be used.
2014-10-12 22:43:12 -04:00
Implementing external audio devices
-----------------------------------
2018-02-07 06:14:34 -05:00
First you need to identify an user VM dedicated to audio and [assign a device ](/doc/AssigningDevices ) to it.
In the most common case the assigned device is the USB controller to which your USB audio card will be connected.
2014-10-12 22:43:12 -04:00
### Fedora VMs
In a terminal of the template from which you user VM depends, install pavucontrol with:
2015-09-26 19:00:33 -04:00
~~~
2018-02-07 06:14:34 -05:00
sudo dnf install pavucontrol
2015-09-26 19:00:33 -04:00
~~~
2014-10-12 22:43:12 -04:00
2014-10-12 22:56:23 -04:00
Close the template and start or restart your user VM, insert your external audio device, open a terminal and prepare pulseaudio to use it with:
2014-10-12 22:43:12 -04:00
2015-09-26 19:00:33 -04:00
~~~
2014-10-12 22:43:12 -04:00
sudo chmod a+rw /dev/snd/*
pactl load-module module-udev-detect
2015-09-26 19:00:33 -04:00
~~~
2014-10-12 22:43:12 -04:00
Start the audio application that is going to use the external audio device.
2018-02-07 06:14:34 -05:00
Launch pavucontrol, for example using "run command in VM" of Qubes Manager and select you external audio card in pavucontrol.
You need to do that only the first time you use a new external audio device, then pulse audio will remember you selection.
2014-10-12 22:49:40 -04:00
2018-02-07 06:14:34 -05:00
If you detach your external audio device, then want to insert it again (or want to change it with another one), you need to repeat the previous commands in terminal adding another line at the beginning:
2014-10-12 22:49:40 -04:00
2015-09-26 19:00:33 -04:00
~~~
2014-10-12 22:49:40 -04:00
pactl unload-module module-udev-detect
sudo chmod a+rw /dev/snd/*
pactl load-module module-udev-detect
2015-09-26 19:00:33 -04:00
~~~