#!/bin/sh

HW_TYPE=$(qiba-spi-get-production-info.sh -w)
if [ "${HW_TYPE}" != "80" ]; then
    exit 0
fi

# On LX400, the XSMT pin from PMC5122 is connected to GPIO14 on IPAM.
# It happens that the latest IPAM revision changes the pull-up resistor to a weak pull-up (47K).
# So, in this case, the pull-up is not automatically done on the hardware and must be done in the software by enabling the GPIO14.

echo 14 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio14/direction
echo 1 > /sys/class/gpio/gpio14/value

# Disable auto-mute function on PCM5122
i2cset -y 0 0x4c 0x41 0x00
