aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-23 03:27:51 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-23 03:27:51 -0500
commitf62faedbed546f4e0c1ba204999e7c206059f305 (patch)
tree2f23c979546e60d764e7a438313c7f328131b411 /sound
parent9dc8398bab52931435fce403ce2eaf5822f28e58 (diff)
ALSA: hda - Set mixer name after codec patch
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 9cfdb771928c..950ee5cfcacf 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1086,11 +1086,6 @@ int snd_hda_codec_configure(struct hda_codec *codec)
1086 if (err < 0) 1086 if (err < 0)
1087 return err; 1087 return err;
1088 } 1088 }
1089 /* audio codec should override the mixer name */
1090 if (codec->afg || !*codec->bus->card->mixername)
1091 snprintf(codec->bus->card->mixername,
1092 sizeof(codec->bus->card->mixername),
1093 "%s %s", codec->vendor_name, codec->chip_name);
1094 1089
1095 if (is_generic_config(codec)) { 1090 if (is_generic_config(codec)) {
1096 err = snd_hda_parse_generic_codec(codec); 1091 err = snd_hda_parse_generic_codec(codec);
@@ -1109,6 +1104,11 @@ int snd_hda_codec_configure(struct hda_codec *codec)
1109 patched: 1104 patched:
1110 if (!err && codec->patch_ops.unsol_event) 1105 if (!err && codec->patch_ops.unsol_event)
1111 err = init_unsol_queue(codec->bus); 1106 err = init_unsol_queue(codec->bus);
1107 /* audio codec should override the mixer name */
1108 if (!err && (codec->afg || !*codec->bus->card->mixername))
1109 snprintf(codec->bus->card->mixername,
1110 sizeof(codec->bus->card->mixername),
1111 "%s %s", codec->vendor_name, codec->chip_name);
1112 return err; 1112 return err;
1113} 1113}
1114EXPORT_SYMBOL_HDA(snd_hda_codec_configure); 1114EXPORT_SYMBOL_HDA(snd_hda_codec_configure);