[alsa-devel] [PATCH] snd-core: enlarge snd_card.components for up to 4 codecs

Jaroslav Kysela perex at perex.cz
Tue Oct 7 11:06:28 CEST 2008


On Tue, 7 Oct 2008, Takashi Iwai wrote:

> Then I agree with increasing the components as a simple workaround.
> 
> How about the patch below?  The control protocol number is increased
> for this change as well.
> 
> 
> thanks,
> 
> Takashi
> 
> diff --git a/include/sound/asound.h b/include/sound/asound.h
> index 3eaf155..fbfe992 100644
> --- a/include/sound/asound.h
> +++ b/include/sound/asound.h
> @@ -696,7 +696,7 @@ struct snd_timer_tread {
>   *                                                                          *
>   ****************************************************************************/
>  
> -#define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 5)
> +#define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 6)
>  
>  struct snd_ctl_card_info {
>  	int card;			/* card number */
> @@ -707,8 +707,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 reserved[48];	/* reserved for future */
> +	unsigned char components[128];	/* card components / fine identification, delimited with one space (AC97 etc..) */
>  };
>  
>  typedef int __bitwise snd_ctl_elem_type_t;
> diff --git a/include/sound/core.h b/include/sound/core.h
> index 558b962..221554e 100644
> --- a/include/sound/core.h
> +++ b/include/sound/core.h
> @@ -114,7 +114,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 */

Acked-by: Jaroslav Kysela <perex at perex.cz>

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.



More information about the Alsa-devel mailing list