Crackling sound in the ear can be tinnitus. If it is associated with flexing of muscle, swallowing and yawning then probably it is due to eustachian tube dysfunction. If it is not troublesome and not bothering your daily work and sleep then no treatment is required
Next Steps
Consult nearby ENT specialist for confirmation of diagnosis and appropriate treatment if required