diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 4c0a6a5b20d9..e768187465e3 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -403,6 +403,9 @@ static const struct hda_codec_preset *find_codec_preset(struct hda_codec *codec) | |||
403 | { | 403 | { |
404 | const struct hda_codec_preset **tbl, *preset; | 404 | const struct hda_codec_preset **tbl, *preset; |
405 | 405 | ||
406 | if (codec->bus->modelname && !strcmp(codec->bus->modelname, "generic")) | ||
407 | return NULL; /* use the generic parser */ | ||
408 | |||
406 | for (tbl = hda_preset_tables; *tbl; tbl++) { | 409 | for (tbl = hda_preset_tables; *tbl; tbl++) { |
407 | for (preset = *tbl; preset->id; preset++) { | 410 | for (preset = *tbl; preset->id; preset++) { |
408 | u32 mask = preset->mask; | 411 | u32 mask = preset->mask; |
@@ -573,8 +576,7 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, | |||
573 | 0); | 576 | 0); |
574 | } | 577 | } |
575 | 578 | ||
576 | if (strcmp(codec->bus->modelname, "generic")) | 579 | codec->preset = find_codec_preset(codec); |
577 | codec->preset = find_codec_preset(codec); | ||
578 | if (! *bus->card->mixername) | 580 | if (! *bus->card->mixername) |
579 | snd_hda_get_codec_name(codec, bus->card->mixername, | 581 | snd_hda_get_codec_name(codec, bus->card->mixername, |
580 | sizeof(bus->card->mixername)); | 582 | sizeof(bus->card->mixername)); |