Thats hard to figure out from a discription like dirt.
Too vague.
Is it a bad smell? Like sulfar farts?
Or just a musky smell.
Because plants smell wierd when they are alive sometimes.
I would just use some Sea Bird and Bat Guano and sea kelp for the taste.

But you could be smelling root rot.
It's hardto say.
If it is that.
You need more drainage.