Understanding audio ducking

When audio ducking is enabled, all audio streams adhere to an audio ducking policy that's defined in the audio policy configuration file.

Each audio stream on the system should match an audio type that's defined in the audio policy configuration file. If an audio stream doesn't match a defined audio type, then that audio stream is assigned the lowest priority audio type. Each audio type is prioritized based on the order it appears in the configuration file. The highest priority is assigned to the first audio type that's defined at the top of the file, and the lowest priority audio type is assigned to last audio type defined in the file.

If multiple audio streams are played concurrently, the higher priority audio type listed in the audio policy configuration file applies ducking, which forces the lower priority audio type to be ducked (or lowered in volume). For example, if you have a voice call occur while music is playing, and the voice call is defined as having a higher priority than the music audio type, then music is ducked (or lowered in volume) so that the voice call is heard more clearly. In this case, the voice call is performing ducking and the music is ducked.

Using audio ducking

You must create an audio policy configuration file that follows the rules defined in the “Syntax of the audio policy configuration file.” section in this chapter. If the specified audio ducking file isn't specified (or doesn't exist), audio ducking won't be used.
Note: If you disable the software mixer (specify disable_sw_mixer option when you run io-audio) ducking isn't available, regardless of whether audio policy configuration file. For information, see the disable_sw_mixer option in the io_audio chapter of the Neutrino Utilities Reference.
There are two ways to configure the audio policy configuration file with io-audio so that you can use ducking. The first way is to specify the audio ducking configuration (e.g., audioducking.conf) as an option when you run io-audio using the -o option. For example:
io-audio -o ducking_conf=/etc/system/config/audio/audioducking.conf

The second way is to specify the audio policy configuration file is to use the audio configuration file, and then run io-audio using the -c option to point to the audio configuration file (e.g., audio.conf). For example:

io-audio -c /etc/system/config/audio/audio.conf
Then in the audio configuration file, you should have the location of the audio policy configuration file specified in the [global] section as follows:
...
[global]
ducking_conf=/etc/system/config/audio/audioducking.conf
...

For more information about the audio configuration file used for the io-audio command, see the “Configuration file” section in the io_audio chapter of the Neutrino Utilities Reference.