Maximum output power of a PA
These are "thinking aloud" calculations so I stand to be corrected ...


Assuming that the amplifier is perfect and can swing rail to rail (0 to 5 V out) then the peak to peak output voltage is 5 V.
The "peak" voltage relative to the half-supply quiescent voltage is 2.5 V.
The RMS value of a 2.5 Vpk sine is \$ \frac {2.5} {\sqrt 2} = 1.77 \ \mathrm{V_{RMS}}\$.
The peak current specified is 100 mA and this will also occur at peak voltage. Therefore \$ I_{RMS} = \frac {100m}{\sqrt 2} = 70.7 \mathrm {mA} \$.
Since these should be in phase into a reasonable speaker we can calculate the power as \$ P = V_{RMS} \times I_{RMS} = 1.77 * 0.077 = 0.136 \ \mathrm W \$.
The figures suggest a minimum load of \$ R = \frac {V}{I} = \frac {2.5}{0.1} = 25 \ \Omega \$.


I will leave the dB calculation for you.



To answer the other points:


  I was discussing with a friend about maximum output power ... for example if the device following the PA can only tolerate a certain amount of power.


The maximum output power does not depend on how much the PA can tolerate. If you crank up the volume the amplifier will output the maximum power until the PA goes open-circuit due to overheating or a fuse blows.


  If the input power is much smaller than the output power, all the output power will come from the power supply and and maximum possible output is given by drain current times supply voltage (DC power).


Amplifiers, in general, do not draw significant power from the signal input. Usually the input impedance is quite high to minimise the load on the preceding circuit. All of the output power comes from the DC supply.


  However, when it comes to efficiency, there is a figure "Power Added Efficiency" which subtracts the input power (as compared to the drain efficiency). In a similar manner, can the input power be transferred to the output (in addition to the power coming from the supply) under all conditions or is the input power always dissipated into heat?


I have no idea where those terms come from or what they could mean. The efficiency of the amplifier would be the ratio \$ \frac {output \ power}{input \ power} \$. This is a slightly tricky calculation as the voltage drop across the output transistors varies inversely to the audio output. You should be able to find typical figures in a table of efficiencies for the various amplifier classes.


  Example: Class AB amplifier, Vsupply = 5 V, IDmax = 100 mA, P1dB = 23 dBm, Pinmax (no,damage) = 25 dBm. Is the maximum possible output power 0.5 W (27 dBm) under all conditions or can it be higher?


I have assumed that IDmax is the maximum current that can be handled by the output transistor.