[PATCH] ALSA: hda/hdmi: Add option to enable all pins forcibly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Intel platforms, we always enable all pins no matter what BIOS
sets, but for others, we still take the conservative approach, and the
HD-audio HDMI codec driver enables the streams only for the pins that
are enabled by BIOS, and skips the disabled pins.  This seems not good
for some machines that have (as expected) broken BIOS, resulting in
the lack of needed outputs.

There is an allow-list in the driver code to enable all pins, but its
addition needs a recompilation.  This patch adds a module option for
user's convenience to enable all pins forcibly on the fly.  User can
pass snd_hda_codec_hdmi.enable_all_pins=1 option for testing, and once
confirmed, we may add a static entry in force_connect_list[].

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
 sound/pci/hda/patch_hdmi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 4b2cc8cb55c4..672fd28e2449 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -47,6 +47,10 @@ IS_ENABLED(CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM);
 module_param(enable_silent_stream, bool, 0644);
 MODULE_PARM_DESC(enable_silent_stream, "Enable Silent Stream for HDMI devices");
 
+static bool enable_all_pins;
+module_param(enable_all_pins, bool, 0444);
+MODULE_PARM_DESC(enable_all_pins, "Forcibly enable all pins");
+
 struct hdmi_spec_per_cvt {
 	hda_nid_t cvt_nid;
 	int assigned;
@@ -1957,6 +1961,9 @@ static int hdmi_parse_codec(struct hda_codec *codec)
 		return -EINVAL;
 	}
 
+	if (enable_all_pins)
+		spec->force_connect = true;
+
 	q = snd_pci_quirk_lookup(codec->bus->pci, force_connect_list);
 
 	if (q && q->value)
-- 
2.26.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux