this is less an answer and more a word of caution when using digital pots or similar devices.
Make sure you look carefully at their actual mode of operation and not just the theory or equivalent circuit in the datasheet.
I had a design a few years ago that had several analog inputs that were designed to operate at both line and microphone level. As such there was a differential pre amp stage using an IC designed for that purpose with adjustable gain from 0 to 60dB. We needed to control the gain set digitally with a micro controller which was set with a single external resistor. The resistor was in the signal path and AC coupled (swung +/- around ground). This wasn't mentioned in the pre-amp datasheet and wasn't expected as the output of the pre amp was referenced to the ADC input of a DSP. The output swung around 1.65V and always stayed above ground. Through feedback from the DSP the system automatically adjusted the pre-amp gain to get very close to full range input on the ADC to improve resolution.
At first i just used an AD digital potentiometer that appeared in all regards to be a regular old pot, everything indicated it was a resistor with a digitally controlled wiper position. Well it wasn't. Internally it was implemented with a cascade of transistors setup to present a constant resistance. This doesn't sound bad at first but what it does mean is that the resistor couldn't pass voltage outside the bounds of the pot's supplies. I implemented it with 3.3V and GND for the 2 rails as thats what we used for digital I/O. But in that configuration the resistor couldn't pass current with a negative voltage and it just chopped the bottom off any AC coupled signal going through it. We ended up having to replace it in the next rev with a digital pot that allowed +/- rails wide enough to support the signal going through the resistor.
That was a bit of a pain as it meant that it needed to run off the analog supplies but still have serial signals from the digital portions of the circuit attached to it.
Anyway, point is make sure you do your diligence and know exactly what the signal that needs to pass through the variable resistor looks like and that it will work given the topology of the resistor's design.