In the config.txt, any line with a # in front of it is ignored. Its treated as just a comment if you will.
Delete the # from the front of the line and that line is executed.
So as an example
Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on (does something)
#dtparam=i2s=on ( is ignored)
#dtparam=spi=on ( is ignored)
You can’t use your analog volume control with the X-Hat. Not and use the X-Hat amplifier and speaker. The signal going from the Pi to the X-Hat DAC is a digital signal, 1’s and 0’s. i2s
What I did was take the analog stereo output that comes out of the Pi’s audio jack and feed it to my dual POT. The signal out of the Pi’s audio jack is a low level analog signal. It will drive earbuds but thats about all. It has to be amplified to drive speakers.
My volume control is two POTs connected to the one shaft. Stereo if you will. I took a stereo cord with a tip ring sleeve jack on one end and wired the other end to my POTs. The adjustable side goes to my stereo amplifier. The center wiper contact of the POT. The amplifier then feeds my speakers, which are not shown.
To do what I did you’d need to switch to a separate analog amplifier. And ditch using the DAC on the X-Hat.
My full build pictures for that Pi are here, https://1drv.ms/f/s!AjOYwiwlwDtpgq9LUHdGiiRpn7dr2Q