Skip to content

Commit

Permalink
ALSA: hda - Set mixer name after codec patch
Browse files Browse the repository at this point in the history
Postpone the mixer name setup after the codec patch since the codec
patch may change the codec name string in itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 23, 2009
1 parent 9dc8398 commit f62faed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,11 +1086,6 @@ int snd_hda_codec_configure(struct hda_codec *codec)
if (err < 0)
return err;
}
/* audio codec should override the mixer name */
if (codec->afg || !*codec->bus->card->mixername)
snprintf(codec->bus->card->mixername,
sizeof(codec->bus->card->mixername),
"%s %s", codec->vendor_name, codec->chip_name);

if (is_generic_config(codec)) {
err = snd_hda_parse_generic_codec(codec);
Expand All @@ -1109,6 +1104,11 @@ int snd_hda_codec_configure(struct hda_codec *codec)
patched:
if (!err && codec->patch_ops.unsol_event)
err = init_unsol_queue(codec->bus);
/* audio codec should override the mixer name */
if (!err && (codec->afg || !*codec->bus->card->mixername))
snprintf(codec->bus->card->mixername,
sizeof(codec->bus->card->mixername),
"%s %s", codec->vendor_name, codec->chip_name);
return err;
}
EXPORT_SYMBOL_HDA(snd_hda_codec_configure);
Expand Down

0 comments on commit f62faed

Please sign in to comment.