I am building an A/V switch that I would like to have a headphone output with adjustable volume, controlled by a microcontroller. As a test, I connected an audio source to a potentiometer (input to a, wiper to headphones, ground to b) and had clean sound at whatever volume I adjusted it to. Now I'd like to do the same thing with a digital potentiometer and I'm running into weird audio distortion.
If I set up using the STYLE 1 diagram, the audio comes out just fine at max volume but 'crackly' at anything below that. On a whim, I tried adding some series capacitors as seen in STYLE 2, and this makes the problem go away at certain low volumes but certain middling volumes have the same crackly sound.
While I tested this, ARI and ALI were connected to the audio output of a nintendo 64, and ARO and ARI were connected to either my tiny audio-technica earbuds or a taotronix soundbar.