Asound.conf configuration


I'm trying to enable 5.1 surround and high quality re sampling on my arch system, im looking at the arch documentation but it's not being clear on where the lines of code it suggests adding need to be placed here is my config file:

"# Use PulseAudio by default
pcm.!default "plug:upmix51"
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"

ctl.!default {
type pulse
fallback "sysdefault"

vim:set ft=alsaconf:

defaults.pcm.rate_converter "speexrate_best"
pcm.upmix51 {
type upmix
slave.pcm "surround51"
delay 15
channels 5

Try it like this

Log out and back in to take effect.
Side note, why are you manually changing the conf? Hardware not recognized by default or is there a reason not to use pavucontrol?
Also for resampling you could try out sox, there's also a wrapper for it but I can't remember from this standing what it was called...

I'm still learing my way around some of the manual configs in arch, pavucontrol was suggested to me by a member of the arch forum which im gonna try out tonight. i prefer to use the terminal and config files rather that gui tools so i get a better understanding... thank you :)

Forgot to answer part of your question, um the hardware is recognised by default, im just doing it manually for better understanding

this is like using an xorg.conf, it's not the golden path so there are often inconsistencies in docs etc.

IMO, and this could screw things for you, if you want to hard-code ALSA config, remove pulse, old skool

Thank you both for your help, baz i tried your config and noticed a great improvement in sound quality :)