Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff33f230 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

ALSA: Increase components array size



Increase the card components[] (and thus snd_card_info.components[],
too) array size from 80 to 128 chars so that more strings can be
stored.  The 80 chars aren't enough for more than 2 HD-audio codecs,
and this hits an ugly snd_BUG() as reported by Wu Fegguang for HP
2230s.

The control protocol number is increased to 2.0.6 as well, in case
it matters.

Reported-by: default avatarWu Fengguang <wfg@linux.intel.com>
Acked-by: default avatarJaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 8ae23ec3
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -707,7 +707,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 {
struct snd_ctl_card_info {
	int card;			/* card number */
	int card;			/* card number */
@@ -718,8 +718,7 @@ struct snd_ctl_card_info {
	unsigned char longname[80];	/* name + info text about soundcard */
	unsigned char longname[80];	/* name + info text about soundcard */
	unsigned char reserved_[16];	/* reserved for future (was ID of mixer) */
	unsigned char reserved_[16];	/* reserved for future (was ID of mixer) */
	unsigned char mixername[80];	/* visual mixer identification */
	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 */
};
};


typedef int __bitwise snd_ctl_elem_type_t;
typedef int __bitwise snd_ctl_elem_type_t;
+1 −1
Original line number Original line Diff line number Diff line
@@ -116,7 +116,7 @@ struct snd_card {
	char shortname[32];		/* short name of this soundcard */
	char shortname[32];		/* short name of this soundcard */
	char longname[80];		/* name of this soundcard */
	char longname[80];		/* name of this soundcard */
	char mixername[80];		/* mixer name */
	char mixername[80];		/* mixer name */
	char components[80];		/* card components delimited with
	char components[128];		/* card components delimited with
								space */
								space */
	struct module *module;		/* top-level module */
	struct module *module;		/* top-level module */