ALSA: hda: add dev_dbg log when driver is not selected
PATCH 1/1 ALSA: hda: add dev_dbg log when driver is not selected
From: Pierre-Louis Bossart <[email protected]>
On SKL+ Intel platforms, the driver selection is handled by the snd_intel_dspcfg, and when the HDaudio legacy driver is not selected, be it with the auto-selection or user preferences with a kernel parameter, the probe aborts with no logs, only a -ENODEV return value.
Having no dmesg trace, even with dynamic debug enabled, makes support more complicated than it needs to be, and even experienced users can be fooled. A simple dev_dbg() trace solves this problem.
--- sound/pci/hda/hda_intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/pci/hda/hda_intel.c +3 -2
@@ -2127,9 +2127,10 @@ static int azx_probe(struct pci_dev *pci,*/ if (dmic_detect) { err =snd_intel_dsp_driver_probe (pci); -if (err !=SND_INTEL_DSP_DRIVER_ANY && - err !=SND_INTEL_DSP_DRIVER_LEGACY ) +if (err !=SND_INTEL_DSP_DRIVER_ANY && err !=SND_INTEL_DSP_DRIVER_LEGACY ) { +dev_dbg (&pci->dev,"HDAudio driver not selected, aborting probe\n" );return -ENODEV ; + } }else {dev_warn (&pci->dev,"dmic_detect option is deprecated, pass snd-intel-dspcfg.dsp_driver=1 option instead\n" ); }
Signature · 1 line
2.27.0
Quoted 12 lines · Kai Vehmanen
From: Pierre-Louis Bossart <[email protected]>
On SKL+ Intel platforms, the driver selection is handled by the
snd_intel_dspcfg, and when the HDaudio legacy driver is not selected, be it with the auto-selection or user preferences with a kernel parameter, the probe aborts with no logs, only a-ENODEVreturn value.Having no dmesg trace, even with dynamic debug enabled, makes support more complicated than it needs to be, and even experienced users can be fooled. A simple
dev_dbg()trace solves this problem.
Quoted 5 lines
Signed-off-by Pierre-Louis Bossart <[email protected]>Reviewed-by Bard Liao <[email protected]>Reviewed-by Guennadi Liakhovetski <[email protected]>Signed-off-by Kai Vehmanen <[email protected]>
Applied now. Thanks.
Takashi