Question regarding HDMI Audio support on i.MX6 with vanilla kernel

Luís Mendes luis.p.mendes at gmail.com
Mon Nov 6 23:33:18 UTC 2017


I've enable dynamic debug in the kernel module and got this log below.
Is it my impression or dw_hdmi goes into DVI mode because is unable to get
edid, which is why I don't get sound?
According to the module code in dw_hdmi_connector_get_modes of dw-hdmi.c:
hdmi->sink_is_hdmi and hdmi->sink_has_audio is only set when EDID can be
read via I2C DDC.

[  153.516490] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.30a
with HDCP (DWC HDMI 3D TX
PHY)
[  153.517553] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi:
hdmi_set_clk_regenerator: fs=48000Hz ftdms=74.250MHz N=6144
cts=74250
[  153.519083] dw_hdmi_irq:2146: dwhdmi-imx 120000.hdmi:
EVENT=plugin

[  153.523424] imx-drm display-subsystem: bound 120000.hdmi (ops
dw_hdmi_imx_ops
[dw_hdmi_imx])

[  153.524279] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi:
failed to get
edid

[  153.549099] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode
used in
HDMI

[  153.549139] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk
=
65000000

[  153.549191] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  153.560607] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  153.560631] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  153.571896] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  153.571932] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup
DVI
mode

[  153.606487] Console: switching to colour frame buffer device
128x48

[  153.620823] imx-drm display-subsystem: fb0:  frame buffer
device

[  153.705344] [drm] Initialized imx-drm 1.0.0 20120507 for
display-subsystem on minor
1

[  154.720959] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi:
failed to get edid
[  153.549099] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode
used in
HDMI

[  153.549139] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk
=
65000000

[  153.549191] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  153.560607] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  153.560631] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  153.571896] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  153.571932] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup
DVI
mode

[  153.606487] Console: switching to colour frame buffer device
128x48

[  153.620823] imx-drm display-subsystem: fb0:  frame buffer
device

[  153.705344] [drm] Initialized imx-drm 1.0.0 20120507 for
display-subsystem on minor
1

[  154.720959] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi:
failed to get
edid

[  247.677089] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi:
failed to get
edid

[  247.678028] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi:
failed to get
edid

[  247.701625] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  247.704213] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode
used in
HDMI

[  247.704231] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk
=
65000000

[  247.704274] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  247.715533] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  247.715566] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY
powered down in 0
iterations

[  247.726764] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL
locked 1
iterations

[  247.726798] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup
DVI
mode

#aplay -c 2 -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params
Kurzweil-K2000-Dual-Bass-C1.wav
[  266.340612] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi:
hdmi_set_clk_regenerator: fs=44100Hz ftdms=65.000MHz N=6272 cts=72222
#aplay -c 2 -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params
Downloads/piano2.wav
[  344.978209] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi:
hdmi_set_clk_regenerator: fs=48000Hz ftdms=65.000MHz N=6144 cts=65000

On Mon, Nov 6, 2017 at 9:47 PM, Luís Mendes <luis.p.mendes at gmail.com> wrote:

> Hi Russell,
>
> I'm using the following sound sample for aplay:
> http://www.kozco.com/tech/piano2.wav
> from this site:
> http://www.kozco.com/tech/soundtests.html
>
> The sample file plays without an issue on SGTL5000 chip, but no sound on
> HDMI.
> I've tested with a CROWN TV and a SAMSUNG TV, no sound on neither.
> The sound file fulfills the requirements that you have pointed out:
> stereo, 48kHz, S16_LE.
>
> Could there be an issue with the driver? Could this be a DTB definition
> issue?
>
> Below the output log for aplay with the above sound file.
>
> Regards,
> Luís
>
> aplay -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params
> Downloads/piano2.wav
> Playing WAVE 'Downloads/piano2.wav' : Signed 16 bit Little Endian, Rate
> 48000 Hz, Stereo
> HW Params of device "front:CARD=DWHDMI,DEV=0":
> --------------------
> ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED
> RW_NONINTERLEAVED
> FORMAT:  S16_LE S16_BE S32_LE S32_BE S24_3LE
> SUBFORMAT:  STD
> SAMPLE_BITS: [16 32]
> FRAME_BITS: [32 64]
> CHANNELS: 2
> RATE: [32000 48000]
> PERIOD_TIME: (666 32000]
> PERIOD_SIZE: [32 1024]
> PERIOD_BYTES: [128 8192]
> PERIODS: [2 16]
> BUFFER_TIME: (1333 512000]
> BUFFER_SIZE: [64 16384]
> BUFFER_BYTES: [256 131072]
> TICK_TIME: ALL
> --------------------
>
>
> On Mon, Nov 6, 2017 at 4:25 PM, Russell King - ARM Linux <
> linux at armlinux.org.uk> wrote:
>
>> On Mon, Nov 06, 2017 at 03:46:51PM +0000, Luís Mendes wrote:
>> > I've checked the interrupts for 120000.hdmi and they do increment with
>> > aplay without the sound server, as well as when the sound server is
>> loaded
>> > and I play audio files with mpv or vlc.
>> > The sgtl5000 unit is playing audio on analog output fine, only the
>> digital
>> > outputs don't produce sound.
>> > Still haven't checked what happens when unloading the kernel modules for
>> > the other audio devices... I will have to compile the kernel with such
>> > devices defined as modules, so that I can unload or blacklist them.
>>
>> If the interrupts are incrementing while playing audio, then audio is
>> being sent to the device.  There may be some reason that the device
>> decides it doesn't like the audio.
>>
>> The minimum audio requirements if audio is supported are 2-channel,
>> 32kHz, 44.1kHz or 48kHz audio.  Anything beyond that requires additional
>> specification by the TV, and if you try to send it something it doesn't
>> support, the TV can decide to mute the audio.
>>
>> Also remember that audio is a side-channel to the video - it is sent to
>> the HDMI sink in the blanking intervals, and the audio clock is derived
>> from the video clock.  So, audio is dependent on the video path being
>> active.
>>
>> I've tested it with a Panasonic smart tv, an Onkyo AV receiver, a Yamaha
>> AV receiver, and a el-cheapo rebranded tv, which all worked fine.
>>
>> --
>> 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 --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/etnaviv/attachments/20171106/65a812cf/attachment-0001.html>


More information about the etnaviv mailing list