Replace analog pot with AD5252

Hello Guys,
I need some help here!
I am trying to replace an analog potentiometer of a stereo amplifier with NCD AD5252 50Ohms digital pot.
The digital pot is controlled by a Sparkfun esp32 dev thing board. I used the arduino code from your github repo to control the digital pot.
Increasing and decreasing the volume seems working properly when i check the resistance with a multimeter.

The problems starts when I connect the digital pot to the amplifier. Increasing and decreasing the volumes results in a tremendous amount of noise and no music at all.

What am I doing wrong?

Any help is more than welcome

Thank you very much