first commit

This commit is contained in:
Your Name
2026-02-07 20:22:48 +08:00
commit 1b9711d5e4
2270 changed files with 805872 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
Use Case Configuration files
----------------------------
Library directories:
platforms/
codecs/
dsps/
Those directories are not inspected for the list of
available UCM configurations. They contain files
included from other UCMs.
Syntax, value names
-------------------
https://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=include/use-case.h

View File

@@ -0,0 +1,23 @@
# Usecase for device HDMI0/Display Port stereo playback on rockchip platforms
# For Audio in I2S mode
SectionDevice."DP0" {
Comment "DP Port"
Value {
PlaybackPriority 500
PlaybackPCM "hw:${CardId}"
If.1 {
Condition {
Type ControlExists
Control "iface=CARD,name='rockchip-dp0 Jack'"
}
True {
JackControl "rockchip-dp0 Jack"
}
False {
JackControl "rockchip-dp0 Jack"
}
}
}
}

View File

@@ -0,0 +1,8 @@
Syntax 2
Comment "Rockchip DP card"
SectionUseCase."HDMI" {
File "Hdmi.conf"
Comment "DP Port"
}

View File

@@ -0,0 +1,116 @@
SectionVerb {
Value {
MinBufferLevel "512"
}
EnableSequence [
cset "name='Speaker Switch' off"
cset "name='Headphone Switch' off"
cset "name='Headset Mic Switch' off"
cset "name='Main Mic Switch' off"
cset "name='Speaker Switch' off"
cset "name='Headphone Switch' off"
cset "name='Headset Mic Switch' off"
cset "name='Main Mic Switch' off"
cset "name='PCM Volume' 192"
cset "name='Output 1 Playback Volume' 27"
cset "name='Output 2 Playback Volume' 27"
cset "name='Capture Digital Volume' 192"
cset "name='Left Channel Capture Volume' 3"
cset "name='Right Channel Capture Volume' 3"
cset "name='Left Mixer Left Playback Switch' on"
cset "name='Right Mixer Right Playback Switch' on"
cset "name='Capture Mute' off"
cset "name='Right PGA Mux' DifferentialR"
cset "name='Left PGA Mux' DifferentialL"
]
}
SectionDevice."Speaker" {
Comment "Speaker"
ConflictingDevice [
"Headphones"
]
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
}
EnableSequence [
cset "name='Speaker Switch' on"
]
DisableSequence [
cset "name='Speaker Switch' off"
]
}
SectionDevice."Mic" {
Comment "Internal Microphone"
ConflictingDevice [
"Headset"
]
Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
}
EnableSequence [
cset "name='Differential Mux' Line 2"
cset "name='Main Mic Switch' on"
]
DisableSequence [
cset "name='Main Mic Switch' off"
]
}
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Speaker"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
JackControl "Headphone Jack"
JackHWMute "Speaker"
}
EnableSequence [
cset "name='Headphone Switch' on"
]
DisableSequence [
cset "name='Headphone Switch' off"
]
}
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Mic"
]
Value {
CapturePriority 200
CapturePCM "hw:${CardId}"
JackControl "Headset Mic Jack"
JackHWMute "Mic"
}
EnableSequence [
cset "name='Differential Mux' Line 1"
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}

View File

@@ -0,0 +1,8 @@
Syntax 2
Comment "Rockchip ES8388 card"
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Default"
}

View File

@@ -0,0 +1,23 @@
# Usecase for device HDMI0/Display Port stereo playback on rockchip platforms
# For Audio in I2S mode
SectionDevice."HDMI0" {
Comment "HDMI"
Value {
PlaybackPriority 300
PlaybackPCM "hw:${CardId}"
If.1 {
Condition {
Type ControlExists
Control "iface=CARD,name='rockchip-hdmi0 Jack'"
}
True {
#JackControl "rockchip-hdmi0 Jack"
}
False {
#JackControl "rockchip-hdmi0 Jack"
}
}
}
}

View File

@@ -0,0 +1,8 @@
Syntax 2
Comment "Rockchip HDMI card"
SectionUseCase."HDMI" {
File "Hdmi.conf"
Comment "HDMI"
}

View File

@@ -0,0 +1,135 @@
#
# This is the toplevel file included from the alsa-lib.
#
# It allows to add extra lookups for the old kernels or so.
#
# You may specify the directory (relative to the toplevel) and
# the master configuration file which defines the verbs.
#
#
# Syntax version is reset for the master configuration file.
#
Syntax 3
Define.V1 "" # non-empty string to enable ucm v1 paths
Define.V2Module yes # empty string to disable
Define.V2Name yes # empty string to disable
If.driver {
Condition {
Type String
Empty "${CardNumber}"
}
True {
#
# The probed path for no-hw-card:
#
# ucm2/${OpenName}/${OpenName}.conf
#
UseCasePath {
legacy {
Directory "${OpenName}"
File "${OpenName}.conf"
}
}
}
False {
#
# The probed path when hw-card is found:
#
# ucm2/${KernelModule}/${KernelModule}.conf
# ucm2/${CardDriver}/${CardLongName}.conf
# ucm2/${CardDriver}/${CardDriver}.conf
#
If.V2Module {
Condition {
Type String
Empty "${var:V2Module}"
}
False {
Define.KernelModulePath "class/sound/card${CardNumber}/device/driver"
Define.KernelModule "${sys:$KernelModulePath}"
UseCasePath.module {
Directory "module"
File "${var:KernelModule}.conf"
}
}
}
If.V2Name {
Condition {
Type String
Empty "${var:V2Name}"
}
False.UseCasePath {
longname {
Directory "${CardDriver}"
File "${CardLongName}.conf"
}
driver {
Directory "${CardDriver}"
File "${CardDriver}.conf"
}
}
}
}
}
If.V1 {
Condition {
Type String
Empty "${var:V1}"
}
False.If.v1_driver {
Condition {
Type String
Empty "${CardNumber}"
}
True {
#
# The probed path for no-hw-card:
#
# ucm/${OpenName}/${OpenName}.conf
#
UseCasePath.v1_legacy {
Version 1
Directory "${OpenName}"
File "${OpenName}.conf"
}
}
False {
#
# The ucm v1 probed path when hw-card is found:
#
# ucm/${CardLongName}/${CardLongName}.conf
# ucm/${CardName}/${CardName}.conf or \
# ucm/${OpenName}/${OpenName}.conf
#
UseCasePath.v1_longname {
Version 1
Directory "${CardLongName}"
File "${CardLongName}.conf"
}
If.v1_hw {
Condition {
Type String
Haystack "${OpenName}"
Needle "hw:"
}
True.UseCasePath.v1_cardnamme {
Version 1
Directory "${CardName}"
File "${CardName}.conf"
}
False.UseCasePath.v1_openname {
Version 1
Directory "${OpenName}"
File "${OpenName}.conf"
}
}
}
}
}