This is very annoying, and undocumented. Basically, you do not have to change anything on the linux side. It is just the TV that needs to know you are connecting a laptop/pc. To do this on samsung:
- Connect your laptop/pc to the HDMI port labeled DVI. For me, that is HDMI 4
- Go to the source list on the tv
- Scroll to the port (HDMI4). Press and hold options.
- Rename the port. It should have the name “PC”
- Stuff should work now
To select the HDMI out for audio, install pavucontrol and open that. It will let you choose the output.