The difference between the TDA2822 and TDA2822M is that the TDA2822 is 16 pins and the TDA2822M is 8 pins.
There is even a TDA2822D wich is in a SO8 housing.
See the both attached datasheets to compare them.

The capacitors are dictated by the speaker impedance and the low frequency range.
You can forfeit some low frequencies by choosing less capacitance.
You can choose higher impedance speakers, but the penalty is that less power will be delivered because of the low voltage available.