#!/bin/bash

echo "--- Setting up ALSA output for ESSX8336"

# This may be different for your system, you can check it by running aplay -l
OUTPUT_DEVICE='-c 0'

amixer $OUTPUT_DEVICE cset name='Speaker Switch' on
amixer $OUTPUT_DEVICE cset name='Headphone Playback Volume' 3,3
amixer $OUTPUT_DEVICE cset name='Right Headphone Mixer Right DAC Switch' on
amixer $OUTPUT_DEVICE cset name='Left Headphone Mixer Left DAC Switch' on
amixer $OUTPUT_DEVICE cset name='DAC Playback Volume' 999,999
amixer $OUTPUT_DEVICE cset name='DAC Stereo Enhancement' 999,999
amixer $OUTPUT_DEVICE cset name='Headphone Mixer Volume' 999,999
#amixer $OUTPUT_DEVICE sset Headphone 3

echo "--- Setting up ALSA output for ESSX8336"

# This may be different for your system, you can check it by running arecord -l
INPUT_DEVICE='-c 0'

amixer $INPUT_DEVICE cset name='ADC Capture Volume' 190
amixer $INPUT_DEVICE cset name='Internal Mic Switch' on
amixer $INPUT_DEVICE cset name='Headset Mic Switch' on
amixer $INPUT_DEVICE cset name='Differential Mux' 'lin1-rin1'

echo "=== Done!"
exit 0
