Default (Q)no sound after flashing new rom

Ive been using s3 mini for about 3 months now.at first all things worked perfectly.but after i flash a new rom.like cm,virginity.etc. my phone speaker is dead.ive been searching for solutions about this,but nothing. Funny thing is my speaker have sound again after i flash the stock rom.can someone help me about this?