diff options
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index fd6e6f337d10..8820faf6c9d8 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -642,19 +642,21 @@ static int get_codec_name(struct hda_codec *codec) | |||
642 | */ | 642 | */ |
643 | static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec) | 643 | static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec) |
644 | { | 644 | { |
645 | int i, total_nodes; | 645 | int i, total_nodes, function_id; |
646 | hda_nid_t nid; | 646 | hda_nid_t nid; |
647 | 647 | ||
648 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); | 648 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); |
649 | for (i = 0; i < total_nodes; i++, nid++) { | 649 | for (i = 0; i < total_nodes; i++, nid++) { |
650 | codec->function_id = snd_hda_param_read(codec, nid, | 650 | function_id = snd_hda_param_read(codec, nid, |
651 | AC_PAR_FUNCTION_TYPE) & 0xff; | 651 | AC_PAR_FUNCTION_TYPE) & 0xff; |
652 | switch (codec->function_id) { | 652 | switch (function_id) { |
653 | case AC_GRP_AUDIO_FUNCTION: | 653 | case AC_GRP_AUDIO_FUNCTION: |
654 | codec->afg = nid; | 654 | codec->afg = nid; |
655 | codec->function_id = function_id; | ||
655 | break; | 656 | break; |
656 | case AC_GRP_MODEM_FUNCTION: | 657 | case AC_GRP_MODEM_FUNCTION: |
657 | codec->mfg = nid; | 658 | codec->mfg = nid; |
659 | codec->function_id = function_id; | ||
658 | break; | 660 | break; |
659 | default: | 661 | default: |
660 | break; | 662 | break; |