From: Takashi Iwai Subject: Re: [PATCH] snd-core: enlarge snd_card.components for up to 4 codecs Date: Tue, 07 Oct 2008 10:10:43 +0200 Message-ID: References: <1223362567.716898.9499@de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1223362567.716898.9499@de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Wu Fengguang Cc: alsa-devel@alsa-project.org, patch@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 7 Oct 2008 14:56:06 +0800, Wu Fengguang wrote: > > Enlarge snd_card.components[80] to 128 bytes, with space for 4 codecs. > The previous size 80 cannot support HP 2230s which has 3 codecs. > > Signed-off-by: Wu Fengguang Thanks for the patch. Unfortunately, this can't be applied as is. struct snd_ctl_card_info is exported and used as the ioctl parameter, thus you cannot change the size. One possible fix is to merge reserved[48] into components[80] so that the struct size is kept as is. But still we have to be very careful to such a change, and need to investigate all possible places to refer it. Takashi > --- > > diff --git a/include/sound/asound.h b/include/sound/asound.h > index ca2f358..b3801b0 100644 > --- a/include/sound/asound.h > +++ b/include/sound/asound.h > @@ -708,7 +708,7 @@ struct snd_ctl_card_info { > unsigned char longname[80]; /* name + info text about soundcard */ > unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ > unsigned char mixername[80]; /* visual mixer identification */ > - unsigned char components[80]; /* card components / fine identification, delimited with one space (AC97 etc..) */ > + unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ > unsigned char reserved[48]; /* reserved for future */ > }; > > diff --git a/include/sound/core.h b/include/sound/core.h > index f52ab6f..dcbc424 100644 > --- a/include/sound/core.h > +++ b/include/sound/core.h > @@ -116,7 +116,7 @@ struct snd_card { > char shortname[32]; /* short name of this soundcard */ > char longname[80]; /* name of this soundcard */ > char mixername[80]; /* mixer name */ > - char components[80]; /* card components delimited with > + char components[128]; /* card components delimited with > space */ > struct module *module; /* top-level module */ > >