]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: Intel: allow module parameter override BT link to 0
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 3 Feb 2026 11:15:45 +0000 (19:15 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 3 Feb 2026 13:47:37 +0000 (13:47 +0000)
The existing code test if (bt_link_mask_override) to overwrite the BT
link mask. This doesn't allow user to disable the BT link mask. User may
want to disable the BT link when it is detected by the NHLT.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20260203111545.3742255-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c

index d88ec66728fd9cfcd4e966669311693ba263234e..762100f7547ff99d1c3ae94f1c23b9e586500484 100644 (file)
@@ -482,7 +482,7 @@ static int mclk_id_override = -1;
 module_param_named(mclk_id, mclk_id_override, int, 0444);
 MODULE_PARM_DESC(mclk_id, "SOF SSP mclk_id");
 
-static int bt_link_mask_override;
+static int bt_link_mask_override = -1;
 module_param_named(bt_link_mask, bt_link_mask_override, int, 0444);
 MODULE_PARM_DESC(bt_link_mask, "SOF BT offload link mask");
 
@@ -1532,7 +1532,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
                 mach->mach_params.bt_link_mask);
 
        /* allow for module parameter override */
-       if (bt_link_mask_override) {
+       if (bt_link_mask_override != -1) {
                dev_dbg(sdev->dev, "overriding BT link detected in NHLT tables %#x by kernel param %#x\n",
                        mach->mach_params.bt_link_mask, bt_link_mask_override);
                mach->mach_params.bt_link_mask = bt_link_mask_override;