From: Takashi Iwai Subject: Re: [PATCH v2 02/11] ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded Date: Mon, 17 Jun 2019 17:29:23 +0200 Message-ID: References: <20190617113644.25621-1-amadeuszx.slawinski@linux.intel.com> <20190617113644.25621-3-amadeuszx.slawinski@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190617113644.25621-3-amadeuszx.slawinski@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Amadeusz =?UTF-8?B?U8WCYXdpxYRza2k=?= Cc: alsa-devel@alsa-project.org, Liam Girdwood , Cezary Rojewski , Mark Brown , Pierre-Louis Bossart , Jie Yang , Jaroslav Kysela , linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Mon, 17 Jun 2019 13:36:35 +0200, Amadeusz Sławiński wrote: > > 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 Acked-by: Takashi Iwai Takashi