提交 28d1a85e 编写于 作者: T Takashi Iwai

ALSA: hda - Add an error message for invalid mapping NID

Add an error message to snd_hda_add_nid() for invalid mapping NID to make
easier to hunt the buggy code.

Also added a missing space to the error message in snd_hda_build_controls()
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 c602c8ad
...@@ -1806,6 +1806,8 @@ int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl, ...@@ -1806,6 +1806,8 @@ int snd_hda_add_nid(struct hda_codec *codec, struct snd_kcontrol *kctl,
item->nid = nid; item->nid = nid;
return 0; return 0;
} }
printk(KERN_ERR "hda-codec: no NID for mapping control %s:%d:%d\n",
kctl->id.name, kctl->id.index, index);
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL_HDA(snd_hda_add_nid); EXPORT_SYMBOL_HDA(snd_hda_add_nid);
...@@ -2884,7 +2886,7 @@ int /*__devinit*/ snd_hda_build_controls(struct hda_bus *bus) ...@@ -2884,7 +2886,7 @@ int /*__devinit*/ snd_hda_build_controls(struct hda_bus *bus)
list_for_each_entry(codec, &bus->codec_list, list) { list_for_each_entry(codec, &bus->codec_list, list) {
int err = snd_hda_codec_build_controls(codec); int err = snd_hda_codec_build_controls(codec);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "hda_codec: cannot build controls" printk(KERN_ERR "hda_codec: cannot build controls "
"for #%d (error %d)\n", codec->addr, err); "for #%d (error %d)\n", codec->addr, err);
err = snd_hda_codec_reset(codec); err = snd_hda_codec_reset(codec);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册