Hoody - The DAC I posted a link to was just the first random one I came across without doing any research or even reading the description at the time.
I did however read the description on the amazon.ca site now and they seem to have all the right words including "Mac compatible"
I would try to find some other info, maybe reviews and a copy of the user manual.
For transfer from the Mac to the Yamaha, I would use the optical connection on the unit since the Yamaha has an optical input that will record to (I think) the Yamaha hard drive. I haven't checked that either.
Using the optical connection would keep everything digital, if you use the RCA plugs you would end up with a digital-to-analog conversion in the DAC unit and then an anlog-to-digital conversion in the Yamaha which would mean deteriorated quality of the recording.
As to set up - and again, I have not tried that or have even ever used a USB audio device on a Mac, the USB port should show up in System Preferences>Sound.
Maybe post this in the Digital Lifestyle>Music section of this forum to get some input from people who have used the Mac USB ports for this type of purpose.
PS: Take a look at this thread to see if it gives you some ideas
Other than my headphone out (from my Mac) to my stereo receiver, is there a digital solution? My receiver has optical in, HDMI in, RCA in and 3.5mm in (Headphone size cable). Is there a USB to Optical cable out there? Can I use Thunderbolt as an audio out?? Is there another solution I am not...
www.mac-forums.com
BTW-there are some Macs that have a combined analog & digital output, for those you would just need the optical cable and no USB converter.
Another relevant link
Apple dropped S/PDIF from its headphone jack in 2016 MacBook Pros and 2017 iMacs.
www.macworld.com
Behringer is a very reputable company when it comes to audio equipment
More good info:
I just bought a 2012 iMac and I want to connect it to my Yamaha Amplifier. On my previous PC setup I had an external audio card which connected to the Amplifier via an optical cable. However, I do...
apple.stackexchange.com
Looks as if your 2012 iMac does include an optical port (integrated with the headphone output), so it seems all you need is the cable to connect to the optical input of your Yamaha unit provided the Yamaha allows recording on the harddrive from its optical input.
Your manual will give you that info.