#!/bin/bash

AMIXER="amixer -Dhw:sndrpiwsp"

#Playback from AP to Line Output, default gain 0dB

# Clear the HPOUT2 Input 1 and 2  mixers. This will ensure no previous paths are connected to the HPOUT2.
# This doesn't include Inputs 3 and 4.
$AMIXER cset name='HPOUT2L Input 1' None
$AMIXER cset name='HPOUT2R Input 1' None
$AMIXER cset name='HPOUT2L Input 2' None
$AMIXER cset name='HPOUT2R Input 2' None
# Setup HPOUT2 input path and volume
$AMIXER cset name='HPOUT2L Input 1' AIF1RX1
$AMIXER cset name='HPOUT2L Input 1 Volume' 32
$AMIXER cset name='HPOUT2R Input 1' AIF1RX2
$AMIXER cset name='HPOUT2R Input 1 Volume' 32
# Unmute HPOUT2 Output
$AMIXER cset name='HPOUT2 Digital Switch' on
