* [PATCH] ALSA: hda: add dev_dbg log when driver is not selected
@ 2020-09-02 15:42 Kai Vehmanen
2020-09-02 17:32 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Kai Vehmanen @ 2020-09-02 15:42 UTC (permalink / raw)
To: alsa-devel, tiwai
Cc: Guennadi Liakhovetski, Bard Liao, Pierre-Louis Bossart, kai.vehmanen
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
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.
BugLink: https://github.com/thesofproject/linux/issues/2330
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
sound/pci/hda/hda_intel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 0f86e3765bb3..36a9dbc33aa0 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -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");
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda: add dev_dbg log when driver is not selected
2020-09-02 15:42 [PATCH] ALSA: hda: add dev_dbg log when driver is not selected Kai Vehmanen
@ 2020-09-02 17:32 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-09-02 17:32 UTC (permalink / raw)
To: Kai Vehmanen
Cc: Guennadi Liakhovetski, alsa-devel, Bard Liao, Pierre-Louis Bossart
On Wed, 02 Sep 2020 17:42:39 +0200,
Kai Vehmanen wrote:
>
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>
> 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.
>
> BugLink: https://github.com/thesofproject/linux/issues/2330
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-02 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 15:42 [PATCH] ALSA: hda: add dev_dbg log when driver is not selected Kai Vehmanen
2020-09-02 17:32 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).