Question regarding HDMI Audio support on i.MX6 with vanilla kernel
Russell King - ARM Linux
linux at armlinux.org.uk
Mon Nov 6 11:51:03 UTC 2017
On Mon, Nov 06, 2017 at 11:46:52AM +0000, Luís Mendes wrote:
> Hi Russell,
>
> First of all sorry for posting this here, it isn't directly related with
> etnaviv, but results from the use of vanilla kernels.
>
> I have been struggling with DW-HDMI to output audio... I've noticed that
> the driver is loaded and that alsa shows the audio device, but I am unable
> to get sound.
> No sound output even if I set the sound output with alsa or pacmd. Alsa
> shows no mixer or mute controls for the output.
You are probably missing the alsalib configuration file. I've attached
it, which should be placed in /usr/share/alsa/cards/dw-hdmi-ahb-aud.conf
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
-------------- next part --------------
#
# All PCM must be 24-bit for easy kernel conversion.
# IEC958 formatted output can be sent directly.
#
# Direct-to-hardware converting to 24-bit output.
#
dw-hdmi-ahb-aud.pcm.hw-s24le {
@args [ CARD ]
@args.CARD { type string }
type linear
slave.pcm {
type hw
card $CARD
}
slave.format S24_LE
}
#
# Dmix hardware 24-bit output.
#
dw-hdmi-ahb-aud.pcm.dmix-s24le {
@args [ CARD ]
@args.CARD { type string }
type plug
slave.pcm { @func concat strings [ "dmix:" $CARD ",FORMAT=S24_LE" ] }
}
#
# Softvol with dmix output
#
dw-hdmi-ahb-aud.pcm.default {
@args [ CARD ]
@args.CARD { type string }
type asym
playback.pcm {
type softvol
slave.pcm {
@func refer name {
@func concat strings [
"cards."
{ @func card_driver card $CARD }
".pcm.dmix-s24le:CARD=" $CARD
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
#
# Common output path for front and surround outputs
#
dw-hdmi-ahb-aud.pcm.common.0 {
@args [ CARD ]
@args.CARD { type string }
type asym
playback.pcm {
type softvol
slave.pcm {
@func refer name {
@func concat strings [
"cards."
{ @func card_driver card $CARD }
".pcm.hw-s24le:CARD=" $CARD
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
<confdir:pcm/front.conf>
dw-hdmi-ahb-aud.pcm.front.0 cards.dw-hdmi-ahb-aud.pcm.common.0
# The mapping of ALSA channels to surround channels is very imprecise.
# ALSA uses a different terminology and speaker placement to the CEA
# surround positioning. CEA has the positioning of:
#
# LFE
# FL FLC FC FRC FR
#
#
# RL RLC RC RRC RR
#
# ALSA's idea is:
#
# LFE
# FL C FR
#
# SL SR
#
# RL RR
#
# We do our best to map between these representations.
<confdir:pcm/surround40.conf>
dw-hdmi-ahb-aud.pcm.surround40.0 {
@args [ CARD ]
@args.CARD { type string }
type empty
slave.pcm {
@func refer
name {
@func concat strings [
"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD="
$CARD
]
}
}
}
# surround 41 and surround50 are (annoyingly) mapped to surround51
# We could do without stacking two 'route' plugins on top of each other
<confdir:pcm/surround41.conf>
<confdir:pcm/surround50.conf>
<confdir:pcm/surround51.conf>
dw-hdmi-ahb-aud.pcm.surround51.0 {
@args [ CARD ]
@args.CARD { type string }
type route
slave.pcm {
@func refer
name {
@func concat strings [
"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD="
$CARD
]
}
}
ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
ttable.2.4 1.0 # RL -> slave 4 -> hdmi 4 RL
ttable.3.5 1.0 # RR -> slave 5 -> hdmi 5 RR
ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
}
<confdir:pcm/surround71.conf>
dw-hdmi-ahb-aud.pcm.surround71.0 {
@args [ CARD ]
@args.CARD { type string }
type route
slave.pcm {
@func refer
name {
@func concat strings [
"cards.dw-hdmi-ahb-aud.pcm.common.0:CARD="
$CARD
]
}
}
slave.channels 8
ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
ttable.2.6 1.0 # RL -> slave 6 -> hdmi 6 RLC/FLC
ttable.3.7 1.0 # RR -> slave 7 -> hdmi 7 RRC/FRC
ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
ttable.6.4 1.0 # SL -> slave 4 -> hdmi 4 RL
ttable.7.5 1.0 # SR -> slave 5 -> hdmi 5 RR
}
<confdir:pcm/hdmi.conf>
dw-hdmi-ahb-aud.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type iec958
slave.pcm {
type hw
card $CARD
}
slave.format IEC958_SUBFRAME_LE
# $AES3 must be correct for some AV receivers to accept the stream
status [ $AES0 $AES1 $AES2 $AES3 ]
}
<confdir:pcm/iec958.conf>
dw-hdmi-ahb-aud.pcm.iec958.0 cards.dw-hdmi-ahb-aud.pcm.hdmi.0
More information about the etnaviv
mailing list