Simple Volume Control

All audio signals are AC signals, that is they have positive and negative peaks with respect to the signal ground.
The way you have your circuit assumes that your AC audio signal has a superimposed DC offset level of 2.5V on it. It is most unlikely that this is the case. So you have two choices:-

  1. Make the signal have a 2.5V DC offset on it by taking the ground of your audio to a fixed 2.5V signal generated by two 1K resistors forming a potential divider between +5 and 0 on the arduino. This point will have to be the ground for all subsequent audio signals.

  2. Make your circuit able to cope with the negative peaks of the audio circuit by supplying a -5V supply to the Vss pin of your chip.