Skip to content

Commit b392350

Browse files
committed
ALSA: hda/hdmi: Add module option to disable audio component binding
As the recent regression showed, we want sometimes to turn off the audio component binding just for debugging. This patch adds the module option to control it easily without compilation. Fixes: ade49db ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207223 Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9a64184 commit b392350

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sound/pci/hda/patch_hdmi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ static bool static_hdmi_pcm;
3838
module_param(static_hdmi_pcm, bool, 0644);
3939
MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
4040

41+
static bool enable_acomp = true;
42+
module_param(enable_acomp, bool, 0444);
43+
MODULE_PARM_DESC(enable_acomp, "Enable audio component binding (default=yes)");
44+
4145
struct hdmi_spec_per_cvt {
4246
hda_nid_t cvt_nid;
4347
int assigned;
@@ -2505,6 +2509,11 @@ static void generic_acomp_init(struct hda_codec *codec,
25052509
{
25062510
struct hdmi_spec *spec = codec->spec;
25072511

2512+
if (!enable_acomp) {
2513+
codec_info(codec, "audio component disabled by module option\n");
2514+
return;
2515+
}
2516+
25082517
spec->port2pin = port2pin;
25092518
setup_drm_audio_ops(codec, ops);
25102519
if (!snd_hdac_acomp_init(&codec->bus->core, &spec->drm_audio_ops,

0 commit comments

Comments
 (0)