There is no account of the Kingdom of Linyi in the New History of the Tang (Xin Tangshu 新唐書), a work that was completed in 1060 AD.
However, there is an account about a place called, Huanwang 環王, which as you will see, is essentially Linyi (thanks something I’ll write about later).
(新唐書/列傳 凡一百五十卷/卷二百二十二下 列傳第一百四十七下 南蠻下/環王)
環王,本林邑也,一曰占不勞,亦曰占婆。直交州南,海行三千里。地東西三百里而贏,南北千里。西距真臘霧溫山,南抵奔浪陀州。其南大浦,有五銅柱,山形若倚蓋,西重巖,東涯海,漢馬援所植也。又有西屠夷,蓋援還,留不去者,才十戶,隋末孳衍至三百,皆姓馬,俗以其寓,故號「馬留人」,與林邑分唐南境。其地冬溫,多霧雨,產虎魄、猩猩獸、結遼鳥。以二月為歲首,稻歲再熟,取檳榔瀋為酒,椰葉為席。俗凶悍,果戰鬬,以麝塗身,日再塗再澡,拜謁則合爪頓顙。有文字,喜浮屠道,冶金銀像,大或十圍。呼王為陽蒲逋,王妻為陀陽阿熊,太子為阿長逋,宰相為婆漫地。王所居曰占城,別居曰齊國、曰蓬皮勢。王衣白㲲,古貝斜絡臂,飾金琲為纓,鬈髮,戴金華冠如章甫。妻服朝霞,古貝短裙,冠纓如王。王衞兵五千,戰乘象,藤為鎧,竹為弓矢,率象千、馬四百,分前後。不設刑,有罪者使象踐之;或送不勞山,畀自死。
Huanwang was originally Linyi; it is also called Zhanbulao [Cham Pulau] and also called Zhanpo [Champa]. It is located directly south of Jiaozhou, a journey of three thousand leagues by sea.
The land extends more than three hundred leagues from east to west, and one thousand leagues from north to south. To the west, it is distant from the Wuwen Mountains of Zhenla; to the south, it reaches Benlangtuo Prefecture [Panduranga?].
At the great estuary to its south, there are five bronze pillars. The mountain shape is like a leaning canopy; to the west it spans layers of cliffs, and to the east it borders the sea. These were planted by Ma Yuan of the Han.
There are also the Xitu barbarians. Presumably, when [Ma] Yuan returned, those who stayed and did not leave were just ten households. By the end of the Sui dynasty, they had multiplied to three hundred, all surnamed Ma. The custom considered them exiles, so they were called “Ma Stragglers.” They divide the southern border of the Tang from Linyi.
The land is warm in winter, with much fog and rain. It produces amber, the xingxing beast [xingxing shou 猩猩獸], and jieliao 結遼 birds.
They consider the second month as the beginning of the year. Rice ripens twice a year. They take betel liquid to make wine, and use coconut leaves to make mats.
The custom [is that the people] are fierce by nature and decisive in combat. They smear their bodies with musk. They smear and bathe twice a day. When paying respects, they join their claws [palms] and tap their foreheads.
They have a writing system. They delight in the Buddha Way [Futu Dao 浮屠道] and cast statues of human figures in gold and silver, some as large as ten arm-spans around.
They call the king Yangpubu 陽蒲逋; the king’s wife is Tuoyang’axiong 陀陽阿熊; the crown prince is Achangbu 阿長逋; and the prime minister is Pomandi 婆漫地.
The king resides at Zhancheng 占城 [Zhan/Cham Citadel]. His other residences are called Qiguo 齊國 and Pengpishi 蓬皮勢.
The King wears white cotton [baidie 白㲲]. He wraps gubei 古貝 [cotton] diagonally across his arm and is adorned with gold and pearls as tassels. He has curly hair and wears a gold flower crown shaped like the Zhangfu cap. His wife wears dawn cloud [zhaoxia 朝霞] [cloth], a short skirt of gubei, and a crown and tassels like the king’s.
The King has five thousand guard troops. In battle, they ride elephants. They use rattan to make armor and bamboo for bows and arrows. He leads one thousand elephants and four hundred horses, divided into front and rear [vanguards].
They do not have established penal codes; those who commit crimes are trampled by elephants; or they are sent to Bulao Mountain and left to die on their own.
隋仁壽中,遣將軍劉芳伐之,其王范梵志挺走,以其地為三郡,置守令。道阻不得通,梵志裒遺眾,別建國邑。武德中,再遣使獻方物,高祖為設九部樂饗之。貞觀時,王頭黎獻馴象、鏐鎖、五色帶、朝霞布、火珠,與婆利、羅剎二國使者偕來。林邑其言不恭,羣臣請問罪,太宗曰:「昔苻堅欲吞晉,眾百萬,一戰而亡。隋取高麗,歲調發,人與為怨,乃死匹夫手。朕敢妄議發兵邪?」赦不問。又獻五色鸚鵡、白鸚鵡,數訴寒,有詔還之。頭黎死,子鎮龍立,獻通天犀、雜寶。十九年,摩訶慢多伽獨弒鎮龍,滅其宗,范姓絕,國人立頭黎壻婆羅門為王,大臣共廢之,更立頭黎女為王。諸葛地者,頭黎之姑子,父得罪,奔真臘。女之王不能定國,大臣共迎諸葛地為王,妻以女。永徽至天寶,凡三入獻。至德後,更號 環王 。元和初不朝獻,安南都護張舟執其偽驩、愛州都統,斬三萬級,虜王子五十九,獲戰象、舠、鎧。
During the Renshou era of the Sui [601–604 AD], the General Liu Fang was sent to attack them. Their king, Fan Fanzhi, fled. [The Sui] turned the land into three commanderies and appointed magistrates and prefects. However, the roads were blocked and impassable. Fanzhi gathered the remaining people and built a different capital city.
During the Wude era [618–626 AD], they again sent envoys to offer local products. Emperor Gaozu hosted them with the “Music of the Nine Ministries.”
During the Zhenguan era [627–649 AD], King Touli offered tame elephants, Liu [fine gold] chains, five-colored belts, dawn cloud cloth, and a “fire pearl.” He arrived together with envoys from the two kingdoms of Poli and Luosha.
Linyi’s speech was disrespectful, and the ministers asked to punish them for their crimes. Emperor Taizong said: “Formerly, Fu Jian wanted to swallow the Jin with a million troops, but he perished in a single battle. The Sui attacked Goguryeo, conscripting soldiers year after year, creating resentment among the people until he [Emperor Yang of Sui] died by the hand of a common man. Dare I recklessly discuss deploying troops?” He pardoned them and did not inquire further.
They also offered five-colored parrots and white parrots. The birds frequently complained of the cold, so an edict was issued to return them.
When Touli died, his son Zhenlong succeeded him; he offered “sky-connecting” rhinoceros horn [tongtian xi 通天犀] and various treasures.
In the nineteenth year [645 AD], Mohe Manduojia killed Zhenlong and exterminated his clan, ending the Fan lineage. The people of the kingdom established Touli’s son-in-law [xu 壻], a Brahmin, as king, but the ministers collectively deposed him and established Touli’s daughter as king instead.
Zhuge Di was the son of Touli’s paternal aunt [? guzi 姑子]. His father had committed a crime and fled to Zhenla. As the female king could not stabilize the country, the ministers collectively welcomed Zhuge Di as king and married the female [ruler] to him.
From the Yonghui era to the Tianbao era [650–756 AD], they came to offer tribute a total of three times. After the Zhide era [756–758 AD], they changed their name to Huanwang.
In the early Yuanhe era [806–820 AD], they did not pay court or offer tribute. The Protector General of Annam, Zhang Zhou, captured their bogus (wei 偽) governors of Huan and Ai prefectures, beheaded thirty thousand ranks, captured fifty-nine princes, and seized war elephants, boats, and armor.