From 0f7741b80fd4b1056c2ddea0158a8f8cf7dec83b Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sun, 13 Nov 2022 20:24:03 -0500 Subject: [PATCH] Fix RG552 default mixer. --- .../jelos/sources/asound/RG552/asound.state | 28 +++++++++---------- .../sources/autostart/RG552/002-audiomixer | 10 +++++++ projects/Rockchip/devices/RG552/device.config | 2 +- 3 files changed, 25 insertions(+), 15 deletions(-) create mode 100755 packages/jelos/sources/autostart/RG552/002-audiomixer diff --git a/packages/jelos/sources/asound/RG552/asound.state b/packages/jelos/sources/asound/RG552/asound.state index 8833a8ad8..c2a40ea39 100644 --- a/packages/jelos/sources/asound/RG552/asound.state +++ b/packages/jelos/sources/asound/RG552/asound.state @@ -28,8 +28,8 @@ state.rockchipes8316c { control.3 { iface MIXER name 'Headphone Mixer Volume' - value.0 10 - value.1 10 + value.0 0 + value.1 0 comment { access 'read write' type INTEGER @@ -37,14 +37,14 @@ state.rockchipes8316c { range '0 - 11' dbmin -1200 dbmax 0 - dbvalue.0 -150 - dbvalue.1 -150 + dbvalue.0 -1200 + dbvalue.1 -1200 } } control.4 { iface MIXER name 'Playback Polarity' - value Normal + value 'R Invert' comment { access 'read write' type ENUMERATED @@ -57,9 +57,9 @@ state.rockchipes8316c { } control.5 { iface MIXER - name 'Master Playback Volume' - value.0 152 - value.1 152 + name 'DAC Playback Volume' + value.0 0 + value.1 0 comment { access 'read write' type INTEGER @@ -67,8 +67,8 @@ state.rockchipes8316c { range '0 - 192' dbmin -9999999 dbmax 0 - dbvalue.0 -2000 - dbvalue.1 -2000 + dbvalue.0 -9999999 + dbvalue.1 -9999999 } } control.6 { @@ -95,7 +95,7 @@ state.rockchipes8316c { control.8 { iface MIXER name 'DAC Notch Filter Switch' - value false + value true comment { access 'read write' type BOOLEAN @@ -105,7 +105,7 @@ state.rockchipes8316c { control.9 { iface MIXER name 'DAC Double Fs Switch' - value false + value true comment { access 'read write' type BOOLEAN @@ -115,7 +115,7 @@ state.rockchipes8316c { control.10 { iface MIXER name 'DAC Stereo Enhancement' - value 0 + value 7 comment { access 'read write' type INTEGER @@ -126,7 +126,7 @@ state.rockchipes8316c { control.11 { iface MIXER name 'DAC Mono Mix Switch' - value false + value true comment { access 'read write' type BOOLEAN diff --git a/packages/jelos/sources/autostart/RG552/002-audiomixer b/packages/jelos/sources/autostart/RG552/002-audiomixer new file mode 100755 index 000000000..ff73cee68 --- /dev/null +++ b/packages/jelos/sources/autostart/RG552/002-audiomixer @@ -0,0 +1,10 @@ +#!/bin/bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) + +. /etc/profile + +if [ ! -e "/storage/.config/profile.d/99-mixer" ] +then + set-audio esset "DAC" +fi diff --git a/projects/Rockchip/devices/RG552/device.config b/projects/Rockchip/devices/RG552/device.config index 7e73c8f8e..7183b499b 100644 --- a/projects/Rockchip/devices/RG552/device.config +++ b/projects/Rockchip/devices/RG552/device.config @@ -4,7 +4,7 @@ DEVICE_HAS_FAN=true DEVICE_FAKE_JACKSENSE=false DEVICE_VOLUMECTL=true -DEVICE_AUDIO_MIXER="Master" +DEVICE_AUDIO_MIXER="DAC" DEVICE_PLAYBACK_PATH_SPK="SPK" DEVICE_PLAYBACK_PATH_HP="HP" DEVICE_VOLUME_DEV="/dev/input/by-path/platform-volume-keys-event"