How are you measuring the power output? Do you have an 8 ohm dummy load?
Are you measuring power with a multimeter or oscilloscope? If using a multimeter, you should be measuring at a frequency of around 500Hz as most multimeters (unless really top quality) won't be accurate above 1kHz or so on the AC range.
To calculate the RMS power from voltage at speaker terminals, use the following equation V(squared) / impedance.
So if you measure 8v RMS at the speaker terminals, 8 * 8 / 8 = 8w.
To get 10w from the PAM8106 at 12 volts, the THD will be 10%, so realistically it's only good for around 8 to 9w max.
For your measurements to be remotely accurate, yo uneed to observe the waveform on an oscilloscope and watch for the onset of clipping, and then mesaure the RMS voltage at that point.
View attachment 459151