Try rebooting your Nexus with all external devices detached and all connections off. This means NO power supply, NO HDMI cable, NO bluetooth, NO wifi, NO headphones or speakers, etc. To accomplish this, unplug all external hardware, turn off bluetooth and wifi via the Settings menus, and then hold the power button down until the tablet reboots. You may have to perform this ritual a few times until the sound returns.
This was the only solution that worked for my Nexus 10 (running Lollipop v5.1.1), and I tried virtually everything else suggested throughout the web.