[alsa-devel] [PATCH 2/5] ALSA: control: use dev_dbg() for warning to add duplicated controls

Takashi Sakamoto o-takashi at sakamocchi.jp
Wed Feb 11 11:40:10 CET 2015


When duplicated controls are added, snd module generates message and
the callers receive -EBUSY. The messaging is redundant, especially for
userspace applications because it's caller's fault and callers get
the status code.

This commit change its messaging level to suppress messages in normal
usage.

Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
 sound/core/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/control.c b/sound/core/control.c
index d98b990..1edd6c5 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -349,7 +349,7 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
 	down_write(&card->controls_rwsem);
 	if (snd_ctl_find_id(card, &id)) {
 		up_write(&card->controls_rwsem);
-		dev_err(card->dev,
+		dev_dbg(card->dev,
 			"control %i:%i:%i:%s:%i is already present\n",
 			id.iface, id.device, id.subdevice, id.name, id.index);
 		err = -EBUSY;
-- 
2.1.0



More information about the Alsa-devel mailing list