Software & AppsOperating SystemLinux

How To Enable Audio Passthrough with Pulseaudio/ALSA on Ubuntu 20.04 and Kodi

Ubuntu 9

In this article, we’ll explore how to enable audio passthrough with Pulseaudio/ALSA on Ubuntu 20.04 and Kodi. This process has changed with the release of Ubuntu 20.04, and we’ll guide you through the new steps to achieve this.

Quick Answer

To enable audio passthrough with Pulseaudio/ALSA on Ubuntu 20.04 and Kodi, you can use the Pulseaudio volume control GUI to configure the audio profiles and settings. Alternatively, you can create scripts to toggle Pulseaudio on and off. These solutions should help you achieve audio passthrough for a better audio experience.

What is Audio Passthrough?

Before we dive into the process, let’s understand what audio passthrough is. Audio passthrough is a feature that allows the source audio to bypass the processing of the device it’s being played on and be decoded by the receiver instead. This is particularly useful when you want to enjoy high-quality surround sound from your home theater system.

Using Pulseaudio with Audio Passthrough

One of the solutions to enable audio passthrough in Ubuntu 20.04 and Kodi is to use Pulseaudio. You can install the Pulseaudio volume control GUI and configure it as follows:

  1. Open the Pulseaudio volume control GUI: You can do this by searching for it in your applications menu or by running the command pavucontrol in the terminal.
  2. Go to the Configuration tab: Here, you’ll find various audio profiles for your device.
  3. Choose the profile “Digital Stereo (HDMI) Output”: Please note that you should not choose the surround options.
  4. Go to the Output Devices tab and click on Advanced: Here, select all the encoding options supported by your receiver.
  5. In Kodi, go to Settings – Player – Videos: Make sure “Sync playback to display” is disabled. This is because enabling it can interfere with audio passthrough.
  6. In Kodi, go to Settings – System – Audio: Here, you’ll need to adjust a few settings.
    • Set the audio output device to “Default, Default Output Device (PULSEAUDIO)”.
    • Set the number of channels to the appropriate value for your setup (e.g., “5.1”).
    • Set the output configuration to “Best match”.
    • Enable passthrough and make sure the relevant “capable receiver” settings are enabled.

Using Scripts to Toggle Pulseaudio

Another solution is to create scripts to toggle Pulseaudio on and off. This can be done by creating two scripts: one to turn Pulseaudio off and one to turn it on. Here’s an example:

  1. Create a script named “pulseoff.sh”: This script will stop the Pulseaudio service. Here’s the content of the script:
    #!/bin/bash
    systemctl --user stop pulseaudio.socket
    systemctl --user stop pulseaudio.service
    The systemctl command is used to control the systemd system and service manager. The --user option makes it apply only to the current user. The stop command stops a running service.
  2. Create a script named “pulseon.sh”: This script will start the Pulseaudio service. Here’s the content of the script:
    #!/bin/bash
    systemctl --user start pulseaudio.socket
    systemctl --user start pulseaudio.service
    The start command starts a stopped service.
  3. Make the scripts executable: You can do this by running the following commands in the terminal:
    chmod u+x pulseoff.sh
    chmod u+x pulseon.sh
    The chmod command changes the permissions of files. The u+x option gives the user permission to execute the file.

You can then double-click on the script you want to use to toggle Pulseaudio on or off.

Please note that these solutions are based on user experiences and may not work for everyone. It’s recommended to try them out and see which one works best for your specific setup. Always remember to back up your system before making any changes to avoid potential data loss.

Conclusion

Enabling audio passthrough with Pulseaudio/ALSA on Ubuntu 20.04 and Kodi can enhance your audio experience, especially if you’re using a home theater system. While the process has changed with the release of Ubuntu 20.04, the solutions provided in this article should guide you through the new steps. Remember to always back up your system before making any changes, and don’t hesitate to seek help if you encounter any issues. Happy listening!

What is the purpose of audio passthrough?

Audio passthrough allows the source audio to bypass the processing of the device it’s being played on and be decoded by the receiver instead. This is useful for enjoying high-quality surround sound from a home theater system.

How can I enable audio passthrough in Ubuntu 20.04 and Kodi?

There are two main solutions. One is to use Pulseaudio and configure the settings in the Pulseaudio volume control GUI. The other is to create scripts to toggle Pulseaudio on and off.

How do I install the Pulseaudio volume control GUI?

You can install the Pulseaudio volume control GUI by searching for it in your applications menu or by running the command sudo apt install pavucontrol in the terminal.

How can I adjust the audio settings in Kodi?

In Kodi, go to Settings – System – Audio. Here, you can set the audio output device, number of channels, output configuration, and enable passthrough with the relevant "capable receiver" settings.

Can I use audio passthrough with any receiver?

Audio passthrough depends on the encoding options supported by your receiver. Make sure to select all the encoding options supported by your receiver in the Pulseaudio volume control GUI or Kodi settings.

Do I need to make any backups before enabling audio passthrough?

It’s always recommended to back up your system before making any changes. While enabling audio passthrough shouldn’t cause any data loss, it’s better to be safe and have a backup in case any issues arise.

What should I do if I encounter issues enabling audio passthrough?

If you encounter any issues, it’s best to seek help from forums or online communities dedicated to Ubuntu, Kodi, or audio setups. They can provide specific troubleshooting steps or alternative solutions based on your setup.

Leave a Comment

Your email address will not be published. Required fields are marked *