Audio: Digital Potentiometer is Noisy Compared to Analog Potentiometer
Unfortunately, digital pots are not quite as 'design friendly' as their analogue counterparts. 

The audio input voltages are AC, i.e. they alternate between + and - voltages. The voltages on the 3 digital potentiometer pins must fall within the Vdd-Vss range (in your case +5V and 0V). So the 'crackling sound' is probably due to the circuit only passing the +ve half of your audio sig. The fact that it works ok at full volume might be related to the architecture of the MCP4631.Just be aware that you may have damaged the MCP4631 due to operating outside of limits.In style 2, the same problem exists. 

In short, a working cct requires additional complexity. You might consider something like the circuit as follows.


In this circuit, the four resistors form two voltage dividers. Each voltage divider can be  considered as a 2.5V source acting through a single resistor (this is called Thevenins theorum). The R3,R4 divider is the quivalent of 2.5V in series with a 500ohm R. The R1,R2 divider is the equivalent of 2.5V in series with an 11k R. This makes it easier to see most of the AC input will appear across R5.

The Voltage at the pot wiper will be the audio superimposed on 2.5V DC so C2 is required to remove the DC for output to your phones. It is likely the phones will provide load that is too high for the pot so U1 is strongly recommended.