summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_bind.c4
-rw-r--r--sound/pci/hda/hda_codec.c1
-rw-r--r--sound/pci/hda/hda_codec.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c
index ef6b8f836a87..021bcce59447 100644
--- a/sound/pci/hda/hda_bind.c
+++ b/sound/pci/hda/hda_bind.c
@@ -61,10 +61,12 @@ int snd_hda_codec_set_name(struct hda_codec *codec, const char *name)
return err;
/* update the mixer name */
- if (!*codec->card->mixername) {
+ if (!*codec->card->mixername ||
+ codec->mixer_assigned >= codec->core.addr) {
snprintf(codec->card->mixername,
sizeof(codec->card->mixername), "%s %s",
codec->core.vendor_name, codec->core.chip_name);
+ codec->mixer_assigned = codec->core.addr;
}
return 0;
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 2eeaf5ea20f9..0e55c6a6cc7e 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -851,6 +851,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work);
codec->depop_delay = -1;
codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
+ codec->mixer_assigned = -1;
#ifdef CONFIG_PM
codec->power_jiffies = jiffies;
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index b6d937784afa..891864ac60f5 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -257,6 +257,7 @@ struct hda_codec {
unsigned long power_off_acct;
unsigned long power_jiffies;
#endif
+ unsigned int mixer_assigned;
/* filter the requested power state per nid */
unsigned int (*power_filter)(struct hda_codec *codec, hda_nid_t nid,