I have an old Bose SoundLink Mini II Bluetooth speaker that sounds quite decent to me. I want to upgrade/replace its internals with a Raspberry Pi Zero W and an audio DAC Shim attached to it, running piCorePlayer.

Since the Audio DAC Shim doesn’t provide enough power, and the Bose seems to have a separate amp board, I want to use the amp board of the Bose to drive the speakers and eliminate the rest of the Bose PCBs. The amp board controller appears to be a TPA3118. With the help of the datasheet, I found out the audio input pins of the board:

LINN (Left IN negative)
LINP (Left IN positive)
RINN (right IN negative)
RINP (right IN positive)

The RPI Audio DAC Shim only has a 3.5mm headphone out, so Left, Right, and GND.

I already tried to connect it as follows:

L to LINP
R to RINP
GND to RINN and LINN

While this seems to work in general, the audio quality appears to be worse in comparison. When I plug the RPI DAC Shim board into the original Bose 3.5mm input (using a 3.5mm cable), it sounds better.

Here is my question: Is it fine to connect the 3.5mm signals as I did? It felt wrong to just connect RINN and LINN to GND, as RINN and LINN don’t seem to be connected to GND otherwise. How do I properly connect the 3.5mm output to the Bose amp board?

Cheers