Nexus 7 headphone jack fix

I have a first generation (model year 2012) Nexus 7 tablet. Nowadays I mostly use it to watch movies during my daily commute. About half a year ago I noticed that one side of the headphone output does not work. After a reboot and plugging the headphone in and out several times it started working most of the times. Then stopped working completely.