There have been two iterations of the pi-topSPEAKER. Here we'll explain them both
Both of the pi-topSPEAKERs look very similar, the main way to distinguish between the two is that the SPEAKER_V2 has a black PCB while the original pi-topSPEAKER has a green PCB
Installation
For getting either of these working, you'll have to install the pi-top drivers. The instructions can be found in this Knowledge Base article.
pi-topSPEAKER_V2
The updated speaker was made in mind for the pi-top [3]. The pi-top [3] doesn't have the same Screen Driver IC that was used in the pi-top1 or the pi-topCEED. Instead the pi-topSPEAKER_V2 uses I2S Audio! The Raspberry Pi can transmit I2S Audio through GPIOs 18, 19, 21. This means that the SPEAKER_V2 can be used in the Modular Add-on rail of either the pi-top1, pi-topCEED or pi-top [3]. The SPEAKER_V2 also has a GPIO Expander that is used to drive the LEDs on the underside of the device and turn on/off the amplifier. The great thing about this is that multiple SPEAKER_V2s can be connected into the modular rail. Just remember to plug them in one by one!
pi-topSPEAKER_V2 I2C Address: 0x43
pi-topSPEAKER
The original pi-topSPEAKER was designed only for the pi-top1. It relied on the screen driver IC that was present in the pi-top1 and pi-topCEED for an S/PDIF (Sony/Phillips Digital Interface) signal. The original 34 pin modular connector had a specific pin dedicated to supply S/PDIF. On the pi-top [3] this became a Not Connected pin because the pi-top[3] Hub doesn't have the capability of providing an S/PDIF.
S/PDIF could supply Left, Right or Mono audio and the SPEAKER has a switch which can be toggled by the user to control which channel was being output. Rather cleverly, the I2C Address of the pi-topSPEAKER would also change, depending on its audio channel.