Support RK3588S Orange Pi 5

This commit is contained in:
orangepi-xunlong
2022-12-02 19:51:41 +08:00
parent 564f03addc
commit 35069ec81c
128 changed files with 17176 additions and 258 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"
}
}
}
}
}

View File

@@ -0,0 +1,31 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
; For devices where a 'Headset Mic' or 'Headset Mic Boost' element exists
;
; See analog-output.conf.common for an explanation on the directives
[General]
priority = 88
description-key = analog-input-microphone-headset
[Element Capture]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
.include analog-input-mic.conf.common

View File

@@ -0,0 +1,9 @@
[General]
description = analog-output-headphones
priority = 59
[Properties]
device.icon_name = rockchip-headphones
[Jack Headphone]
required = any

View File

@@ -0,0 +1,10 @@
[General]
description = HDMI / DisplayPort1
priority = 59
eld-device = 0
[Properties]
device.icon_name = rockchip-hdmi0
[Jack rockchip,hdmi0]
required = any

View File

@@ -0,0 +1,10 @@
[General]
description = HDMI / DisplayPort2
priority = 59
eld-device = 0
[Properties]
device.icon_name = rockchip-hdmi1
[Jack rockchip,hdmi1]
required = any

View File

@@ -0,0 +1,43 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
; This profile forces a speaker port even if we have no way of identifying it.
; See default.conf for explanations.
[General]
auto-profiles = yes
[Mapping hdmi-stereo]
description = Digital Stereo (HDMI)
device-strings = hw:%f
paths-output = hdmi-output-rockchip-1
channel-map = left,right
priority = 8
direction = output
description = Digital Stereo (HDMI 2)
device-strings = hw:%f
paths-output = hdmi-output-rockchip-2
channel-map = left,right
priority = 21
direction = output
; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
#output-mappings = analog-stereo iec958-stereo
#input-mappings = analog-stereo

View File

@@ -0,0 +1,33 @@
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
; This profile forces a speaker port even if we have no way of identifying it.
; See default.conf for explanations.
[General]
auto-profiles = yes
[Mapping analog-stereo]
device-strings = hw:%f
channel-map = left,right
paths-output = analog-output-headphones-rockchip
paths-input = analog-input-headset-mic-rockchip
priority = 5
; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
#output-mappings = analog-stereo iec958-stereo
#input-mappings = analog-stereo

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,91 @@
???
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
traffic light
fire hydrant
???
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
???
backpack
umbrella
???
???
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
???
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
couch
potted plant
bed
???
dining table
???
???
toilet
???
tv
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
???
book
clock
vase
scissors
teddy bear
hair drier
toothbrush

Binary file not shown.