The first cannon the Chinese had, according to the Portuguese were three (3) cannons, presumably ship cannon, manned by Portuguese crews which the emperor specifically requested of them in 1621. Three cannons are not enough to affect a war in which there are many thousands fighting over vast distances. Also, ship cannons use carriages which are not effective in field warfare, which requires much more complicated and advanced carriages, not to mention a skill level way beyond that of a typical ship gunner.
About 50 years later Ferdinand Verbiest, a Portuguese scientist, constructed about 100 cannon for the Chinese emperor, however, by this time the Manchu had completely won and even then it is likely these cannons would have changed the tide of battle for logistical reasons and the problem of providing and moving around Portuguese gunners. Moving cannon around in those was a non-trivial problem because you have to transport the powder too, and keep it dry. Cannon was most effective in siege situations at that time, which was not the problem facing the Ming.
It was not until over a 100 years later that the Chinese acquired "firearms", once again from the Portuguese, and only in very small quantities. For example, the emperor's guard in 1792 was equipped only with halberds. Even in the Opium Wars (1840) the Chinese carrying muskets were so small in number and ineffective in their operations that they were more or less inconsequential. So, your idea that the Chinese were using "firearms" against the Manchu is not correct.