<div dir="ltr"><div>I've enable dynamic debug in the kernel module and got this log below.<br></div>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?<br><div><div>According to the module code in dw_hdmi_connector_get_modes of dw-hdmi.c:</div><div>hdmi->sink_is_hdmi and hdmi->sink_has_audio is only set when EDID can be read via I2C DDC.<br></div><div><br>[  153.516490] dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.30a with HDCP (DWC HDMI 3D TX PHY)                                                                        <br>[  153.517553] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi: hdmi_set_clk_regenerator: fs=48000Hz ftdms=74.250MHz N=6144 cts=74250                                      <br>[  153.519083] dw_hdmi_irq:2146: dwhdmi-imx 120000.hdmi: EVENT=plugin                                                                                                           <br>[  153.523424] imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops [dw_hdmi_imx])                                                                                 <br>[  153.524279] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi: failed to get edid                                                                                     <br>[  153.549099] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode used in HDMI                                                                                            <br>[  153.549139] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk = 65000000                                                                                           <br>[  153.549191] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  153.560607] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  153.560631] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  153.571896] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  153.571932] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup DVI mode                                                                                               <br>[  153.606487] Console: switching to colour frame buffer device 128x48                                                                                                          <br>[  153.620823] imx-drm display-subsystem: fb0:  frame buffer device                                                                                                             <br>[  153.705344] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1                                                                                        <br>[  154.720959] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi: failed to get edid <br>[  153.549099] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode used in HDMI                                                                                            <br>[  153.549139] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk = 65000000                                                                                           <br>[  153.549191] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  153.560607] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  153.560631] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  153.571896] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  153.571932] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup DVI mode                                                                                               <br>[  153.606487] Console: switching to colour frame buffer device 128x48                                                                                                          <br>[  153.620823] imx-drm display-subsystem: fb0:  frame buffer device                                                                                                             <br>[  153.705344] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1                                                                                        <br>[  154.720959] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi: failed to get edid                                                                                     <br>[  247.677089] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi: failed to get edid                                                                                     <br>[  247.678028] dw_hdmi_connector_get_modes:1917: dwhdmi-imx 120000.hdmi: failed to get edid                                                                                     <br>[  247.701625] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  247.704213] dw_hdmi_setup:1679: dwhdmi-imx 120000.hdmi: Non-CEA mode used in HDMI                                                                                            <br>[  247.704231] hdmi_av_composer:1495: dwhdmi-imx 120000.hdmi: final pixclk = 65000000                                                                                           <br>[  247.704274] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  247.715533] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  247.715566] dw_hdmi_phy_power_off:1096: dwhdmi-imx 120000.hdmi: PHY powered down in 0 iterations                                                                             <br>[  247.726764] dw_hdmi_phy_power_on:1133: dwhdmi-imx 120000.hdmi: PHY PLL locked 1 iterations                                                                                   <br>[  247.726798] dw_hdmi_setup:1744: dwhdmi-imx 120000.hdmi: dw_hdmi_setup DVI mode                                                                                               <br>#aplay -c 2 -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params Kurzweil-K2000-Dual-Bass-C1.wav<br>[  266.340612] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi: hdmi_set_clk_regenerator: fs=44100Hz ftdms=65.000MHz N=6272 cts=72222<br>#aplay -c 2 -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params Downloads/piano2.wav<br>[  344.978209] hdmi_set_clk_regenerator:521: dwhdmi-imx 120000.hdmi: hdmi_set_clk_regenerator: fs=48000Hz ftdms=65.000MHz N=6144 cts=65000   <br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 9:47 PM, Luís Mendes <span dir="ltr"><<a href="mailto:luis.p.mendes@gmail.com" target="_blank">luis.p.mendes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi Russell,<br><br>I'm using the following sound sample for aplay:<br><a href="http://www.kozco.com/tech/piano2.wav" target="_blank">http://www.kozco.com/tech/<wbr>piano2.wav</a><br></div>from this site:<br><a href="http://www.kozco.com/tech/soundtests.html" target="_blank">http://www.kozco.com/tech/<wbr>soundtests.html</a><br><br></div>The sample file plays without an issue on SGTL5000 chip, but no sound on HDMI.<br></div>I've tested with a CROWN TV and a SAMSUNG TV, no sound on neither.<br></div>The sound file fulfills the requirements that you have pointed out: stereo, 48kHz, S16_LE.<br><br></div>Could there be an issue with the driver? Could this be a DTB definition issue?<br></div><div><br></div><div>Below the output log for aplay with the above sound file. <br></div><div><br></div>Regards,<br></div>Luís <br><div><div><div><div><div><div><br>aplay -t wav -D front:CARD=DWHDMI,DEV=0 --dump-hw-params Downloads/piano2.wav <br>Playing WAVE 'Downloads/piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo<br>HW Params of device "front:CARD=DWHDMI,DEV=0":<br>--------------------<br>ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED<br>FORMAT:  S16_LE S16_BE S32_LE S32_BE S24_3LE<br>SUBFORMAT:  STD<br>SAMPLE_BITS: [16 32]<br>FRAME_BITS: [32 64]<br>CHANNELS: 2<br>RATE: [32000 48000]<br>PERIOD_TIME: (666 32000]<br>PERIOD_SIZE: [32 1024]<br>PERIOD_BYTES: [128 8192]<br>PERIODS: [2 16]<br>BUFFER_TIME: (1333 512000]<br>BUFFER_SIZE: [64 16384]<br>BUFFER_BYTES: [256 131072]<br>TICK_TIME: ALL<br>--------------------<br><br></div></div></div></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 4:25 PM, Russell King - ARM Linux <span dir="ltr"><<a href="mailto:linux@armlinux.org.uk" target="_blank">linux@armlinux.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mon, Nov 06, 2017 at 03:46:51PM +0000, Luís Mendes wrote:<br>
> I've checked the interrupts for 120000.hdmi and they do increment with<br>
> aplay without the sound server, as well as when the sound server is loaded<br>
> and I play audio files with mpv or vlc.<br>
> The sgtl5000 unit is playing audio on analog output fine, only the digital<br>
> outputs don't produce sound.<br>
> Still haven't checked what happens when unloading the kernel modules for<br>
> the other audio devices... I will have to compile the kernel with such<br>
> devices defined as modules, so that I can unload or blacklist them.<br>
<br>
</span>If the interrupts are incrementing while playing audio, then audio is<br>
being sent to the device.  There may be some reason that the device<br>
decides it doesn't like the audio.<br>
<br>
The minimum audio requirements if audio is supported are 2-channel,<br>
32kHz, 44.1kHz or 48kHz audio.  Anything beyond that requires additional<br>
specification by the TV, and if you try to send it something it doesn't<br>
support, the TV can decide to mute the audio.<br>
<br>
Also remember that audio is a side-channel to the video - it is sent to<br>
the HDMI sink in the blanking intervals, and the audio clock is derived<br>
from the video clock.  So, audio is dependent on the video path being<br>
active.<br>
<br>
I've tested it with a Panasonic smart tv, an Onkyo AV receiver, a Yamaha<br>
AV receiver, and a el-cheapo rebranded tv, which all worked fine.<br>
<div class="m_5200892199811532961HOEnZb"><div class="m_5200892199811532961h5"><br>
--<br>
RMK's Patch system: <a href="http://www.armlinux.org.uk/developer/patches/" rel="noreferrer" target="_blank">http://www.armlinux.org.uk/dev<wbr>eloper/patches/</a><br>
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up<br>
According to <a href="http://speedtest.net" rel="noreferrer" target="_blank">speedtest.net</a>: 8.21Mbps down 510kbps up<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>