What do you mean by "control"? AFAIK the only digital input on PAM8610 is "Mute". You can control that one with a GPIO.
– Dmitry GrigoryevJul 18 '19 at 13:44
@El_Dorado, You can tap the PAM8610's digital volume pin out and use Rpi python to control volume using a DAC or digital pot. You might like to read my answer to the question of using the digital pot MCP4725, with demo code. ( https://raspberrypi.stackexchange.com/questions/83405/dac-mcp4725-not-working-with-raspberry )
– tlfong01Jul 20 '19 at 03:17
wohh...that is some deep ***. I first have to learn about that code and then try to replicate for PAM8610. Thanks, man.
– El_DoradoJul 20 '19 at 05:21
@El_Dorado, I agree it is "deep". But you can go slowly step by step, from the "shallow" end: (1) Rpi python GPIO to blink a led, (2) Rpi python GPIO to read a button, (3) ADC, (4) DAC, (5) Well, you are almost there. I actually went through the above steps, from the shallow end, and now I am swimming happily at the "deep" end. It took me, with an IQ of 93, 500+ hobbyist hours. Of course you might not need that long. But no pain no gain! :)
– tlfong01Jul 21 '19 at 01:23