]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Mon, 17 Jun 2019 11:36:35 +0000 (13:36 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 25 Jun 2019 14:32:58 +0000 (15:32 +0100)
commit5f7cd9edf9849f31059b93e0137c919f915fa0d4
treecefe9e3842b694ab70667c529bddfcc55f3ee05c
parent37bcf2bced1913c8e91c0a8fc1358951f23738f5
ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded

Currently on each driver reload internal counter is being increased. It
causes failure to enumerate driver devices, as they have hardcoded:
.codec_name = "ehdaudio0D2",
As there is currently no devices with multiple hda codecs and there is
currently no established way to reliably differentiate, between them,
always assign bus->idx = 0;

This fixes a problem when we unload and reload machine driver idx gets
incremented, so .codec_name would've needed to be set to "ehdaudio1D2"
after first reload and so on.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/hda/ext/hdac_ext_bus.c