Carvaka/Lokayata and Samkhya were/are atheistic subsets of Hinduism, yes. If I recall correctly, Jawaharlal Nehru identified as a Hindu atheist, but I'm not sure if he subscribed to one of those schools in particular (they're more products of Classical India).
Carvaka is very poorly documented AFAIK.
Atheism is fairly compatible with some intellectual analyses within Hinduism indeed. They are akin to Late Pagan philosophies like Neoplatonism in this regard; the masses are supposed to worship "gods" while the elite knows that there is not strictly speak any such thing as "god" (forgive the brutal oversimplification).
Samkhya is better known and fairly interesting. In my limited understanding, I would class it more as "agnostic" than "atheistic", but the basic point stands.