From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262240AbTKYKaf (ORCPT ); Tue, 25 Nov 2003 05:30:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262283AbTKYKaf (ORCPT ); Tue, 25 Nov 2003 05:30:35 -0500 Received: from ns.suse.de ([195.135.220.2]:48339 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S262240AbTKYKac (ORCPT ); Tue, 25 Nov 2003 05:30:32 -0500 Date: Tue, 25 Nov 2003 11:29:54 +0100 Message-ID: From: Takashi Iwai To: Adam Belay Cc: arvidjaar@mail.ru, linux-kernel@vger.kernel.org, rusty@rustcorp.com.au, perex@suse.cz Subject: Re: modules.pnpmap output support In-Reply-To: <20031123220712.GE30835@neo.rr.com> References: <20031120212320.GB25417@neo.rr.com> <20031123220712.GE30835@neo.rr.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Sun, 23 Nov 2003 22:07:12 +0000, Adam Belay wrote: > > On Fri, Nov 21, 2003 at 12:44:45PM +0100, Takashi Iwai wrote: > > At Thu, 20 Nov 2003 21:23:20 +0000, > > Adam Belay wrote: > > --> snip > > > > The device ID is checked, but this checking occurs during the driver's > > > probe function, when it calls pnp_request_card_device. This is needed > > > in order for us to properly deal with multidevice cards, especially in > > > ALSA. > > > > well, the probe callback of all ALSA isapnp drivers doesn't look for > > the matching device ids. that is, the callback trusts that the pnp > > core passes the correct pnp_card_device_id, and it checks only the > > devices listed on this id. so, as mentioned above, if there are > > multiple entries with the same card id but different device ids, > > probing the second entry will fail, because match_card() returns the > > first matching id. > > Hmm, I agree, if there are multiple entries with the same card ID then > only the first ID would be matched. I could add some code to match_card() > so that it checks to see if all of the devices in the list are present. > This would, however, break ALSA's current policy of enabling a card, even > if some of its device components are unavailabe. this should be ok. we already have multiple definitions for such a case. > Could you provide any > specific examples of multiple entries with the same card ID? I'd like to > look at some closer. sound/isa/cs423x/cs4236.c includes the following ids: static struct pnp_card_device_id snd_cs423x_pnpids[] = { /* Intel Marlin Spike Motherboard - CS4235 */ { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, /* Intel Marlin Spike Motherboard (#2) - CS4235 */ { .id = "CSC0225", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC0103" } } }, also within the same list: /* Dell Optiplex GX1 - CS4236B */ { .id = "CSC6835", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, /* Dell P410 motherboard - CS4236B */ { .id = "CSC6835", .devs = { { "CSC0000" }, { "CSC0010" } } }, the latter is fallback for the board without MPU401. > > > If possibly, I'd like to see the devices in these cards be > > > handled individually in 2.7 but note that doing so would require > > > changes to some drivers and subsystems. The current system works well > > > for 2.6. > > > > > > Because of these factors, and the fact that pnp_device_id is also used, > > > I think that we have to include all of the IDs in the pnpidmap. This > > > would include both the card id and the individual device IDs on each > > > card. pnp_device_id can use the isapnp card device ids in addition to > > > the ids reported by the pnpbios. > > > > oh, can pnp_device_id be a card id, too, not only a device id? > > Only a device ID, but those device IDs can reside on isapnp cards. ok, that what i expected. -- Takashi Iwai ALSA Developer - www.alsa-project.org