Yes you can do this but doesn't always work, the whine can also be caused by badly installed rca's and power leads, if you are running amps of course. Just ensure that speaker wire/rca's are run through car away from the power leads.
Other than this the whine can also be casued by faulty rca...