diff options
-rw-r--r-- | sound/pci/hda/hda_auto_parser.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 8de7cfa460b9..90d2fda6c8f9 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c | |||
@@ -227,10 +227,18 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | |||
227 | continue; | 227 | continue; |
228 | if (!assoc_line_out) | 228 | if (!assoc_line_out) |
229 | assoc_line_out = assoc; | 229 | assoc_line_out = assoc; |
230 | else if (assoc_line_out != assoc) | 230 | else if (assoc_line_out != assoc) { |
231 | codec_info(codec, | ||
232 | "ignore pin 0x%x with mismatching assoc# 0x%x vs 0x%x\n", | ||
233 | nid, assoc, assoc_line_out); | ||
231 | continue; | 234 | continue; |
232 | if (cfg->line_outs >= ARRAY_SIZE(cfg->line_out_pins)) | 235 | } |
236 | if (cfg->line_outs >= ARRAY_SIZE(cfg->line_out_pins)) { | ||
237 | codec_info(codec, | ||
238 | "ignore pin 0x%x, too many assigned pins\n", | ||
239 | nid); | ||
233 | continue; | 240 | continue; |
241 | } | ||
234 | line_out[cfg->line_outs].pin = nid; | 242 | line_out[cfg->line_outs].pin = nid; |
235 | line_out[cfg->line_outs].seq = seq; | 243 | line_out[cfg->line_outs].seq = seq; |
236 | cfg->line_outs++; | 244 | cfg->line_outs++; |
@@ -238,8 +246,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | |||
238 | case AC_JACK_SPEAKER: | 246 | case AC_JACK_SPEAKER: |
239 | seq = get_defcfg_sequence(def_conf); | 247 | seq = get_defcfg_sequence(def_conf); |
240 | assoc = get_defcfg_association(def_conf); | 248 | assoc = get_defcfg_association(def_conf); |
241 | if (cfg->speaker_outs >= ARRAY_SIZE(cfg->speaker_pins)) | 249 | if (cfg->speaker_outs >= ARRAY_SIZE(cfg->speaker_pins)) { |
250 | codec_info(codec, | ||
251 | "ignore pin 0x%x, too many assigned pins\n", | ||
252 | nid); | ||
242 | continue; | 253 | continue; |
254 | } | ||
243 | speaker_out[cfg->speaker_outs].pin = nid; | 255 | speaker_out[cfg->speaker_outs].pin = nid; |
244 | speaker_out[cfg->speaker_outs].seq = (assoc << 4) | seq; | 256 | speaker_out[cfg->speaker_outs].seq = (assoc << 4) | seq; |
245 | cfg->speaker_outs++; | 257 | cfg->speaker_outs++; |
@@ -247,8 +259,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | |||
247 | case AC_JACK_HP_OUT: | 259 | case AC_JACK_HP_OUT: |
248 | seq = get_defcfg_sequence(def_conf); | 260 | seq = get_defcfg_sequence(def_conf); |
249 | assoc = get_defcfg_association(def_conf); | 261 | assoc = get_defcfg_association(def_conf); |
250 | if (cfg->hp_outs >= ARRAY_SIZE(cfg->hp_pins)) | 262 | if (cfg->hp_outs >= ARRAY_SIZE(cfg->hp_pins)) { |
263 | codec_info(codec, | ||
264 | "ignore pin 0x%x, too many assigned pins\n", | ||
265 | nid); | ||
251 | continue; | 266 | continue; |
267 | } | ||
252 | hp_out[cfg->hp_outs].pin = nid; | 268 | hp_out[cfg->hp_outs].pin = nid; |
253 | hp_out[cfg->hp_outs].seq = (assoc << 4) | seq; | 269 | hp_out[cfg->hp_outs].seq = (assoc << 4) | seq; |
254 | cfg->hp_outs++; | 270 | cfg->hp_outs++; |
@@ -267,8 +283,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | |||
267 | break; | 283 | break; |
268 | case AC_JACK_SPDIF_OUT: | 284 | case AC_JACK_SPDIF_OUT: |
269 | case AC_JACK_DIG_OTHER_OUT: | 285 | case AC_JACK_DIG_OTHER_OUT: |
270 | if (cfg->dig_outs >= ARRAY_SIZE(cfg->dig_out_pins)) | 286 | if (cfg->dig_outs >= ARRAY_SIZE(cfg->dig_out_pins)) { |
287 | codec_info(codec, | ||
288 | "ignore pin 0x%x, too many assigned pins\n", | ||
289 | nid); | ||
271 | continue; | 290 | continue; |
291 | } | ||
272 | cfg->dig_out_pins[cfg->dig_outs] = nid; | 292 | cfg->dig_out_pins[cfg->dig_outs] = nid; |
273 | cfg->dig_out_type[cfg->dig_outs] = | 293 | cfg->dig_out_type[cfg->dig_outs] = |
274 | (loc == AC_JACK_LOC_HDMI) ? | 294 | (loc == AC_JACK_LOC_HDMI) ? |