This is similar to this unanswered question and to this question, but it uses different hardware and can't be solved in the same way as that 2nd question is solved. The bottom line is that I get sound from my Apple TV, from the BD player, but not from the Apple TV. I'm using a MacMini 7,1
Here's a diagram of my layout:
I have three video and sound devices (Apple TV, Mac Mini, and a BD player). Each has an HDMI cable running from the device to the Metra HDMI switcher. The Metra switcher also extracts the audio, which goes through a TOSLink digital audio cable to a Sonos Playbar, which is part of a home theater sound system (including a woofer and two rear speakers). The video from the Metra switcher goes through an HDMI cable to the Sony video projector.
It's worth noting that I had a similar problem with the BD Player. At first I had a Sony BD player, but it would not send sound to the Sony projector. It took me a while, including over an hour on the phone with the sales guy at Crutchfield to figure out that the Sony BD player and the Sony projector were talking to each other and, basically, the projector was saying, "I don't have speakers." The Sony BD player got that and decided, since the projector did not handle sound, it would not send audio over the HDMI output to the projector. We solved that problem by swapping out the Sony BD player for a Panasonic and it works fine.
The problem with the Mac Mini is that it is not sending sound out through the HDMI cable. When I go to the Sound preferences, there is no HDMI device I can pick for output. (I suspect this is because it recognizes the Sony projector and knows it doesn't have sound.) I've tried using Airplay to send sound to the Sonos system that way. It worked once, but with sound lagging behind video 2-3 seconds. Next time I tried working on it, I could not get Airplay to send audio to Sonos at all.
One problem is that the only sound input the Playbar has is the TOSLink jack, so I can't pull sound from the headphone/audio jack on the Mac and get that into the switcher or Playbar without converting the sound to HDMI or to digital - and then I'd need some other switcher.
I did try using Airplay to use the MacMini through the Apple TV. It could have been my imagination, but I was pretty sure there was a bit of an audio lag that way, as well. Just barely noticeable. (And if I do this, how will that work when playing games? Won't there be lag with screen updates? And if I do that, is there a way to start the screen sharing with the Apple TV instead of going to the Mac just to start screen sharing, then go to the Apple TV?)
I'm wondering if there's a way to override and tell sound, "Just send through the HDMI output." All I see as possible outputs on the Mac sound preferences is the built in speakers and a list of Sonos speakers. (And, again, that was either not working or had a 2-3 second lag for sound.) Or maybe there's a way to create a fake HDMI audio device to just make the Mac send audio out through the HDMI cable?
The bottom line is I want audio and video synced and and playing through the Sony projector and Sonos sound system.