Update example_vc4-hdmi.conf

This commit is contained in:
aiminick 2021-11-17 23:27:14 +08:00 committed by GitHub
parent 6268d50468
commit 0ad35b37e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 46 deletions

View File

@ -1,8 +1,38 @@
#
# Configuration for the VC4-HDMI sound card using software IEC958
# subframe conversion
#
<confdir:pcm/hdmi.conf>
vc4-hdmi.pcm.hdmi.0 {
<confdir:pcm/front.conf>
vc4-hdmi.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
}
# default with dmix
vc4-hdmi.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
@func concat
strings [ "dmix:" $CARD ]
}
}
}
<confdir:pcm/iec958.conf>
vc4-hdmi.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
@ -18,60 +48,17 @@ vc4-hdmi.pcm.hdmi.0 {
}
@args.AES3 {
type integer
default 0x01 # IEC958_AES3_CON_FS_NOTID
}
type iec958
slave {
format IEC958_SUBFRAME_LE
pcm {
type hooks
type plug
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "IEC958 Playback Default"
interface PCM
optional true
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}
}
status [ $AES0 $AES1 $AES2 $AES3 ]
hdmi_mode true
}
# default with plug
vc4-hdmi.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type plug
slave.pcm {
type softvol
slave.pcm {
@func concat
strings [
"hdmi:"
"CARD=" $CARD ","
"AES0=0x00," # IEC958_AES0_CON_EMPHASIS_NONE
"AES1=0x82," # IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER
"AES2=0x00," # IEC958_AES2_CON_SOURCE_UNSPEC | IEC958_AES2_CON_CHANNEL_UNSPEC
"AES3=0x01" # IEC958_AES3_CON_FS_NOTID
]
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}