To my knowledge there is no UI which comes with Ubuntu through which you can tweak the sample rate and audio bit depth which would have made the job easier. But the audio configuration files for the sound server can be found under /etc/pulse/
. The daemon.conf
file under this path is the one which we need to change our settings.
Open a terminal and issue the following command with sudo
.
gedit /etc/pulse/daemon.conf
Copy the entire contains of the file and save it in a plain text file somewhere in your home folder. This is just a backup, in case something goes wrong you can get back the original settings and restore it.
Now at the bottom of the file you will find these lines.
; default-sample-format = s16le
; default-sample-rate = 44100
; default-sample-channels = 2
; default-channel-map = front-left,front-right
Here ;
are used for commenting. So to make a setting take effect you need to un-comment it by removing the ;
and change the setting value to the desired one. For example you like to change the frequency to 192000 Hz, so you should change the
; default-sample-rate = 44100
to this
default-sample-rate = 192000
After you are done editing the file save it. Now for the change to take effect you need to restart the sound server. You can simply reboot the system or enter the following commands to restart the server without rebooting your system.
pulseaudio --kill
pulseaudio --start
And that's it. There are also many other settings in the /etc/pulse/daemon.conf
file which you might find useful so take a good look at the file when you open it.