From 2f0eaad91005b00e774a118595a573a9e0fd30fc Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 17 Oct 2015 18:25:38 +0200 Subject: ALSA: hda - Fix bogus codec address check for mixer name assignment The recent commit [7fbe824a0f0e: ALSA: hda - Update mixer name for the lower codec address] tried to improve the mixer chip name assignment in the order of codec address. However, this fix was utterly bogus; it checks the field set in each codec, thus this value is reset at each codec creation, of course. For really handling this priority, the assignment has to be remembered in the common place, namely in hda_bus, instead of hda_codec. Fixes: 7fbe824a0f0e ('ALSA: hda - Update mixer name for the lower codec address') Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci/hda/hda_bind.c') diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index 021bcce59447..57800a498f7b 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -62,11 +62,11 @@ int snd_hda_codec_set_name(struct hda_codec *codec, const char *name) /* update the mixer name */ if (!*codec->card->mixername || - codec->mixer_assigned >= codec->core.addr) { + codec->bus->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; + codec->bus->mixer_assigned = codec->core.addr; } return 0; -- cgit v1.2.3