It might happen for couple of reason... It might b problem with aux cord... Or problem with faulty aux port... Or another is... In setting the speaker balance might be off... It need to be '0'...
i own htc one n had same problem.... bt sadly it wasnt hardware problem nor software problem,.. since htc one have front speaker and have small holes, they tend to be blocked with dusts, what i did was just clean it with toothbrush(as it is easy and is right in your home) . it will be as good as new....