sdk-hwV1.3/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-files/etc/asound.conf

415 lines
8.2 KiB
Plaintext
Raw Normal View History

2024-05-07 10:09:20 +00:00
hook_args.HookArgsDefault [
{
name "LINEOUT Switch"
preserve true
optional true
value 1
}
{
name "SPK Switch"
preserve true
optional true
value 1
}
{
name "LINEOUT Output Select"
preserve true
optional true
value "differ" #value=1, "single" value=0
}
# {
# name "LINEOUT volume"
# preserve true
# optional true
# value 31
# }
{
name "MIC1 Switch"
preserve true
optional true
value 1
}
{
name "MIC1 Input Select"
preserve true
optional true
value "differ" #value=0, "single" value=1
}
# {
# name "MIC1 gain volume"
# preserve true
# optional true
# value 31
# }
]
hook_args.HookArgsPlayback [
{
name "LINEOUT Switch"
preserve true
optional true
value 1
}
{
name "SPK Switch"
preserve true
optional true
value 1
}
{
name "LINEOUT Output Select"
preserve true
optional true
value "differ"
}
# {
# name "LINEOUT volume"
# preserve true
# optional true
# value 31
# }
]
hook_args.HookArgsCapture [
{
name "MIC1 Switch"
preserve true
optional true
value 1
}
{
name "MIC1 Input Select"
preserve true
optional true
value "differ"
}
# {
# name "MIC1 gain volume"
# preserve true
# optional true
# value 31
# }
]
pcm.!default {
type hooks
slave {
pcm {
type asym
playback.pcm "hw:{CARD=audiocodec, DEV=0}"
capture.pcm "hw:0,0"
}
}
hooks.0 {
type ctl_elems
hook_args HookArgsDefault
}
}
pcm.PlaybackRateDmix {
@args [ SAMPLERATE CHNNUM PERIODSIZE ]
@args.SAMPLERATE {
type integer
default 16000
}
@args.CHNNUM {
type integer
default 1
}
@args.PERIODSIZE {
type integer
2025-05-13 03:12:24 +00:00
default 256 #1024
2024-05-07 10:09:20 +00:00
}
type plug
slave.pcm {
type softvol
slave.pcm {
type hooks
slave.pcm {
type dmix
ipc_key 1111
ipc_perm 0666
slave {
pcm "hw:0,0"
format S16_LE
rate $SAMPLERATE
channels $CHNNUM
period_size $PERIODSIZE
2025-05-13 03:12:24 +00:00
periods 4
2024-05-07 10:09:20 +00:00
}
}
hooks.0 {
type ctl_elems
hook_args HookArgsPlayback
}
}
control {
name "Soft Volume Master"
card audiocodec
count 1
}
min_dB -26.0
max_dB 25.0
resolution 256
}
rate_converter "linear" #"speexrate"
}
#pcm.resample rely on alsa-plugin and libspeexdsp. Select them in menuconfig if we want to use plugin pcm.resample.
pcm.resample {
type plug
slave {
pcm "hw:0,0"
format S16_LE
rate 16000
channels 1
}
rate_converter "speexrate"
}
pcm.CaptureMic Capture1MicHard
# I2SRTX's I2S_SAMPLERATE and I2S_CHNNUM must be same to PlaybackRateDmix's SAMPLERATE and CHNNUM!
pcm.I2SRTX {
@args [ I2S_SAMPLERATE I2S_CHNNUM ]
@args.I2S_SAMPLERATE {
type integer
default 16000
}
@args.I2S_CHNNUM {
type integer
default 1
}
type hooks
slave.pcm {
type plug
slave {
pcm "hw:snddaudio0,0"
channels $I2S_CHNNUM
rate $I2S_SAMPLERATE
}
}
hooks.0 {
type ctl_elems
hook_args [
{
name "loopback debug"
preserve true
optional true
value 1
}
]
}
}
#pcm.CaptureI2SRX {
# type hooks
# slave.pcm "hw:snddaudio0,0"
# hooks.0 {
# type ctl_elems
# hook_args [
# {
# name "loopback debug"
# preserve true
# optional true
# value 1
# }
# ]
# }
#}
#pcm_slave.slaveCap {
# @args [ PCMID CHNNUM ]
# @args.PCMID {
# type string
# }
# @args.CHNNUM {
# type integer
# }
# pcm $PCMID
# channels $CHNNUM
#}
#pcm_slave.slaveMultiCapture {
# pcm {
# type multi
# slaves {
# a "slaveCap:CaptureMic,1"
# b "slaveCap:CaptureI2SRX,1"
# }
# bindings {
# 0 {slave a channel 0}
# 1 {slave b channel 0}
# }
# }
#}
#pcm.CaptureDouble {
# type plug
# slave slaveMultiCapture
# ttable.0.0 1
# ttable.1.1 1
#}
#we define pcm capture plugin naming convention:
#pcm.Capture<n>Mic:<SampleRate>, <n>: the number of MIC. It can auto convert to indicated channels. <SampleRate>: set sample rate to Hardware PCM.
#pcm.Capture<n>MicPlusAec, if enable aec, add PlusAec. It forbids to auto convert to multi channels because of aec.
# ref to GenerateCaptureIdentifier() in [audio_hw.c]
#e.g.:
#pcm.Capture1Mic:16000
#pcm.Capture1MicPlusAec
#pcm.Capture2Mic:16000
#pcm.Capture2MicPlusAec
pcm.Capture1Mic {
@args [ SAMPLERATE ]
@args.SAMPLERATE {
type integer
default 16000
}
type hooks
slave.pcm {
type plug
slave {
pcm "hw:0,0"
channels 1
rate $SAMPLERATE
}
}
hooks.0 {
type ctl_elems
hook_args HookArgsCapture
}
}
pcm.Capture1MicHard {
type hooks
slave.pcm "hw:0,0"
hooks.0 {
type ctl_elems
hook_args HookArgsCapture
}
}
pcm.Capture1MicPlusAec {
type route
slave.pcm {
type multi
slaves {
a {pcm Capture1MicHard channels 1}
b {pcm I2SRTX channels 1}
}
bindings {
0 {slave a channel 0}
1 {slave b channel 0}
}
}
ttable.0.0 1
ttable.1.1 1
}
pcm.Capture2Mic {
@args [ SAMPLERATE ]
@args.SAMPLERATE {
type integer
default 16000
}
type hooks
slave.pcm {
type plug
slave {
pcm "hw:0,0"
channels 2
rate $SAMPLERATE
}
}
hooks.0 {
type ctl_elems
hook_args [
{
name "MIC1 Switch"
preserve true
optional true
value 1
}
{
name "MIC1 Input Select"
preserve true
optional true
value "differ"
}
{
name "MIC2 Switch"
preserve true
optional true
value 1
}
{
name "MIC2 Input Select"
preserve true
optional true
value "differ"
}
]
}
}
pcm.Capture2MicHard {
type hooks
slave.pcm "hw:0,0"
hooks.0 {
type ctl_elems
hook_args [
{
name "MIC1 Switch"
preserve true
optional true
value 1
}
{
name "MIC1 Input Select"
preserve true
optional true
value "differ"
}
{
name "MIC2 Switch"
preserve true
optional true
value 1
}
{
name "MIC2 Input Select"
preserve true
optional true
value "differ"
}
]
}
}
pcm.Capture2MicPlusAec {
type route
slave.pcm {
type multi
slaves {
a {pcm Capture2MicHard channels 2}
b {pcm I2SRTX channels 1}
}
bindings {
0 {slave a channel 0}
1 {slave a channel 1}
2 {slave b channel 0}
}
}
ttable.0.0 1
ttable.1.1 1
ttable.2.2 1
}
pcm.eq {
type awequal
slave.pcm "hw:0,0"
config_file "/etc/awequal.conf"
tuning_support true
verbose true
}