Unfortunately the current Sonos WebSocket integration does not support input source control at this time.
However we do have a MediaInputSource capability just for this very thing : https://smartthings.developer.samsung.com/docs/api-ref/capabilities.html#Media-Input-Source
Having input source control for Sonos players with line-in and home theater inputs (optical/HDMI) would be quite valuable. I will look into getting input source support for Sonos on our roadmap.
Barry