aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_ca0132.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-02-07 06:41:40 -0500
committerTakashi Iwai <tiwai@suse.de>2013-02-07 06:56:12 -0500
commit9a0869f4028916a164b1ba600e819c1dcd7c17a2 (patch)
tree2d42e1cfce646a8c2d6149a7696874a564cdbdae /sound/pci/hda/patch_ca0132.c
parent45acc86b2e47e255c4a6194dd69248a1bce71e48 (diff)
ALSA: hda - Fix misc compile warnings in patch_ca0132.c
sound/pci/hda/patch_ca0132.c: In function ‘ca0132_is_vnode_effective’: sound/pci/hda/patch_ca0132.c:3331:15: warning: ‘nid’ may be used uninitialized in this function [-Wmaybe-uninitialized] sound/pci/hda/patch_ca0132.c:4345:13: warning: ‘ca0132_download_dsp’ defined but not used [-Wunused-function] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_ca0132.c')
-rw-r--r--sound/pci/hda/patch_ca0132.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 9d9040bbfb68..639a2829112f 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -3312,25 +3312,22 @@ static bool ca0132_is_vnode_effective(struct hda_codec *codec,
3312{ 3312{
3313 struct ca0132_spec *spec = codec->spec; 3313 struct ca0132_spec *spec = codec->spec;
3314 hda_nid_t nid; 3314 hda_nid_t nid;
3315 bool effective = false;
3316 3315
3317 switch (vnid) { 3316 switch (vnid) {
3318 case VNID_SPK: 3317 case VNID_SPK:
3319 nid = spec->shared_out_nid; 3318 nid = spec->shared_out_nid;
3320 effective = true;
3321 break; 3319 break;
3322 case VNID_MIC: 3320 case VNID_MIC:
3323 nid = spec->shared_mic_nid; 3321 nid = spec->shared_mic_nid;
3324 effective = true;
3325 break; 3322 break;
3326 default: 3323 default:
3327 break; 3324 return false;
3328 } 3325 }
3329 3326
3330 if (effective && shared_nid) 3327 if (shared_nid)
3331 *shared_nid = nid; 3328 *shared_nid = nid;
3332 3329
3333 return effective; 3330 return true;
3334} 3331}
3335 3332
3336/* 3333/*
@@ -4346,6 +4343,9 @@ static void ca0132_download_dsp(struct hda_codec *codec)
4346{ 4343{
4347 struct ca0132_spec *spec = codec->spec; 4344 struct ca0132_spec *spec = codec->spec;
4348 4345
4346#ifndef CONFIG_SND_HDA_CODEC_CA0132_DSP
4347 return; /* NOP */
4348#endif
4349 spec->dsp_state = DSP_DOWNLOAD_INIT; 4349 spec->dsp_state = DSP_DOWNLOAD_INIT;
4350 4350
4351 if (spec->dsp_state == DSP_DOWNLOAD_INIT) { 4351 if (spec->dsp_state == DSP_DOWNLOAD_INIT) {
@@ -4530,9 +4530,7 @@ static int ca0132_init(struct hda_codec *codec)
4530 ca0132_init_params(codec); 4530 ca0132_init_params(codec);
4531 ca0132_init_flags(codec); 4531 ca0132_init_flags(codec);
4532 snd_hda_sequence_write(codec, spec->base_init_verbs); 4532 snd_hda_sequence_write(codec, spec->base_init_verbs);
4533#ifdef CONFIG_SND_HDA_CODEC_CA0132_DSP
4534 ca0132_download_dsp(codec); 4533 ca0132_download_dsp(codec);
4535#endif
4536 ca0132_refresh_widget_caps(codec); 4534 ca0132_refresh_widget_caps(codec);
4537 ca0132_setup_defaults(codec); 4535 ca0132_setup_defaults(codec);
4538 ca0132_init_analog_mic2(codec); 4536 ca0132_init_analog_mic2(codec);