If your Mac switches to a different audio device
When you’re using an external display with your Mac, if your audio output or input immediately reverts to a different audio device than the one you selected in Sound settings, do any of the following:
If you have headphones or external speakers plugged into a Mac connected to a display: When you select the display’s built-in speakers in the Output pane of Sound settings, your selection may revert to the headphones or external speakers. To select the display’s speakers, first unplug the headphones or external speakers, then make your selection.
If you have a headset plugged into a Mac connected to a display: When you select the display’s built-in microphone in the Input pane of Sound settings, your selection may revert to the headset. To select the display’s built-in microphone, first unplug the headset, then make your selection.