[alsa-devel] [PATCH 3/5] hda-emu: Improve error message for modem codecs
David Henningsson
david.henningsson at canonical.com
Thu Sep 4 14:21:05 CEST 2014
In some cases (when codec index parameter was specified),
selecting a modem codec resulted in "ERROR -77", which was
confusing.
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
hda-parse.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hda-parse.c b/hda-parse.c
index 57e9ee3..b5abd5e 100644
--- a/hda-parse.c
+++ b/hda-parse.c
@@ -675,13 +675,17 @@ int parse_codec_proc(FILE *fp, struct xhda_codec *codecp, int codec_index)
parse_mode = PARSE_ROOT;
}
err = parse_codec_recursive(buffer);
- if (err < 0) {
- if (err == -EBADFD && codec_index < 0) {
+ if (err == -EBADFD) {
+ if (codec_index < 0) {
hda_log(HDA_LOG_INFO, "Codec %d is a modem codec, skipping\n", curidx);
parse_mode = PARSE_START;
clear_codec(codec);
continue;
}
+ hda_log(HDA_LOG_ERR, "Codec %d is a modem codec, aborting\n", curidx);
+ return err;
+ }
+ else if (err < 0) {
hda_log(HDA_LOG_ERR, "ERROR %d\n", err);
return err;
}
--
1.9.1
More information about the Alsa-devel
mailing list