Update Odin2 Config

This commit is contained in:
FantasyGmm
2025-03-14 10:13:54 +08:00
committed by Igor
parent d9a3a3a137
commit 0ccbe8bcc7
70 changed files with 33981 additions and 1376 deletions

View File

@@ -0,0 +1,31 @@
# Use case configuration for AYN Odin2
# Author: Teguh Sobirin <teguh@sobir.in>
Syntax 4
SectionUseCase."HiFi" {
File "/AYN/Odin2/HiFi.conf"
Comment "HiFi quality Music."
}
BootSequence [
cset "name='RX_RX0 Digital Volume' 84"
cset "name='RX_RX1 Digital Volume' 84"
cset "name='HPHL Volume' 20"
cset "name='HPHR Volume' 20"
cset "name='ADC2 Volume' 10"
]
LibraryConfig.remap.Config {
ctl.default.map {
"name='HP Volume'" {
"name='HPHL Volume'".vindex.0 0
"name='HPHR Volume'".vindex.1 0
}
}
}
Include.card-init.File "/lib/card-init.conf"
Include.ctl-remap.File "/lib/ctl-remap.conf"
Include.wcd-init.File "/codecs/wcd938x/init.conf"

View File

@@ -0,0 +1,91 @@
# Use case configuration for AYN Odin2
# Author: Teguh Sobirin <teguh@sobir.in>
SectionVerb {
EnableSequence [
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 1"
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1"
]
DisableSequence [
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 0"
]
Value {
TQ "HiFi"
}
}
SectionDevice."Speaker" {
Comment "Speaker playback"
Value {
PlaybackPriority 150
PlaybackPCM "hw:${CardId},0"
PlaybackChannels 2
}
}
SectionDevice."Headphones" {
Comment "Headphones Playback"
Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf"
Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf"
Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf"
Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
PlaybackMixer "default:${CardId}"
PlaybackMixerElem "HP"
PlaybackChannels 2
JackControl "Headphone Jack"
JackHWMute "Speaker"
}
}
SectionDevice."Headset" {
Comment "Headphone Microphone"
Include.wcdmice.File "/codecs/wcd938x/HeadphoneMicEnableSeq.conf"
Include.wcdmicd.File "/codecs/wcd938x/HeadphoneMicDisableSeq.conf"
Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic1EnableSeq.conf"
Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/HeadphoneMicDisableSeq.conf"
Value {
CapturePriority 200
CapturePCM "hw:${CardId},2"
CaptureMixerElem "ADC2"
CaptureChannels 1
JackControl "Mic Jack"
}
}
SectionDevice."DisplayPort" {
Comment "DisplayPort playback"
EnableSequence [
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 1"
]
DisableSequence [
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 1"
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
]
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},1"
JackControl "DP0 Jack"
JackHWMute "Speaker"
}
}

View File

@@ -6,7 +6,7 @@
# Controls on-screen logging
# This setting can persist without config file or sdcard being present
Debug = false
Debug = true
# Boot target. Can be one of the following:
# "default" (ABL default)
@@ -53,10 +53,6 @@ DisableDisplayHW = true
# Accept both gzipped and non-gzipped kernel images
Image = "Image"
initrd = "initrd.img-INITRD_PLACEHOLDER"
devicetree = "dtb/qcom/qcs8550-ayn-odin2-hypdtbo.dtb"
cmdline = "clk_ignore_unused pd_ignore_unused panic=30 audit=0 allow_mismatched_32bit_el0 rw mem_sleep_default=s2idle root=UUID=UUID_PLACEHOLDER"
devicetree = "dtb/qcom/qcs8550-ayn-odin2.dtb"
cmdline = "clk_ignore_unused pd_ignore_unused quiet rw rootwait root=UUID=UUID_PLACEHOLDER"
[EFI]
Image = "EFI/BOOT/BOOTAA64.EFI"
# Options to be passed to the EFI Application, could be left empty
Options = "earlycon=efifb,mem"

View File

@@ -1,11 +0,0 @@
[Unit]
Description=Bluetooth Fixed Mac Address
After=bluetooth.service
Wants=bluetooth.service
[Service]
Type=oneshot
RemainAfterExit=yes
SyslogIdentifier=bt-fixed-mac
ExecStart=/usr/local/bin/bt-fixed-mac.sh
[Install]
WantedBy=bluetooth.target

View File

@@ -1,11 +0,0 @@
#!/bin/bash
cmdline=$(cat /proc/cmdline)
if [[ $cmdline == *'bt_mac='* ]]; then
bt_mac=$(echo $cmdline | grep -o 'bt_mac=[^ ]*' | cut -d'=' -f2)
else
bt_mac="2C:6D:C1:F1:93:32"
fi
/usr/bin/bluetoothctl mgmt.public-addr $bt_mac