distribution/packages/hardware/quirks/devices/AYANEO AIR Plus/001-audio
fewtarius fa5359d937
* Complete work for the Audio reset feature (Danger Zone).
* Make fbwidth and fbheight available as a function, and ensure it supports
  rotated displays.
2023-07-29 00:44:10 +00:00

25 lines
721 B
Bash

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYDEVICE=$(get_setting system.audiodevice)
if [ -z "${MYDEVICE}" ] || \
[ ! -e "/storage/.config/asound.conf" ]
then
### Set the audio device.
set-audio set "ALC269VB (1:0)"
set-audio esset "Master"
fi
### Only enable on 6800U Plus devices.
SUBSYSTEM=$(awk '/Subsystem Id:/ {print $3}' /proc/asound/card1/codec#0)
if [ "${SUBSYSTEM}" = "0x02f3f000" ]
then
### Disables speaker output when headphones are connected.
alsactl restore -f /storage/.config/asound.state
/usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled
alsactl store -f /storage/.config/asound.state
fi