linux/sound/pci/hda
Takashi Iwai 090ddad4c7 ALSA: hda/hdmi: Static PCM mapping again with AMD HDMI codecs
The recent code refactoring for HD-audio HDMI codec driver caused a
regression on AMD/ATI HDMI codecs; namely, PulseAudioand pipewire
don't recognize HDMI outputs any longer while the direct output via
ALSA raw access still works.

The problem turned out that, after the code refactoring, the driver
assumes only the dynamic PCM assignment, and when a PCM stream that
still isn't assigned to any pin gets opened, the driver tries to
assign any free converter to the PCM stream.  This behavior is OK for
Intel and other codecs, as they have arbitrary connections between
pins and converters.  OTOH, on AMD chips that have a 1:1 mapping
between pins and converters, this may end up with blocking the open of
the next PCM stream for the pin that is tied with the formerly taken
converter.

Also, with the code refactoring, more PCM streams are exposed than
necessary as we assume all converters can be used, while this isn't
true for AMD case.  This may change the PCM stream assignment and
confuse users as well.

This patch fixes those problems by:

- Introducing a flag spec->static_pcm_mapping, and if it's set, the
  driver applies the static mapping between pins and converters at the
  probe time
- Limiting the number of PCM streams per pins, too; this avoids the
  superfluous PCM streams

Fixes: ef6f5494fa ("ALSA: hda/hdmi: Use only dynamic PCM device allocation")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216836
Co-developed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20221228125714.16329-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-28 14:05:06 +01:00
..
ca0132_regs.h
cs35l41_hda.c firmware: cs_dsp: Make the exports namespaced 2022-11-25 11:54:00 +00:00
cs35l41_hda.h ALSA: hda: cs35l41: Support Firmware switching and reloading 2022-07-15 16:23:29 +02:00
cs35l41_hda_i2c.c ALSA: hda: cs35l41: Convert to i2c's .probe_new() 2022-11-19 09:43:38 +01:00
cs35l41_hda_spi.c ALSA: hda: cs35l41: Support Hibernation during Suspend 2022-07-15 16:21:39 +02:00
hda_auto_parser.c ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly 2022-06-15 07:28:51 +02:00
hda_auto_parser.h
hda_beep.c ALSA: hda: beep: Simplify keep-power-at-enable behavior 2022-09-06 11:24:02 +02:00
hda_beep.h ALSA: hda: beep: Simplify keep-power-at-enable behavior 2022-09-06 11:24:02 +02:00
hda_bind.c ALSA: hda: Fix hang at HD-audio codec unbinding due to refcount saturation 2022-09-10 16:26:19 +02:00
hda_codec.c ALSA: hda/hdmi: fix stream-id config keep-alive for rt suspend 2022-12-09 12:06:15 +01:00
hda_component.h ALSA: hda: cs35l41: Remove suspend/resume hda hooks 2022-10-12 08:02:48 +02:00
hda_controller.c ALSA: hda: add snd_hdac_stop_streams() helper 2022-09-20 08:08:14 +02:00
hda_controller.h
hda_controller_trace.h
hda_cs_dsp_ctl.c firmware: cs_dsp: Make the exports namespaced 2022-11-25 11:54:00 +00:00
hda_cs_dsp_ctl.h ALSA: hda/cs_dsp_ctl: Fix mutex inversion when creating controls 2022-10-12 08:02:47 +02:00
hda_eld.c ALSA: hda/hdmi: ELD procfs - print the codec NIDs 2022-09-21 12:12:29 +02:00
hda_generic.c ALSA: hda: Fix UAF of leds class devs at unbinding 2022-01-26 15:56:35 +01:00
hda_generic.h ALSA: hda: Fix UAF of leds class devs at unbinding 2022-01-26 15:56:35 +01:00
hda_hwdep.c
hda_intel.c ALSA: hda/hdmi - enable runtime pm for more AMD display audio 2022-11-08 10:13:24 +01:00
hda_intel.h
hda_intel_trace.h
hda_jack.c ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_jack.h ALSA: hda: Do disconnect jacks at codec unbind 2021-11-17 14:41:16 +01:00
hda_local.h ALSA: hda/hdmi: ELD procfs - print the codec NIDs 2022-09-21 12:12:29 +02:00
hda_proc.c
hda_sysfs.c ALSA: hda: Remove unused MAX_PIN_CONFIGS constant 2022-08-19 11:29:13 +02:00
hda_tegra.c ALSA: hda/tegra: Align BDL entry to 4KB boundary 2022-09-06 07:13:32 +02:00
hp_x360_helper.c
ideapad_s740_helper.c
Kconfig firmware: cs_dsp: Rename KConfig symbol CS_DSP -> FW_CS_DSP 2022-11-25 11:53:59 +00:00
Makefile ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls 2022-07-14 11:19:37 +02:00
patch_analog.c
patch_ca0110.c
patch_ca0132.c ALSA: hda/ca0132: add quirk for EVGA Z390 DARK 2022-11-05 08:01:31 +01:00
patch_cirrus.c ALSA: hda/cirrus - support for iMac 12,1 model 2022-08-11 07:41:43 +02:00
patch_cmedia.c
patch_conexant.c ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model 2022-08-08 10:18:58 +02:00
patch_cs8409-tables.c ALSA: hda/cs8409: Support new Dolphin Variants 2022-08-17 11:34:25 +02:00
patch_cs8409.c ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. 2022-12-05 17:42:36 +01:00
patch_cs8409.h ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static 2022-07-05 09:45:21 +02:00
patch_hdmi.c ALSA: hda/hdmi: Static PCM mapping again with AMD HDMI codecs 2022-12-28 14:05:06 +01:00
patch_realtek.c ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops 2022-12-26 15:31:11 +01:00
patch_si3054.c
patch_sigmatel.c ALSA: hda: beep: Simplify keep-power-at-enable behavior 2022-09-06 11:24:02 +02:00
patch_via.c ALSA: hda/via: Fix missing beep setup 2022-06-20 12:40:42 +02:00
thinkpad_helper.c