device-samsung-t03g & t0lte: update alsa ucm config (MR 3723)

This commit is contained in:
Frost_I7 2023-02-28 20:47:30 +07:00 committed by Oliver Smith
parent 4d2a25db53
commit 790ab25509
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 242 additions and 28 deletions

View file

@ -1,7 +1,7 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-t03g
pkgdesc="Samsung Galaxy Note II (GSM)"
pkgver=1.1
pkgver=1.2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@ -63,7 +63,7 @@ kernel_ea8061() {
sha512sums="
dacaf39343e03a84444f34e57abd0cef3933dd86b0212c358f0d42e416d4b23b6cf3dca41112eeb6feccae8d784ef5db2041a8b05a6803445359181cbe4df168 deviceinfo
caa81e8ab6753c0ca24c22fb6742288765dfbf2469b8b8c35c5789edfcee546ef1c3b14ad6e540c417f434258399300f17d312b58157635eafab134587ef94cc Midas.conf
a56ce19331a8997b1cc493b8ab6b16ecfc423254a380e13a9461ec94ec5bc124cb3283256ef8cc014db60937a5e7404c6f7728bc2cc2494a70c612ccb3fd4105 HiFi.conf
7f07ea4bc279549844d071d94d9000d6335ed7548e06c1526f82cd6ccb39b5f5a50414b1e6e77d803ed86074d35e5f9f66f8e1b6b8352a2b1d2a7cd1a9b68472 Midas.conf
b25c730d18b176bed5890c800f1c1d3e224c1ccd410d2e4d64e9136fa1a715e46f85e66116d7a66c3b649c6ed09cdd9a48fc74ed7142c48092aef6ecb98c526a HiFi.conf
56a2bdffc273cb0a581192e65378ff50e71c7bc8a696af7d5e7c165a53c005aae104c4514c68afb668454c5a94ce78bd509f8a40e3401d67e16636b1ed81d051 modules-load.conf
"

View file

@ -1,9 +1,7 @@
# Based on https://github.com/LineageOS/android_device_samsung_t0lte/blob/cm-14.1/configs/tiny_hw.xml
SectionVerb {
EnableSequence [
cdev "hw:Midas"
# do not change the adc & dac source of AIF2
@ -42,7 +40,7 @@ SectionVerb {
cset "name='Left Headphone Mux' Mixer"
cset "name='Right Headphone Mux' Mixer"
# DAC1->SPKL/R->SPKL/R Boost->SPK
# DAC1->SPKL/R->SPKL/R Boost->SPK
cset "name='SPKL DAC1 Switch' 1"
cset "name='SPKR DAC1 Switch' 1"
cset "name='SPKL Boost SPKL Switch' 1"
@ -51,7 +49,7 @@ SectionVerb {
cset "name='SPKR Boost SPKR Switch' 0"
cset "name='Speaker Mixer Volume' 3"
# DAC->Output mixer->Earpiece
# DAC->Output mixer->Earpiece
cset "name='Left Output Mixer DAC Switch' 1"
cset "name='Right Output Mixer DAC Switch' 1"
cset "name='Earpiece Mixer Left Output Switch' 1"
@ -129,8 +127,7 @@ SectionVerb {
}
SectionDevice."Speaker" {
Comment "Built-in speaker"
Comment "Speaker"
EnableSequence [
cset "name='SPK Switch' 1"
@ -167,12 +164,84 @@ SectionDevice."Speaker" {
PlaybackVolume "Speaker Volume"
PlaybackSwitch "SPK Switch"
PlaybackChannels 2
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
}
}
SectionDevice."MainInternalMicrophone" {
Comment "Main Internal Microphone"
SectionDevice."Earpiece" {
Comment "Earpiece"
EnableSequence [
cset "name='RCV Switch' 1"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='Output Volume' 57"
cset "name='Earpiece Volume' 1"
]
DisableSequence [
cset "name='RCV Switch' 0"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='Output Volume' 57"
cset "name='Earpiece Volume' 1"
]
Value {
PlaybackVolume "Earpiece Volume"
PlaybackSwitch "RCV Switch"
PlaybackChannels 2
PlaybackPriority 50
PlaybackPCM "hw:${CardId}"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
EnableSequence [
cset "name='HP Switch' 1"
cset "name='Headphone Volume' 50"
cset "name='Headphone ZC Switch' 0"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='AIF1DAC1 EQ Switch' 1"
cset "name='AIF1DAC1 EQ1 Volume' 16"
cset "name='AIF1DAC1 EQ2 Volume' 14"
cset "name='AIF1DAC1 EQ3 Volume' 12"
cset "name='AIF1DAC1 EQ4 Volume' 14"
cset "name='AIF1DAC1 EQ5 Volume' 16"
]
DisableSequence [
cset "name='HP Switch' 0"
cset "name='AIF1DAC1 EQ Switch' 0"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
]
Value {
PlaybackVolume "Headphone Volume"
PlaybackSwitch "HP Switch"
PlaybackChannels 2
PlaybackPriority 150
PlaybackPCM "hw:${CardId}"
JackControl "Headset Jack"
}
}
SectionDevice."Mic" {
Comment "Microphone"
EnableSequence [
cset "name='Main Mic Switch' 1"
@ -193,8 +262,46 @@ SectionDevice."MainInternalMicrophone" {
]
Value {
CapturePCM "hw:${CardId}"
CaptureChannels 2
CaptureVolume "IN2L Volume"
CaptureChannels 2
CapturePriority 100
CapturePCM "hw:${CardId}"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
EnableSequence [
cset "name='MIXINL IN2L Switch' 0"
cset "name='Headset Mic Switch' 1"
cset "name='IN1L Volume' 24"
cset "name='MIXINL IN1L Switch' 1"
cset "name='MIXINL IN1L Volume' 0"
cset "name='AIF2ADC HPF Mode' 1"
cset "name='AIF2ADC HPF Switch' 1"
cset "name='AIF1ADC1 HPF Mode' 1"
cset "name='AIF1ADC1 HPF Switch' 1"
cset "name='AIF1ADC1 Volume' 96"
cset "name='AIF1ADCL Source' 0"
cset "name='AIF1ADCR Source' 0"
]
DisableSequence [
cset "name='Headset Mic Switch' 0"
cset "name='IN1L Volume' 11"
cset "name='MIXINL IN1L Switch' 0"
cset "name='MIXINL IN1L Volume' 0"
cset "name='AIF1ADC1 HPF Mode' 0"
cset "name='AIF1ADC1 HPF Switch' 0"
cset "name='AIF1ADC1 Volume' 96"
]
Value {
CaptureVolume "IN1L Volume"
CaptureChannels 2
CapturePriority 150
CapturePCM "hw:${CardId}"
JackControl "Headset Jack"
}
}

View file

@ -2,5 +2,5 @@ Syntax 2
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play high quality music"
Comment "Hi-Fi audio"
}

View file

@ -1,7 +1,7 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-t0lte
pkgdesc="Samsung Galaxy Note II LTE"
pkgver=0.5
pkgver=0.6
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@ -63,7 +63,7 @@ kernel_ea8061() {
sha512sums="
ae63b78724e6afbfb0a3455d317f68b7a4db796f6657ea66befd155299b145e66e716ed71e34f17968f73137a2e3e286c165442029e603a74055208f74c0e182 deviceinfo
caa81e8ab6753c0ca24c22fb6742288765dfbf2469b8b8c35c5789edfcee546ef1c3b14ad6e540c417f434258399300f17d312b58157635eafab134587ef94cc Midas.conf
a56ce19331a8997b1cc493b8ab6b16ecfc423254a380e13a9461ec94ec5bc124cb3283256ef8cc014db60937a5e7404c6f7728bc2cc2494a70c612ccb3fd4105 HiFi.conf
7f07ea4bc279549844d071d94d9000d6335ed7548e06c1526f82cd6ccb39b5f5a50414b1e6e77d803ed86074d35e5f9f66f8e1b6b8352a2b1d2a7cd1a9b68472 Midas.conf
b25c730d18b176bed5890c800f1c1d3e224c1ccd410d2e4d64e9136fa1a715e46f85e66116d7a66c3b649c6ed09cdd9a48fc74ed7142c48092aef6ecb98c526a HiFi.conf
56a2bdffc273cb0a581192e65378ff50e71c7bc8a696af7d5e7c165a53c005aae104c4514c68afb668454c5a94ce78bd509f8a40e3401d67e16636b1ed81d051 modules-load.conf
"

View file

@ -1,9 +1,7 @@
# Based on https://github.com/LineageOS/android_device_samsung_t0lte/blob/cm-14.1/configs/tiny_hw.xml
SectionVerb {
EnableSequence [
cdev "hw:Midas"
# do not change the adc & dac source of AIF2
@ -42,7 +40,7 @@ SectionVerb {
cset "name='Left Headphone Mux' Mixer"
cset "name='Right Headphone Mux' Mixer"
# DAC1->SPKL/R->SPKL/R Boost->SPK
# DAC1->SPKL/R->SPKL/R Boost->SPK
cset "name='SPKL DAC1 Switch' 1"
cset "name='SPKR DAC1 Switch' 1"
cset "name='SPKL Boost SPKL Switch' 1"
@ -51,7 +49,7 @@ SectionVerb {
cset "name='SPKR Boost SPKR Switch' 0"
cset "name='Speaker Mixer Volume' 3"
# DAC->Output mixer->Earpiece
# DAC->Output mixer->Earpiece
cset "name='Left Output Mixer DAC Switch' 1"
cset "name='Right Output Mixer DAC Switch' 1"
cset "name='Earpiece Mixer Left Output Switch' 1"
@ -129,8 +127,7 @@ SectionVerb {
}
SectionDevice."Speaker" {
Comment "Built-in speaker"
Comment "Speaker"
EnableSequence [
cset "name='SPK Switch' 1"
@ -167,12 +164,84 @@ SectionDevice."Speaker" {
PlaybackVolume "Speaker Volume"
PlaybackSwitch "SPK Switch"
PlaybackChannels 2
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
}
}
SectionDevice."MainInternalMicrophone" {
Comment "Main Internal Microphone"
SectionDevice."Earpiece" {
Comment "Earpiece"
EnableSequence [
cset "name='RCV Switch' 1"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='Output Volume' 57"
cset "name='Earpiece Volume' 1"
]
DisableSequence [
cset "name='RCV Switch' 0"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='Output Volume' 57"
cset "name='Earpiece Volume' 1"
]
Value {
PlaybackVolume "Earpiece Volume"
PlaybackSwitch "RCV Switch"
PlaybackChannels 2
PlaybackPriority 50
PlaybackPCM "hw:${CardId}"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
EnableSequence [
cset "name='HP Switch' 1"
cset "name='Headphone Volume' 50"
cset "name='Headphone ZC Switch' 0"
cset "name='AIF1DAC1 Volume' 96"
cset "name='AIF1 Boost Volume' 0"
cset "name='DAC1 Volume' 96"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
cset "name='AIF1DAC1 EQ Switch' 1"
cset "name='AIF1DAC1 EQ1 Volume' 16"
cset "name='AIF1DAC1 EQ2 Volume' 14"
cset "name='AIF1DAC1 EQ3 Volume' 12"
cset "name='AIF1DAC1 EQ4 Volume' 14"
cset "name='AIF1DAC1 EQ5 Volume' 16"
]
DisableSequence [
cset "name='HP Switch' 0"
cset "name='AIF1DAC1 EQ Switch' 0"
cset "name='Left Output Mixer DAC Volume' 7"
cset "name='Right Output Mixer DAC Volume' 7"
]
Value {
PlaybackVolume "Headphone Volume"
PlaybackSwitch "HP Switch"
PlaybackChannels 2
PlaybackPriority 150
PlaybackPCM "hw:${CardId}"
JackControl "Headset Jack"
}
}
SectionDevice."Mic" {
Comment "Microphone"
EnableSequence [
cset "name='Main Mic Switch' 1"
@ -193,8 +262,46 @@ SectionDevice."MainInternalMicrophone" {
]
Value {
CapturePCM "hw:${CardId}"
CaptureChannels 2
CaptureVolume "IN2L Volume"
CaptureChannels 2
CapturePriority 100
CapturePCM "hw:${CardId}"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
EnableSequence [
cset "name='MIXINL IN2L Switch' 0"
cset "name='Headset Mic Switch' 1"
cset "name='IN1L Volume' 24"
cset "name='MIXINL IN1L Switch' 1"
cset "name='MIXINL IN1L Volume' 0"
cset "name='AIF2ADC HPF Mode' 1"
cset "name='AIF2ADC HPF Switch' 1"
cset "name='AIF1ADC1 HPF Mode' 1"
cset "name='AIF1ADC1 HPF Switch' 1"
cset "name='AIF1ADC1 Volume' 96"
cset "name='AIF1ADCL Source' 0"
cset "name='AIF1ADCR Source' 0"
]
DisableSequence [
cset "name='Headset Mic Switch' 0"
cset "name='IN1L Volume' 11"
cset "name='MIXINL IN1L Switch' 0"
cset "name='MIXINL IN1L Volume' 0"
cset "name='AIF1ADC1 HPF Mode' 0"
cset "name='AIF1ADC1 HPF Switch' 0"
cset "name='AIF1ADC1 Volume' 96"
]
Value {
CaptureVolume "IN1L Volume"
CaptureChannels 2
CapturePriority 150
CapturePCM "hw:${CardId}"
JackControl "Headset Jack"
}
}

View file

@ -2,5 +2,5 @@ Syntax 2
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Play high quality music"
Comment "Hi-Fi audio"
}