aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-16 08:27:04 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 10:51:23 -0400
commitf6e9852ad05fa28301c83d4e2b082620de010358 (patch)
tree2fbf1662df378157f4aa7c6fef19398f823ec44f /sound
parent2a3988f6d2c5be9d02463097775d1c66a8290527 (diff)
[ALSA] hda-codec - Add array terminator for dmic in STAC codec
Reported by Jan-Marek Glogowski. The dmic array is passed to snd_hda_parse_pin_def_config() and should be zero-terminated. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 626a5edde06c..bf950195107c 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -183,8 +183,9 @@ static hda_nid_t stac925x_dac_nids[1] = {
183 0x02, 183 0x02,
184}; 184};
185 185
186static hda_nid_t stac925x_dmic_nids[1] = { 186#define STAC925X_NUM_DMICS 1
187 0x15, 187static hda_nid_t stac925x_dmic_nids[STAC925X_NUM_DMICS + 1] = {
188 0x15, 0
188}; 189};
189 190
190static hda_nid_t stac922x_adc_nids[2] = { 191static hda_nid_t stac922x_adc_nids[2] = {
@@ -211,8 +212,9 @@ static hda_nid_t stac9205_mux_nids[2] = {
211 0x19, 0x1a 212 0x19, 0x1a
212}; 213};
213 214
214static hda_nid_t stac9205_dmic_nids[2] = { 215#define STAC9205_NUM_DMICS 2
215 0x17, 0x18, 216static hda_nid_t stac9205_dmic_nids[STAC9205_NUM_DMICS + 1] = {
217 0x17, 0x18, 0
216}; 218};
217 219
218static hda_nid_t stac9200_pin_nids[8] = { 220static hda_nid_t stac9200_pin_nids[8] = {
@@ -2569,7 +2571,7 @@ static int patch_stac925x(struct hda_codec *codec)
2569 case 0x83847633: /* STAC9202D */ 2571 case 0x83847633: /* STAC9202D */
2570 case 0x83847636: /* STAC9251 */ 2572 case 0x83847636: /* STAC9251 */
2571 case 0x83847637: /* STAC9251D */ 2573 case 0x83847637: /* STAC9251D */
2572 spec->num_dmics = 1; 2574 spec->num_dmics = STAC925X_NUM_DMICS;
2573 spec->dmic_nids = stac925x_dmic_nids; 2575 spec->dmic_nids = stac925x_dmic_nids;
2574 break; 2576 break;
2575 default: 2577 default:
@@ -2819,7 +2821,7 @@ static int patch_stac9205(struct hda_codec *codec)
2819 spec->mux_nids = stac9205_mux_nids; 2821 spec->mux_nids = stac9205_mux_nids;
2820 spec->num_muxes = ARRAY_SIZE(stac9205_mux_nids); 2822 spec->num_muxes = ARRAY_SIZE(stac9205_mux_nids);
2821 spec->dmic_nids = stac9205_dmic_nids; 2823 spec->dmic_nids = stac9205_dmic_nids;
2822 spec->num_dmics = ARRAY_SIZE(stac9205_dmic_nids); 2824 spec->num_dmics = STAC9205_NUM_DMICS;
2823 spec->dmux_nid = 0x1d; 2825 spec->dmux_nid = 0x1d;
2824 2826
2825 spec->init = stac9205_core_init; 2827 spec->init = stac9205_core_init;