mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
CAINIAO CNIoT-CORE: add internal speaker support
This commit is contained in:
@@ -10,6 +10,9 @@ FULL_DESKTOP="yes"
|
|||||||
SERIALCON="ttyAML0"
|
SERIALCON="ttyAML0"
|
||||||
BOOT_LOGO="desktop"
|
BOOT_LOGO="desktop"
|
||||||
BOOT_FDT_FILE="amlogic/meson-g12b-a311d-cainiao-cniot-core.dtb"
|
BOOT_FDT_FILE="amlogic/meson-g12b-a311d-cainiao-cniot-core.dtb"
|
||||||
|
# playback via HDMI: aplay -D plughw:CNIoTCORE,0 /usr/share/sounds/alsa/Front_Center.wav
|
||||||
|
# playback via internal speaker: aplay -D plughw:CNIoTCORE,1 /usr/share/sounds/alsa/Front_Center.wav
|
||||||
|
ASOUND_STATE="asound.state.cainiao-cniot-core"
|
||||||
|
|
||||||
BOOTBRANCH_BOARD="tag:v2025.04"
|
BOOTBRANCH_BOARD="tag:v2025.04"
|
||||||
BOOTPATCHDIR="v2025.04" # This has a patch that adds support for CAINIAO CNIoT-CORE.
|
BOOTPATCHDIR="v2025.04" # This has a patch that adds support for CAINIAO CNIoT-CORE.
|
||||||
|
|||||||
621
packages/blobs/asound.state/asound.state.cainiao-cniot-core
Normal file
621
packages/blobs/asound.state/asound.state.cainiao-cniot-core
Normal file
@@ -0,0 +1,621 @@
|
|||||||
|
state.CNIoTCORE {
|
||||||
|
control.1 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOACODEC Lane Select'
|
||||||
|
value 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 1
|
||||||
|
range '0 - 3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.2 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Playback Channel Mode'
|
||||||
|
value Stereo
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 Stereo
|
||||||
|
item.1 Mono
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.3 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Playback Switch'
|
||||||
|
value true
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.4 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Playback Volume'
|
||||||
|
value.0 255
|
||||||
|
value.1 255
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
dbmin -9999999
|
||||||
|
dbmax 0
|
||||||
|
dbvalue.0 0
|
||||||
|
dbvalue.1 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.5 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Ramp Rate'
|
||||||
|
value Fast
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 Fast
|
||||||
|
item.1 Slow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.6 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Volume Ramp Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.7 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Mute Ramp Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.8 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Unmute Ramp Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.9 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C Lane 0 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.10 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C Lane 1 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.11 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C Lane 2 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.12 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C Lane 3 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.13 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C Gain Enable Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.14 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B Lane 0 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.15 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B Lane 1 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.16 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B Lane 2 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.17 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B Lane 3 Volume'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type INTEGER
|
||||||
|
count 2
|
||||||
|
range '0 - 255'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.18 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B Gain Enable Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.19 {
|
||||||
|
iface PCM
|
||||||
|
device 7
|
||||||
|
name 'Playback Channel Map'
|
||||||
|
value.0 0
|
||||||
|
value.1 0
|
||||||
|
value.2 0
|
||||||
|
value.3 0
|
||||||
|
value.4 0
|
||||||
|
value.5 0
|
||||||
|
value.6 0
|
||||||
|
value.7 0
|
||||||
|
comment {
|
||||||
|
access 'read volatile'
|
||||||
|
type INTEGER
|
||||||
|
count 8
|
||||||
|
range '0 - 36'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.20 {
|
||||||
|
iface PCM
|
||||||
|
device 7
|
||||||
|
name 'IEC958 Playback Mask'
|
||||||
|
value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
comment {
|
||||||
|
access read
|
||||||
|
type IEC958
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.21 {
|
||||||
|
iface PCM
|
||||||
|
device 7
|
||||||
|
name 'IEC958 Playback Default'
|
||||||
|
value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type IEC958
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.22 {
|
||||||
|
iface PCM
|
||||||
|
device 7
|
||||||
|
name ELD
|
||||||
|
value '100008006d10000100000000000000003669c2ac4d414732373451205144204532097f070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
|
||||||
|
comment {
|
||||||
|
access 'read volatile'
|
||||||
|
type BYTES
|
||||||
|
count 128
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.23 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SRC 1 EN Switch'
|
||||||
|
value true
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.24 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SRC 2 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.25 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SRC 3 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.26 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SINK 1 SEL'
|
||||||
|
value 'OUT 1'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.27 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SINK 2 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.28 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_A SINK 3 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.29 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SRC 1 EN Switch'
|
||||||
|
value true
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.30 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SRC 2 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.31 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SRC 3 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.32 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SINK 1 SEL'
|
||||||
|
value 'OUT 2'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.33 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SINK 2 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.34 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_B SINK 3 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.35 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SRC 1 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.36 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SRC 2 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.37 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SRC 3 EN Switch'
|
||||||
|
value false
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.38 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SINK 1 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.39 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SINK 2 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.40 {
|
||||||
|
iface MIXER
|
||||||
|
name 'FRDDR_C SINK 3 SEL'
|
||||||
|
value 'OUT 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'OUT 0'
|
||||||
|
item.1 'OUT 1'
|
||||||
|
item.2 'OUT 2'
|
||||||
|
item.3 'OUT 3'
|
||||||
|
item.4 'OUT 4'
|
||||||
|
item.5 'OUT 5'
|
||||||
|
item.6 'OUT 6'
|
||||||
|
item.7 'OUT 7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.41 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOHDMITX I2S SRC'
|
||||||
|
value 'I2S B'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'I2S A'
|
||||||
|
item.1 'I2S B'
|
||||||
|
item.2 'I2S C'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.42 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOHDMITX Switch'
|
||||||
|
value true
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.43 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOHDMITX SPDIF SRC'
|
||||||
|
value 'SPDIF A'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'SPDIF A'
|
||||||
|
item.1 'SPDIF B'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.44 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOACODEC SRC'
|
||||||
|
value 'I2S C'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'I2S A'
|
||||||
|
item.1 'I2S B'
|
||||||
|
item.2 'I2S C'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.45 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TOACODEC OUT EN Switch'
|
||||||
|
value true
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type BOOLEAN
|
||||||
|
count 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.46 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Right DAC Sel'
|
||||||
|
value Right
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 Right
|
||||||
|
item.1 Left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.47 {
|
||||||
|
iface MIXER
|
||||||
|
name 'ACODEC Left DAC Sel'
|
||||||
|
value Left
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 Left
|
||||||
|
item.1 Right
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.48 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_C SRC SEL'
|
||||||
|
value 'IN 1'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'IN 0'
|
||||||
|
item.1 'IN 1'
|
||||||
|
item.2 'IN 2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
control.49 {
|
||||||
|
iface MIXER
|
||||||
|
name 'TDMOUT_B SRC SEL'
|
||||||
|
value 'IN 0'
|
||||||
|
comment {
|
||||||
|
access 'read write'
|
||||||
|
type ENUMERATED
|
||||||
|
count 1
|
||||||
|
item.0 'IN 0'
|
||||||
|
item.1 'IN 1'
|
||||||
|
item.2 'IN 2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "meson-g12b-a311d.dtsi"
|
#include "meson-g12b-a311d.dtsi"
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||||
|
#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||||
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@@ -81,6 +82,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ht6872: ht6872 {
|
||||||
|
compatible = "simple-audio-amplifier";
|
||||||
|
enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||||
|
VCC-supply = <&vdd_amp>;
|
||||||
|
sound-name-prefix = "HT6872";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
sdio_pwrseq: sdio-pwrseq {
|
sdio_pwrseq: sdio-pwrseq {
|
||||||
compatible = "mmc-pwrseq-simple";
|
compatible = "mmc-pwrseq-simple";
|
||||||
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||||
@@ -167,14 +176,33 @@
|
|||||||
vin-supply = <&dc_in>;
|
vin-supply = <&dc_in>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vdd_amp: regulator-vdd-amp {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&gpio GPIOH_7 GPIO_ACTIVE_HIGH>;
|
||||||
|
regulator-name = "vdd_amp";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
vin-supply = <&dc_in>;
|
||||||
|
};
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "amlogic,axg-sound-card";
|
compatible = "amlogic,axg-sound-card";
|
||||||
model = "CNIoT-CORE";
|
model = "CNIoT-CORE";
|
||||||
audio-aux-devs = <&tdmout_b>;
|
audio-widgets = "Line", "Lineout";
|
||||||
|
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&ht6872>;
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||||
"TDM_B Playback", "TDMOUT_B OUT";
|
"TDM_B Playback", "TDMOUT_B OUT",
|
||||||
|
"TDMOUT_C IN 0", "FRDDR_A OUT 2",
|
||||||
|
"TDMOUT_C IN 1", "FRDDR_B OUT 2",
|
||||||
|
"TDMOUT_C IN 2", "FRDDR_C OUT 2",
|
||||||
|
"TDM_C Playback", "TDMOUT_C OUT",
|
||||||
|
"HT6872 INL", "ACODEC LOLP",
|
||||||
|
"HT6872 INR", "ACODEC LORP",
|
||||||
|
"Lineout", "HT6872 OUTL",
|
||||||
|
"Lineout", "HT6872 OUTR";
|
||||||
|
|
||||||
clocks = <&clkc CLKID_MPLL2>,
|
clocks = <&clkc CLKID_MPLL2>,
|
||||||
<&clkc CLKID_MPLL0>,
|
<&clkc CLKID_MPLL0>,
|
||||||
@@ -215,17 +243,42 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* hdmi glue */
|
|
||||||
dai-link-4 {
|
dai-link-4 {
|
||||||
|
sound-dai = <&tdmif_c>;
|
||||||
|
dai-format = "i2s";
|
||||||
|
dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||||
|
mclk-fs = <256>;
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&toacodec TOACODEC_IN_C>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* hdmi glue */
|
||||||
|
dai-link-5 {
|
||||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||||
|
|
||||||
codec {
|
codec {
|
||||||
sound-dai = <&hdmi_tx>;
|
sound-dai = <&hdmi_tx>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* acodec glue */
|
||||||
|
dai-link-6 {
|
||||||
|
sound-dai = <&toacodec TOACODEC_OUT>;
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&acodec>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&acodec {
|
||||||
|
AVDD-supply = <&vddao_1v8>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&arb {
|
&arb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@@ -460,10 +513,22 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&tdmif_c {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&tdmout_b {
|
&tdmout_b {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&tdmout_c {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&toacodec {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&tohdmitx {
|
&tohdmitx {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "meson-g12b-a311d.dtsi"
|
#include "meson-g12b-a311d.dtsi"
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||||
|
#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||||
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@@ -81,6 +82,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ht6872: ht6872 {
|
||||||
|
compatible = "simple-audio-amplifier";
|
||||||
|
enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||||
|
VCC-supply = <&vdd_amp>;
|
||||||
|
sound-name-prefix = "HT6872";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
sdio_pwrseq: sdio-pwrseq {
|
sdio_pwrseq: sdio-pwrseq {
|
||||||
compatible = "mmc-pwrseq-simple";
|
compatible = "mmc-pwrseq-simple";
|
||||||
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||||
@@ -167,14 +176,33 @@
|
|||||||
vin-supply = <&dc_in>;
|
vin-supply = <&dc_in>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vdd_amp: regulator-vdd-amp {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&gpio GPIOH_7 GPIO_ACTIVE_HIGH>;
|
||||||
|
regulator-name = "vdd_amp";
|
||||||
|
regulator-always-on;
|
||||||
|
regulator-boot-on;
|
||||||
|
vin-supply = <&dc_in>;
|
||||||
|
};
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "amlogic,axg-sound-card";
|
compatible = "amlogic,axg-sound-card";
|
||||||
model = "CNIoT-CORE";
|
model = "CNIoT-CORE";
|
||||||
audio-aux-devs = <&tdmout_b>;
|
audio-widgets = "Line", "Lineout";
|
||||||
|
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&ht6872>;
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||||
"TDM_B Playback", "TDMOUT_B OUT";
|
"TDM_B Playback", "TDMOUT_B OUT",
|
||||||
|
"TDMOUT_C IN 0", "FRDDR_A OUT 2",
|
||||||
|
"TDMOUT_C IN 1", "FRDDR_B OUT 2",
|
||||||
|
"TDMOUT_C IN 2", "FRDDR_C OUT 2",
|
||||||
|
"TDM_C Playback", "TDMOUT_C OUT",
|
||||||
|
"HT6872 INL", "ACODEC LOLP",
|
||||||
|
"HT6872 INR", "ACODEC LORP",
|
||||||
|
"Lineout", "HT6872 OUTL",
|
||||||
|
"Lineout", "HT6872 OUTR";
|
||||||
|
|
||||||
clocks = <&clkc CLKID_MPLL2>,
|
clocks = <&clkc CLKID_MPLL2>,
|
||||||
<&clkc CLKID_MPLL0>,
|
<&clkc CLKID_MPLL0>,
|
||||||
@@ -215,17 +243,42 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* hdmi glue */
|
|
||||||
dai-link-4 {
|
dai-link-4 {
|
||||||
|
sound-dai = <&tdmif_c>;
|
||||||
|
dai-format = "i2s";
|
||||||
|
dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||||
|
mclk-fs = <256>;
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&toacodec TOACODEC_IN_C>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* hdmi glue */
|
||||||
|
dai-link-5 {
|
||||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||||
|
|
||||||
codec {
|
codec {
|
||||||
sound-dai = <&hdmi_tx>;
|
sound-dai = <&hdmi_tx>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* acodec glue */
|
||||||
|
dai-link-6 {
|
||||||
|
sound-dai = <&toacodec TOACODEC_OUT>;
|
||||||
|
|
||||||
|
codec {
|
||||||
|
sound-dai = <&acodec>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&acodec {
|
||||||
|
AVDD-supply = <&vddao_1v8>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&arb {
|
&arb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@@ -460,10 +513,22 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&tdmif_c {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&tdmout_b {
|
&tdmout_b {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&tdmout_c {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&toacodec {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&tohdmitx {
|
&tohdmitx {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -128,10 +128,10 @@ index 00000000..345d9b86
|
|||||||
+CONFIG_ZSTD=y
|
+CONFIG_ZSTD=y
|
||||||
diff --git a/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
diff --git a/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..767b6e71
|
index 00000000..40b81e87
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
+++ b/dts/upstream/src/arm64/amlogic/meson-g12b-a311d-cainiao-cniot-core.dts
|
||||||
@@ -0,0 +1,506 @@
|
@@ -0,0 +1,571 @@
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2019 BayLibre, SAS
|
+ * Copyright (c) 2019 BayLibre, SAS
|
||||||
@@ -145,6 +145,7 @@ index 00000000..767b6e71
|
|||||||
+#include "meson-g12b-a311d.dtsi"
|
+#include "meson-g12b-a311d.dtsi"
|
||||||
+#include <dt-bindings/input/input.h>
|
+#include <dt-bindings/input/input.h>
|
||||||
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||||
|
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||||
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||||
+
|
+
|
||||||
+/ {
|
+/ {
|
||||||
@@ -215,6 +216,14 @@ index 00000000..767b6e71
|
|||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ ht6872: ht6872 {
|
||||||
|
+ compatible = "simple-audio-amplifier";
|
||||||
|
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ VCC-supply = <&vdd_amp>;
|
||||||
|
+ sound-name-prefix = "HT6872";
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ sdio_pwrseq: sdio-pwrseq {
|
+ sdio_pwrseq: sdio-pwrseq {
|
||||||
+ compatible = "mmc-pwrseq-simple";
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||||
@@ -301,14 +310,33 @@ index 00000000..767b6e71
|
|||||||
+ vin-supply = <&dc_in>;
|
+ vin-supply = <&dc_in>;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ vdd_amp: regulator-vdd-amp {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ enable-active-high;
|
||||||
|
+ gpio = <&gpio GPIOH_7 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ regulator-name = "vdd_amp";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ vin-supply = <&dc_in>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ sound {
|
+ sound {
|
||||||
+ compatible = "amlogic,axg-sound-card";
|
+ compatible = "amlogic,axg-sound-card";
|
||||||
+ model = "CNIoT-CORE";
|
+ model = "CNIoT-CORE";
|
||||||
+ audio-aux-devs = <&tdmout_b>;
|
+ audio-widgets = "Line", "Lineout";
|
||||||
|
+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&ht6872>;
|
||||||
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||||
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||||
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||||
+ "TDM_B Playback", "TDMOUT_B OUT";
|
+ "TDM_B Playback", "TDMOUT_B OUT",
|
||||||
|
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
|
||||||
|
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
|
||||||
|
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
|
||||||
|
+ "TDM_C Playback", "TDMOUT_C OUT",
|
||||||
|
+ "HT6872 INL", "ACODEC LOLP",
|
||||||
|
+ "HT6872 INR", "ACODEC LORP",
|
||||||
|
+ "Lineout", "HT6872 OUTL",
|
||||||
|
+ "Lineout", "HT6872 OUTR";
|
||||||
+
|
+
|
||||||
+ clocks = <&clkc CLKID_MPLL2>,
|
+ clocks = <&clkc CLKID_MPLL2>,
|
||||||
+ <&clkc CLKID_MPLL0>,
|
+ <&clkc CLKID_MPLL0>,
|
||||||
@@ -349,17 +377,42 @@ index 00000000..767b6e71
|
|||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
+ /* hdmi glue */
|
|
||||||
+ dai-link-4 {
|
+ dai-link-4 {
|
||||||
|
+ sound-dai = <&tdmif_c>;
|
||||||
|
+ dai-format = "i2s";
|
||||||
|
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||||
|
+ mclk-fs = <256>;
|
||||||
|
+
|
||||||
|
+ codec {
|
||||||
|
+ sound-dai = <&toacodec TOACODEC_IN_C>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /* hdmi glue */
|
||||||
|
+ dai-link-5 {
|
||||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||||
+
|
+
|
||||||
+ codec {
|
+ codec {
|
||||||
+ sound-dai = <&hdmi_tx>;
|
+ sound-dai = <&hdmi_tx>;
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
|
+
|
||||||
|
+ /* acodec glue */
|
||||||
|
+ dai-link-6 {
|
||||||
|
+ sound-dai = <&toacodec TOACODEC_OUT>;
|
||||||
|
+
|
||||||
|
+ codec {
|
||||||
|
+ sound-dai = <&acodec>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
|
+&acodec {
|
||||||
|
+ AVDD-supply = <&vddao_1v8>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
+&arb {
|
+&arb {
|
||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+};
|
+};
|
||||||
@@ -594,10 +647,22 @@ index 00000000..767b6e71
|
|||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
|
+&tdmif_c {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
+&tdmout_b {
|
+&tdmout_b {
|
||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
|
+&tdmout_c {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&toacodec {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
+&tohdmitx {
|
+&tohdmitx {
|
||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+};
|
+};
|
||||||
|
|||||||
Reference in New Issue
Block a user