Bug 210355
Summary: | HDMI audio disappears with Intel Tiger Lake chips | ||
---|---|---|---|
Product: | Drivers | Reporter: | jian-hong |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | alan, kai.vehmanen, pierre-louis.bossart |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.10 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
dmesg log
alsa-info PulseAudio log with alsa-ucm-conf v1.2.3 |
Created attachment 293809 [details]
alsa-info
If I disable "CONFIG_SND_SOC_SOF_TIGERLAKE_SUPPORT" -> "CONFIG_SND_SOC_SOF_HDA_LINK" -> "CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC", then the HDMI audio works as usual. Adding Intel folks to Cc: ... The runtime workaround: echo "options snd-intel-dspcfg dsp_driver=1" > /etc/modprobe.d/alsa-dsp.conf (In reply to Jaroslav Kysela from comment #4) > The runtime workaround: > > echo "options snd-intel-dspcfg dsp_driver=1" > > /etc/modprobe.d/alsa-dsp.conf I tried this workaround. It makes HDMI audio work. But, I guess this means using legacy HDA audio driver, right? I traced to https://elixir.bootlin.com/linux/v5.10-rc5/source/sound/hda/intel-dsp-config.c#L381 Yes, the behaviour should be similar like you disable the SOF Tigerlake code at the build time (CONFIG_SND_SOC_SOF_TIGERLAKE_SUPPORT). It means no DMIC support, if it's connected directly to DSP. Added Kai for HDMI. @jian-hong, can you clarify what you mean by 'The HDMI audio disappears (not show up) when the external display is connected through the HDMI cable.' The ALSA PCM devices should be present but maybe the HDMI is not detected, which should be shown in ALSA controls? (In reply to Pierre Bossart from comment #8) > The ALSA PCM devices should be present but maybe the HDMI is not detected, > which should be shown in ALSA controls? Good question/direction! ALSA shows the HDMI audio port: $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 It also can output the audio through HDMI with aplay: $ aplay -D hw:0,4 ~/Downloads/file_example_WAV_1MG.wav Playing WAVE '/sysroot/home/dev/Downloads/file_example_WAV_1MG.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo Warning: rate is not accurate (requested = 8000Hz, got = 48000Hz) please, try the plug plugin However, PulseAudio does not detect it: $ pactl list sinks Sink #1 State: SUSPENDED Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.stereo-fallback Description: Tiger Lake-LP Smart Sound Technology Audio Controller Stereo Driver: module-alsa-card.c Sample Specification: s16le 2ch 48000Hz Channel Map: front-left,front-right Owner Module: 23 Mute: no Volume: front-left: 32768 / 50% / -18.06 dB, front-right: 32768 / 50% / -18.06 dB balance 0.00 Base Volume: 65536 / 100% / 0.00 dB Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.stereo-fallback.monitor Latency: 0 usec, configured 0 usec Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY Properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "" alsa.id = "HDA Analog (*)" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "0" alsa.card_name = "sof-hda-dsp" alsa.long_card_name = "ASUSTeKCOMPUTERINC.-ASUSB9400CEA_B9400CEA-1.0-B9400CEA" alsa.driver_name = "snd_soc_skl_hda_dsp" device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic" sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0" device.bus = "pci" device.vendor.id = "8086" device.vendor.name = "Intel Corporation" device.product.id = "a0c8" device.product.name = "Tiger Lake-LP Smart Sound Technology Audio Controller" device.string = "hw:0" device.buffering.buffer_size = "65472" device.buffering.fragment_size = "16320" device.access_mode = "mmap+timer" device.profile.name = "stereo-fallback" device.profile.description = "Stereo" device.description = "Tiger Lake-LP Smart Sound Technology Audio Controller Stereo" alsa.mixer_name = "Realtek ALC294" alsa.components = "HDA:80862812,80860101,00100000 HDA:10ec0294,10431512,00100004 cfg-dmics:4" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" Ports: analog-output-speaker: Speakers (priority: 7900) analog-output-headphones: Headphones (priority: 9900, not available) Active Port: analog-output-speaker Formats: pcm Based on alsa-info output, the display audio PCM is definitely detected correctly: control.20 { iface CARD name 'HDMI/DP,pcm=4 Jack' value true So this looks like a Pulseaudio and/or alsa-ucm-conf issue. I did not find mention of the distribution (and pulseaudio + alsa-ucm-conf) version used. That would be needed. We just had one bug where user had not installed the ALSA UCM files at all and Pulseaudio did not find all the audio devices. The debug output from the pulseaudio start may help.. https://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems I have the same problem. It appears to be an initialization issue with the chipset. If I startup Windows, then reboot into Linux, sound works. If I start from a cold boot, sound does not work. Something is not getting initialized. The machine I am using is an HP Spectre x360 14 laptop with a Tiger Lake processor. 0000:00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20) Subsystem: Hewlett-Packard Company Device 87f6 Flags: bus master, fast devsel, latency 32, IRQ 207 Memory at 603f290000 (64-bit, non-prefetchable) [size=16K] Memory at 603f000000 (64-bit, non-prefetchable) [size=1M] Capabilities: [50] Power Management version 3 Capabilities: [80] Vendor Specific Information: Len=14 <?> Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Kernel driver in use: sof-audio-pci Kernel modules: snd_hda_intel, snd_sof_pci Thanks Alan. Could you provide dmesg and alsa-info output from your system as well? In the original case, the kernel drivers seem to be operating as expected and the suspicious was a Pulseaudio (user-space level issue). Your observation that a soft-reboot from Windows helps with the problem, points to a different direction though. Additional test for both original reporter and Alan: Please try to play something to HDMI/DP directly from terminal: 1. Discover which PCM is connected to a monitor: amixer contents |grep -A 2 HDMI numid=14,iface=CARD,name='HDMI/DP,pcm=3 Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=20,iface=CARD,name='HDMI/DP,pcm=4 Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=26,iface=CARD,name='HDMI/DP,pcm=5 Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off 2. Play audio to connected HDMI/DP receiver In my case pcm 4 (see above) is connected so I'll do: aplay -vv -Dplughw:0,4 /usr/share/sounds/alsa/Front_Center.wav .. please modify the PCM number above if it's different from 4. 3. Conclusions from above If audio works with step 2, then it's issue is with Pulseaudio configuration. If it doesn't, then we have a BIOS/driver issue at hand. It may be this UCM issue, too: https://github.com/alsa-project/alsa-ucm-conf/commit/33be660e4b1e75c19d5332556c3d2636dd3344bf Could you check, if you have those changes in your /usr/share/alsa/ucm2 tree? [alan@localhost ~]$ amixer contents numid=4,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=3,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=36250,35566 numid=2,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=1 : values=off numid=1,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=29274,29274 Audio works with the Gnome sound test. (Using the soft reboot of Windows trick.) This plays. I could not find a hardware name that worked. [alan@localhost ~]$ aplay -vv /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono ALSA <-> PulseAudio PCM I/O Plugin Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 24000 period_size : 6000 period_time : 125000 tstamp_mode : NONE tstamp_type : GETTIMEOFDAY period_step : 1 avail_min : 6000 period_event : 0 start_threshold : 24000 stop_threshold : 24000 silence_threshold: 0 silence_size : 0 boundary : 6755399441055744000 Here is the link to alsa-info with the sound not working. http://alsa-project.org/db/?f=199e89c343201a96779e85e401ad7281f6a349f6 Alan, thanks for the new info. One clarifying question -- the original bug was about "HDMI audio" not working. Are you talking about the same thing, or in general audio not working (with laptop spekaker)? I have to ask as in both alsa-info dumps you've shared above (comment 17 and 18), there is no external DP/HDMI connected (versus original reporter's alsa-info where I can see a monitor is connected). I do not have HDMI connected. Maybe this is a different bug? Should I open a new ticket? Alan, ok thanks, that explains what we see in the logs. Please, can you file a separate bug for the issue you are seeing? (In reply to Kai Vehmanen from comment #10) > Based on alsa-info output, the display audio PCM is definitely detected > correctly: > > control.20 { > iface CARD > name 'HDMI/DP,pcm=4 Jack' > value true > > So this looks like a Pulseaudio and/or alsa-ucm-conf issue. I did not find > mention of the distribution (and pulseaudio + alsa-ucm-conf) version used. > That would be needed. We just had one bug where user had not installed the > ALSA UCM files at all and Pulseaudio did not find all the audio devices. Thanks! I tried to have the alsa-ucm-conf [1] However, I found some issues: * PulseAudio can detect the HDMI audio with alsa-ucm-conf at v1.2.3, but loses it again when alsa-ucm-conf is upgraded to v1.2.4. I filed this as a bug at [2] * Then, I keep test it with alsa-ucm-conf at v1.2.3. I notice the HDMI audio works if external monitor is cold-plugged first, and hotplugging continues to work. But, HDMI audio always failed to output if external monitor is plugged after system boots up. [1] https://github.com/alsa-project/alsa-ucm-conf [2] https://github.com/alsa-project/alsa-ucm-conf/issues/66 Created attachment 294099 [details] PulseAudio log with alsa-ucm-conf v1.2.3 (In reply to jian-hong from comment #22) > * Then, I keep test it with alsa-ucm-conf at v1.2.3. I notice the HDMI > audio works if external monitor is cold-plugged first, and hotplugging > continues to work. But, HDMI audio always failed to output if external > monitor is plugged after system boots up. Notice some information in the PulseAudio log with alsa-ucm-conf v1.2.3 I: [pulseaudio] module-stream-restore.c: Restoring device for stream sink-input-by-media-role:test. D: [pulseaudio] module-intended-roles.c: Not setting device for stream Front Right, because already set. D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"s16le\"" format.rate = "48000" format.channels = "1" format.channel_map = "\"front-right\"" I: [pulseaudio] sink-input.c: Trying to change sample spec D: [pulseaudio] sink.c: Default and alternate sample rates are the same, so there is no point in switching. I: [pulseaudio] module-stream-restore.c: Restoring mute state for sink input sink-input-by-media-role:test. D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink becomes busy, resuming. W: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended. After upgraded alsa-lib, alsa-utils, alsa-ucm-conf and alsa-topology-conf to version 1.2.4 with Linux mainline kernel 5.10.0, system still get the same issue as comment #22 (In reply to jian-hong from comment #24) > After upgraded alsa-lib, alsa-utils, alsa-ucm-conf and alsa-topology-conf to > version 1.2.4 with Linux mainline kernel 5.10.0, system still get the same > issue as comment #22 Sorry, it hit the same issue as comment #23, not 22 (In reply to jian-hong from comment #23) > Notice some information in the PulseAudio log with alsa-ucm-conf v1.2.3 > > I: [pulseaudio] module-stream-restore.c: Restoring device for stream > sink-input-by-media-role:test. > D: [pulseaudio] module-intended-roles.c: Not setting device for stream Front > Right, because already set. > D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = > "\"s16le\"" format.rate = "48000" format.channels = "1" > format.channel_map = "\"front-right\"" > I: [pulseaudio] sink-input.c: Trying to change sample spec > D: [pulseaudio] sink.c: Default and alternate sample rates are the same, so > there is no point in switching. > I: [pulseaudio] module-stream-restore.c: Restoring mute state for sink input > sink-input-by-media-role:test. > D: [pulseaudio] module-suspend-on-idle.c: Sink > alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic. > HiFi__hw_sofhdadsp_4__sink becomes busy, resuming. > W: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended. Found this can be fixed by upgrading PulseAudio to 14.0-1. |
Created attachment 293807 [details] dmesg log We have some laptops equipped with Intel i7-1165G7 and i5-1135G7. I boot the system up with kernel 5.10-rc5. The HDMI audio disappears (not show up) when the external display is connected through the HDMI cable. The other audio like headset and internal speaker still work as usual. I notice the warning shows in log [ 14.648199] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3 [ 14.648200] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4 [ 14.648201] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 5 [ 14.648201] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 6 [ 14.648202] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 7 [ 14.648203] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 8 PS. The laptops have DMIC with Intel Smart Sound Technology.