Using digital pot to control gain of hi-fi audio op amps
2) Use the digital pot in the feedback loop controlling the gain of the opamp.


it is generally recommended against this approach due to its altering of the circuit's feedback characteristics. and some opamps may not be stable in &lt;1x gain.

I would take the first approach instead.