|
@@ -626,24 +626,19 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
|
|
snd_hda_get_codec_name(codec, bus->card->mixername,
|
|
snd_hda_get_codec_name(codec, bus->card->mixername,
|
|
sizeof(bus->card->mixername));
|
|
sizeof(bus->card->mixername));
|
|
|
|
|
|
-#ifdef CONFIG_SND_HDA_GENERIC
|
|
|
|
if (is_generic_config(codec)) {
|
|
if (is_generic_config(codec)) {
|
|
err = snd_hda_parse_generic_codec(codec);
|
|
err = snd_hda_parse_generic_codec(codec);
|
|
goto patched;
|
|
goto patched;
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
if (codec->preset && codec->preset->patch) {
|
|
if (codec->preset && codec->preset->patch) {
|
|
err = codec->preset->patch(codec);
|
|
err = codec->preset->patch(codec);
|
|
goto patched;
|
|
goto patched;
|
|
}
|
|
}
|
|
|
|
|
|
/* call the default parser */
|
|
/* call the default parser */
|
|
-#ifdef CONFIG_SND_HDA_GENERIC
|
|
|
|
err = snd_hda_parse_generic_codec(codec);
|
|
err = snd_hda_parse_generic_codec(codec);
|
|
-#else
|
|
|
|
- printk(KERN_ERR "hda-codec: No codec parser is available\n");
|
|
|
|
- err = -ENODEV;
|
|
|
|
-#endif
|
|
|
|
|
|
+ if (err < 0)
|
|
|
|
+ printk(KERN_ERR "hda-codec: No codec parser is available\n");
|
|
|
|
|
|
patched:
|
|
patched:
|
|
if (err < 0) {
|
|
if (err < 0) {
|