Sunan Ibn Majah, Book 9, Hadith 1976 (In-Book)

It was narrated that Mujahid said: “I was with Ibn Umar, and he heard the sound of a drum, so he put his fingers in his ears and turned away. He did that three times, then he said: “This is what I saw the Messenger of Allah do.' ”

حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا الْفِرْيَابِيُّ، عَنْ ثَعْلَبَةَ بْنِ أَبِي مَالِكٍ التَّمِيمِيِّ، عَنْ لَيْثٍ، عَنْ مُجَاهِدٍ، قَالَ كُنْتُ مَعَ ابْنِ عُمَرَ فَسَمِعَ صَوْتَ، طَبْلٍ فَأَدْخَلَ إِصْبَعَيْهِ فِي أُذُنَيْهِ ثُمَّ تَنَحَّى حَتَّى فَعَلَ ذَلِكَ ثَلاَثَ مَرَّاتٍ ‏.‏ ثُمَّ قَالَ هَكَذَا فَعَلَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏.‏

sunnah.com