code cleanup and fix error audio path

Change-Id: I51b6d0d86ac435ea7a401af0dc2919a6d92ef876