diff options
author | David Henningsson <david.henningsson@canonical.com> | 2014-09-04 14:21:05 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-04 14:52:10 +0200 |
commit | ced096714803f15e9cbfae692c6723db32491c25 (patch) | |
tree | e95f2a037965473f127419a8d260b16165a07f23 | |
parent | 4b9eafc257dabd9c67de6d3602d027901eaacf21 (diff) | |
download | hda-emu-ced096714803f15e9cbfae692c6723db32491c25.tar.gz |
hda-emu: Improve error message for modem codecs
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@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | hda-parse.c | 8 |
1 files 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; } |