The early Buddhist texts describe yogic and meditative practices, some of which the Buddha borrowed from the śramaṇa tradition. The Pali canon contains three passages in which the Buddha describes pressing the tongue against the palate for the purposes of controlling hunger or the mind, depending on the passage. However, there is no mention of the tongue being inserted into the nasopharynx as in true khecarī mudrā. The Buddha used a posture where pressure is put on the perineum with the heel, similar to even modern postures used to stimulate Kundalini. Some of the major suttas that discuss yogic practice include the Satipatthana sutta (Four foundations of mindfulness sutta) and the Anapanasati sutta (Mindfulness of breathing sutta).
An influential text which teaches yoga from an Advaita perspective of nondualistic idealism is the Yoga-Vāsiṣṭha. This work uses numerous short stories and anecdotes to illustrate its main ideas. It teaches seven stages or bhumis of yogic practice. It was a major reference for medieval Advaita Vedanta yoga scholars and before the 12th century, it was one of the most popular texts on Hindu yoga.
Yogaśataka a Jain work by Haribhadra Suri 6th century CE "With conviction, the lords of Yogins have in our doctrine defined yoga as the concurrence (sambandhah) of the three [correct knowledge (sajjñana), correct doctrine (saddarsana) and correct conduct (saccaritra)] beginning with correct knowledge, since [thereby arises] conjunction with liberation....In common usage this [term] yoga also [denotes the soul’s] contact with the causes of these [three], due to the common usage of the cause for the effect. (2, 4).
Jain yoga has been a central practice in Jainism. Jain spirituality is based on a strict code of nonviolence or ahimsa (which includes vegetarianism), almsgiving (dana), right faith in the three jewels, the practice of austerities (tapas) such as fasting, and yogic practices. Jain yoga aims at the liberation and purification of the self (atma) or soul (jiva) from the forces of karma, which keep all souls bound to the cycle of transmigration. Like Yoga and Sankhya, Jainism believes in a multiplicity of individual souls which bound by their individual karma. Only through the reduction of karmic influxes and the exhaustion of one's collected karma can a soul become purified and released, at which point one becomes an omniscient being who has reaches "absolute knowledge" (kevala jnana).
^ James Mallinson, "Sāktism and Hathayoga," 28 June 2012.