]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/patch_analog.c
[POWERPC] EEH: Power4 systems sometimes need multiple resets.
[linux-2.6-omap-h63xx.git] / sound / pci / hda / patch_analog.c
index dd4e00a82b55fdd79eb7f7a08182f193f85dd724..6823f2bc10b3b6a49fa443a7fdaeb4bd25f4dd2b 100644 (file)
@@ -799,6 +799,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x818f,
          .config = AD1986A_LAPTOP }, /* ASUS P5GV-MX */
        { .modelname = "laptop-eapd",   .config = AD1986A_LAPTOP_EAPD },
+       { .pci_subvendor = 0x144d, .pci_subdevice = 0xc023,
+         .config = AD1986A_LAPTOP_EAPD }, /* Samsung X60 Chane */
        { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024,
          .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153,
@@ -1543,6 +1545,9 @@ enum {
 /* reivision id to check workarounds */
 #define AD1988A_REV2           0x100200
 
+#define is_rev2(codec) \
+       ((codec)->vendor_id == 0x11d41988 && \
+        (codec)->revision_id == AD1988A_REV2)
 
 /*
  * mixers
@@ -1634,6 +1639,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1[] = {
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
@@ -1642,6 +1648,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = {
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_6stack_mixers2[] = {
@@ -1680,6 +1687,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = {
        HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
@@ -1687,6 +1695,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
        HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT),
+       { } /* end */
 };
 
 static struct snd_kcontrol_new ad1988_3stack_mixers2[] = {
@@ -2193,7 +2202,7 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx)
                /* A     B     C     D     E     F     G     H */
                0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06
        };
-       if (codec->revision_id == AD1988A_REV2)
+       if (is_rev2(codec))
                return idx_to_dac_rev2[idx];
        else
                return idx_to_dac[idx];
@@ -2562,7 +2571,7 @@ static int patch_ad1988(struct hda_codec *codec)
        mutex_init(&spec->amp_mutex);
        codec->spec = spec;
 
-       if (codec->revision_id == AD1988A_REV2)
+       if (is_rev2(codec))
                snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n");
 
        board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl);
@@ -2588,13 +2597,13 @@ static int patch_ad1988(struct hda_codec *codec)
        case AD1988_6STACK_DIG:
                spec->multiout.max_channels = 8;
                spec->multiout.num_dacs = 4;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2;
                else
                        spec->multiout.dac_nids = ad1988_6stack_dac_nids;
                spec->input_mux = &ad1988_6stack_capture_source;
                spec->num_mixers = 2;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->mixers[0] = ad1988_6stack_mixers1_rev2;
                else
                        spec->mixers[0] = ad1988_6stack_mixers1;
@@ -2610,7 +2619,7 @@ static int patch_ad1988(struct hda_codec *codec)
        case AD1988_3STACK_DIG:
                spec->multiout.max_channels = 6;
                spec->multiout.num_dacs = 3;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2;
                else
                        spec->multiout.dac_nids = ad1988_3stack_dac_nids;
@@ -2618,7 +2627,7 @@ static int patch_ad1988(struct hda_codec *codec)
                spec->channel_mode = ad1988_3stack_modes;
                spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes);
                spec->num_mixers = 2;
-               if (codec->revision_id == AD1988A_REV2)
+               if (is_rev2(codec))
                        spec->mixers[0] = ad1988_3stack_mixers1_rev2;
                else
                        spec->mixers[0] = ad1988_3stack_mixers1;