mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
conf: vc4-hdmi: use a proper hdmi pcm, fix broken default pcm
Userspace expects to see a HDMI pcm, so remove the somewhat broken front and iec958 pcms and add a proper hdmi pcm instead. The hdmi pcm supports HD/HBR audio passthrough and relays the IEC958 status bits on to the kernel driver so it can switch to HBR audio packets if needed. The control hook is marked optional because kernels before 5.14 didn't expose the IEC958 controls. The default pcm never worked as dmix doesn't support the iec958 format. So drop dmix, only use plug and softvol, and use the hdmi pcm for iec958 formatting. Fixes: https://github.com/alsa-project/alsa-lib/issues/229 Link: https://lore.kernel.org/alsa-devel/20220430142845.229409-1-hias@horus.com/ Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
17ba712447
commit
df621629d8
1 changed files with 48 additions and 30 deletions
|
|
@ -3,36 +3,9 @@
|
|||
# subframe conversion
|
||||
#
|
||||
|
||||
<confdir:pcm/front.conf>
|
||||
<confdir:pcm/hdmi.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 {
|
||||
vc4-hdmi.pcm.hdmi.0 {
|
||||
@args [ CARD AES0 AES1 AES2 AES3 ]
|
||||
@args.CARD {
|
||||
type string
|
||||
|
|
@ -53,12 +26,57 @@ vc4-hdmi.pcm.iec958.0 {
|
|||
slave {
|
||||
format IEC958_SUBFRAME_LE
|
||||
pcm {
|
||||
type plug
|
||||
type hooks
|
||||
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 and softvol
|
||||
vc4-hdmi.pcm.default {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type asym
|
||||
playback.pcm {
|
||||
type plug
|
||||
slave.pcm {
|
||||
type softvol
|
||||
slave.pcm {
|
||||
@func concat
|
||||
strings [
|
||||
"cards.vc4-hdmi.pcm.hdmi.0:"
|
||||
"CARD=" $CARD ","
|
||||
"AES0=0x04," # IEC958_AES0_CON_NOT_COPYRIGHT | 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 (iec958 plugin will fill in actual rate)
|
||||
]
|
||||
}
|
||||
control {
|
||||
name "PCM Playback Volume"
|
||||
card $CARD
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue