In the Bala Kanda of the Ramayana, the sage Vishwamitra tells Rama and Lakshmana the famous story of the descent of the Ganga river to Earth. As described in this chapter of the Bala Kanda, Rama's ancestor Sagara once conducted an Ashwamedha Yagna (horse ritual), and Indra, fearing that the yagna would make Sagara too powerful, stole the sacrificial horse so that Sagara couldn't complete the ritual. So Sagara sent his sons to look for the horse, and they scoured the earth trying to find it. As described in the next chapter, Sagara's sons finally found the horse near the ashram of Kapila, a great sage and incarnation of Vishnu. They accused Kapila of stealing the horse, and he was so enraged that he burned them all to ashes. It was the quest to scatter the ashes of Sagara's sons in a holy body of water that motivated Sagara's descendant Bhagiratha to bring the river Ganga from Devaloka to Earth.
But my question is about how the sage Kapila is referred to in the passage. For instance, here is what Brahma says when he tells the gods that Kapila is going to burn Sagara's sons to ashes:
To whom this Mother Earth belongs in all her entirety, he is that prescient Vāsudeva, and she is also the consort of that Maadhava, and that Vishnu eternally props up Mother Earth. Hence, that reverential Vishnu donning the semblance of Sage Kapila will burn down the sons of emperor Sagara to ashes in a fire of fury.
And here is the description of Kapila when he is seen by the sons of Sagara:
But all those great-souled and great-mighty ones with terrible dash have seen the Infinite Vāsudeva in the form of sage Kapila there in the northeast, and oh, descendant of Raghu, they have also seen the ritual-horse moving nearby that sage Kapila, thus all of the sons of Sagara obtained a matchless delight.
I'm interested in the fact that Vishnu is referred to by the name "Vāsudeva". Now when people today refer to Vishnu as Vāsudeva, they mostly do it because it's a name of Vishnu's incarnation Krishna, since his father was named Vasudeva. Yet this is a passage in the Ramayana, which was composed long before Krishna was even born, and it's talking about events that happened long before Rama was even born! This could be because Brahma and Vishwamitra already foresaw Vishnu being born as Vasudeva's son in the future, or it could be that the name "Vāsudeva" is being used literally, to mean "Lord of the Vasus"; the Vasus are a group of 8 Vedic gods associated with various slements of nature.
In any case, my question is, is the Ramayana the earliest Hindu scripture which refers to Vishnu as Vāsudeva, or are there even earlier scriptures? Is he called Vāsudeva in the Vedas?