The idea of a Military revolution centered around Gustavus Adolphus has been repeatedly revised over the years, since many of the things he supposedly invented were really based on earlier trends. Tactics for defeating heavy lancers with pistoleirs such as reserving fire until after the melee is joined and attacking in column rather than in thin lines for example were described by La Noue all the way back in the 16th century.
Well ordered infantry defeating a cavalry charge wasn't exactly something new, going all the way back to the HYW, the Golden Spurs, and earlier. Ironically, medieval cavalry tactics often bared a closer similarity to the caracole than massive decisive charges, with single rows of horsemen charging forward to break their lance and then wheeling away. In the early modern era while there were notable defeats of cavalry by infantry, horsemen still gave an army far more flexibility and far more control over the battle. As Clifford Rogers puts it, if one side had superior infantry, and the other had superior cavalry, then the latter still usually won. It's worth remembering that the whole reason Gustav started instituting his reforms in the first place was the result of battles like Kirchholm where Polish heavy cavalry completely wiped away the Swedish infantry.
That may be, but it doesn't seem that it was due to cannons making walls obsolete.