diff options
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 61a71131711c..d5f3a26d608d 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -101,8 +101,8 @@ enum { | |||
101 | #define CS420X_VENDOR_NID 0x11 | 101 | #define CS420X_VENDOR_NID 0x11 |
102 | #define CS_DIG_OUT1_PIN_NID 0x10 | 102 | #define CS_DIG_OUT1_PIN_NID 0x10 |
103 | #define CS_DIG_OUT2_PIN_NID 0x15 | 103 | #define CS_DIG_OUT2_PIN_NID 0x15 |
104 | #define CS_DMIC1_PIN_NID 0x12 | 104 | #define CS_DMIC1_PIN_NID 0x0e |
105 | #define CS_DMIC2_PIN_NID 0x0e | 105 | #define CS_DMIC2_PIN_NID 0x12 |
106 | 106 | ||
107 | /* coef indices */ | 107 | /* coef indices */ |
108 | #define IDX_SPDIF_STAT 0x0000 | 108 | #define IDX_SPDIF_STAT 0x0000 |
@@ -1079,14 +1079,18 @@ static void init_input(struct hda_codec *codec) | |||
1079 | cs_automic(codec, NULL); | 1079 | cs_automic(codec, NULL); |
1080 | 1080 | ||
1081 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ | 1081 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ |
1082 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | ||
1083 | |||
1084 | coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG); | ||
1082 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) | 1085 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) |
1083 | coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ | 1086 | coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */ |
1084 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) | 1087 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) |
1085 | coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off | 1088 | coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off |
1086 | * No effect if SPDIF_OUT2 is | 1089 | * No effect if SPDIF_OUT2 is |
1087 | * selected in IDX_SPDIF_CTL. | 1090 | * selected in IDX_SPDIF_CTL. |
1088 | */ | 1091 | */ |
1089 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | 1092 | |
1093 | cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef); | ||
1090 | } else { | 1094 | } else { |
1091 | if (spec->mic_detect) | 1095 | if (spec->mic_detect) |
1092 | cs_automic(codec, NULL); | 1096 | cs_automic(codec, NULL); |
@@ -1107,7 +1111,7 @@ static const struct hda_verb cs_coef_init_verbs[] = { | |||
1107 | | 0x0400 /* Disable Coefficient Auto increment */ | 1111 | | 0x0400 /* Disable Coefficient Auto increment */ |
1108 | )}, | 1112 | )}, |
1109 | /* Beep */ | 1113 | /* Beep */ |
1110 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, | 1114 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG}, |
1111 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ | 1115 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ |
1112 | 1116 | ||
1113 | {} /* terminator */ | 1117 | {} /* terminator */ |
@@ -1728,8 +1732,7 @@ static int cs421x_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
1728 | 1732 | ||
1729 | } | 1733 | } |
1730 | 1734 | ||
1731 | static struct snd_kcontrol_new cs421x_capture_source = { | 1735 | static const struct snd_kcontrol_new cs421x_capture_source = { |
1732 | |||
1733 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1736 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1734 | .name = "Capture Source", | 1737 | .name = "Capture Source", |
1735 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 1738 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -1946,7 +1949,7 @@ static int cs421x_suspend(struct hda_codec *codec) | |||
1946 | } | 1949 | } |
1947 | #endif | 1950 | #endif |
1948 | 1951 | ||
1949 | static struct hda_codec_ops cs421x_patch_ops = { | 1952 | static const struct hda_codec_ops cs421x_patch_ops = { |
1950 | .build_controls = cs421x_build_controls, | 1953 | .build_controls = cs421x_build_controls, |
1951 | .build_pcms = cs_build_pcms, | 1954 | .build_pcms = cs_build_pcms, |
1952 | .init = cs421x_init, | 1955 | .init = cs421x_init, |