summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-07-06 18:17:04 +0200
committerJaroslav Kysela <perex@suse.cz>2007-07-20 11:11:46 +0200
commita4eed138add1018846d17e813560b0c7c0ae8e01 (patch)
tree8b91f05a7b466829b4aaee1864eb4d47e0e06905 /sound/pci
parent47a2327eac01fa944ab935fc5bb03c3032b2ec37 (diff)
downloadop-kernel-dev-a4eed138add1018846d17e813560b0c7c0ae8e01.zip
op-kernel-dev-a4eed138add1018846d17e813560b0c7c0ae8e01.tar.gz
[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/pci')
-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 f20b4fa..0dccba2 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)
return -ENOMEM;
codec->spec = spec;
- spec->num_pins = 8;
+ spec->num_pins = ARRAY_SIZE(stac9200_pin_nids);
spec->pin_nids = stac9200_pin_nids;
spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
stac9200_models,
@@ -2008,7 +2008,7 @@ static int patch_stac925x(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
- spec->num_pins = 8;
+ spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
spec->pin_nids = stac925x_pin_nids;
spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS,
stac925x_models,
@@ -2080,7 +2080,7 @@ static int patch_stac922x(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
- spec->num_pins = 10;
+ spec->num_pins = ARRAY_SIZE(stac922x_pin_nids);
spec->pin_nids = stac922x_pin_nids;
spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
stac922x_models,
@@ -2181,7 +2181,7 @@ static int patch_stac927x(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
- spec->num_pins = 14;
+ spec->num_pins = ARRAY_SIZE(stac927x_pin_nids);
spec->pin_nids = stac927x_pin_nids;
spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS,
stac927x_models,
@@ -2266,7 +2266,7 @@ static int patch_stac9205(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
- spec->num_pins = 14;
+ spec->num_pins = ARRAY_SIZE(stac9205_pin_nids);
spec->pin_nids = stac9205_pin_nids;
spec->board_config = snd_hda_check_board_config(codec, STAC_9205_MODELS,
stac9205_models,
OpenPOWER on IntegriCloud