aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-07-06 12:17:04 -0400
committerJaroslav Kysela <perex@suse.cz>2007-07-20 05:11:46 -0400
commita4eed138add1018846d17e813560b0c7c0ae8e01 (patch)
tree8b91f05a7b466829b4aaee1864eb4d47e0e06905 /sound
parent47a2327eac01fa944ab935fc5bb03c3032b2ec37 (diff)
[ALSA] hda-codec - Fix number of pin widgets with STAC codecs
Use ARRAY_SIZE() to calculate the number of pin widgets for each codec chip. This also fixes a typo in STAC9205 code that gives a wrong number (14 instead of 12), which resulted in fatal communication errors. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f20b4faf6ccb..0dccba231e8b 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1958,7 +1958,7 @@ static int patch_stac9200(struct hda_codec *codec)
1958 return -ENOMEM; 1958 return -ENOMEM;
1959 1959
1960 codec->spec = spec; 1960 codec->spec = spec;
1961 spec->num_pins = 8; 1961 spec->num_pins = ARRAY_SIZE(stac9200_pin_nids);
1962 spec->pin_nids = stac9200_pin_nids; 1962 spec->pin_nids = stac9200_pin_nids;
1963 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, 1963 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
1964 stac9200_models, 1964 stac9200_models,
@@ -2008,7 +2008,7 @@ static int patch_stac925x(struct hda_codec *codec)
2008 return -ENOMEM; 2008 return -ENOMEM;
2009 2009
2010 codec->spec = spec; 2010 codec->spec = spec;
2011 spec->num_pins = 8; 2011 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
2012 spec->pin_nids = stac925x_pin_nids; 2012 spec->pin_nids = stac925x_pin_nids;
2013 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, 2013 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS,
2014 stac925x_models, 2014 stac925x_models,
@@ -2080,7 +2080,7 @@ static int patch_stac922x(struct hda_codec *codec)
2080 return -ENOMEM; 2080 return -ENOMEM;
2081 2081
2082 codec->spec = spec; 2082 codec->spec = spec;
2083 spec->num_pins = 10; 2083 spec->num_pins = ARRAY_SIZE(stac922x_pin_nids);
2084 spec->pin_nids = stac922x_pin_nids; 2084 spec->pin_nids = stac922x_pin_nids;
2085 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, 2085 spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
2086 stac922x_models, 2086 stac922x_models,
@@ -2181,7 +2181,7 @@ static int patch_stac927x(struct hda_codec *codec)
2181 return -ENOMEM; 2181 return -ENOMEM;
2182 2182
2183 codec->spec = spec; 2183 codec->spec = spec;
2184 spec->num_pins = 14; 2184 spec->num_pins = ARRAY_SIZE(stac927x_pin_nids);
2185 spec->pin_nids = stac927x_pin_nids; 2185 spec->pin_nids = stac927x_pin_nids;
2186 spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS, 2186 spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS,
2187 stac927x_models, 2187 stac927x_models,
@@ -2266,7 +2266,7 @@ static int patch_stac9205(struct hda_codec *codec)
2266 return -ENOMEM; 2266 return -ENOMEM;
2267 2267
2268 codec->spec = spec; 2268 codec->spec = spec;
2269 spec->num_pins = 14; 2269 spec->num_pins = ARRAY_SIZE(stac9205_pin_nids);
2270 spec->pin_nids = stac9205_pin_nids; 2270 spec->pin_nids = stac9205_pin_nids;
2271 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS, 2271 spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
2272 stac9205_models, 2272 stac9205_models,