Skip to content

Commit 7fba6ae

Browse files
committed
ALSA: hda: Rename back to dmic_detect option
We've got quite a few bug reports showing the SOF driver being loaded unintentionally recently, and the reason seems to be that users didn't know the module option change: with the recent kernel, a new option dsp_driver=1 has to be passed to a new module snd-intel-dspcfg instead of snd_hda_intel.dmic_detect=0 option. That is, actually there are two tricky things here: - We changed the whole detection in another module and another option semantics. - The existing option for skipping the DSP probe was also renamed. For avoiding the confusion and giving user more hint, this patch reverts the renamed option dsp_driver back to dmic_detect for snd-hda-intel module, and show the warning about the module option change when the non-default value is passed. Fixes: 82d9d54 ("ALSA: hda: add Intel DSP configuration / probe code") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 8e85def commit 7fba6ae

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static char *patch[SNDRV_CARDS];
125125
static bool beep_mode[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] =
126126
CONFIG_SND_HDA_INPUT_BEEP_MODE};
127127
#endif
128-
static bool dsp_driver = 1;
128+
static bool dmic_detect = 1;
129129

130130
module_param_array(index, int, NULL, 0444);
131131
MODULE_PARM_DESC(index, "Index value for Intel HD audio interface.");
@@ -160,9 +160,10 @@ module_param_array(beep_mode, bool, NULL, 0444);
160160
MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode "
161161
"(0=off, 1=on) (default=1).");
162162
#endif
163-
module_param(dsp_driver, bool, 0444);
164-
MODULE_PARM_DESC(dsp_driver, "Allow DSP driver selection (bypass this driver) "
165-
"(0=off, 1=on) (default=1)");
163+
module_param(dmic_detect, bool, 0444);
164+
MODULE_PARM_DESC(dmic_detect, "Allow DSP driver selection (bypass this driver) "
165+
"(0=off, 1=on) (default=1); "
166+
"deprecated, use snd-intel-dspcfg.dsp_driver option instead");
166167

167168
#ifdef CONFIG_PM
168169
static int param_set_xint(const char *val, const struct kernel_param *kp);
@@ -2099,11 +2100,13 @@ static int azx_probe(struct pci_dev *pci,
20992100
/*
21002101
* stop probe if another Intel's DSP driver should be activated
21012102
*/
2102-
if (dsp_driver) {
2103+
if (dmic_detect) {
21032104
err = snd_intel_dsp_driver_probe(pci);
21042105
if (err != SND_INTEL_DSP_DRIVER_ANY &&
21052106
err != SND_INTEL_DSP_DRIVER_LEGACY)
21062107
return -ENODEV;
2108+
} else {
2109+
dev_warn(&pci->dev, "dmic_detect option is deprecated, pass snd-intel-dspcfg.dsp_driver=1 option instead\n");
21072110
}
21082111

21092112
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,

0 commit comments

Comments
 (0)