AC3 transcoding for HDMI

Is there any chance to make AC3 transcoding to work with HDMI audio?
I need it because Sony AVRs have this thing that whenever they detect PCM signal, whether it’s stereo or other channel layout, they disable Dolby PLIIx which I would like to stay on all the time. Enabling it constantly back is infuriating. I wish Kodi would be able to send audio in Dolby Digital format through hdmi for all stereo and PCM audio sources including the GUI sounds.