diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
commit | 52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch) | |
tree | 6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /sound | |
parent | 41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff) | |
parent | 8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/Kconfig | 1 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 8 | ||||
-rw-r--r-- | sound/core/pcm_timer.c | 17 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 22 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 43 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 385 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 22 | ||||
-rw-r--r-- | sound/soc/codecs/ak4642.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/stac9766.c | 18 | ||||
-rw-r--r-- | sound/soc/codecs/wm8974.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm9712.c | 3 | ||||
-rw-r--r-- | sound/soc/imx/mx27vis_wm8974.c | 3 | ||||
-rw-r--r-- | sound/soc/omap/sdp3430.c | 6 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 2 |
16 files changed, 448 insertions, 97 deletions
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index c15682a2f9db..475455c76610 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
@@ -5,6 +5,7 @@ config SND_TIMER | |||
5 | config SND_PCM | 5 | config SND_PCM |
6 | tristate | 6 | tristate |
7 | select SND_TIMER | 7 | select SND_TIMER |
8 | select GCD | ||
8 | 9 | ||
9 | config SND_HWDEP | 10 | config SND_HWDEP |
10 | tristate | 11 | tristate |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 29ab46a12e11..25b0641e6b8c 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -1918,13 +1918,13 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) | |||
1918 | 1918 | ||
1919 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, | 1919 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, |
1920 | hw->rate_min, hw->rate_max); | 1920 | hw->rate_min, hw->rate_max); |
1921 | if (err < 0) | 1921 | if (err < 0) |
1922 | return err; | 1922 | return err; |
1923 | 1923 | ||
1924 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, | 1924 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, |
1925 | hw->period_bytes_min, hw->period_bytes_max); | 1925 | hw->period_bytes_min, hw->period_bytes_max); |
1926 | if (err < 0) | 1926 | if (err < 0) |
1927 | return err; | 1927 | return err; |
1928 | 1928 | ||
1929 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, | 1929 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, |
1930 | hw->periods_min, hw->periods_max); | 1930 | hw->periods_min, hw->periods_max); |
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index ca8068b63d6c..b01d9481d632 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
23 | #include <linux/gcd.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/timer.h> | 26 | #include <sound/timer.h> |
@@ -28,22 +29,6 @@ | |||
28 | * Timer functions | 29 | * Timer functions |
29 | */ | 30 | */ |
30 | 31 | ||
31 | /* Greatest common divisor */ | ||
32 | static unsigned long gcd(unsigned long a, unsigned long b) | ||
33 | { | ||
34 | unsigned long r; | ||
35 | if (a < b) { | ||
36 | r = a; | ||
37 | a = b; | ||
38 | b = r; | ||
39 | } | ||
40 | while ((r = a % b) != 0) { | ||
41 | a = b; | ||
42 | b = r; | ||
43 | } | ||
44 | return b; | ||
45 | } | ||
46 | |||
47 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) | 32 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) |
48 | { | 33 | { |
49 | unsigned long rate, mult, fsize, l, post; | 34 | unsigned long rate, mult, fsize, l, post; |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 9cfdb771928c..950ee5cfcacf 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1086,11 +1086,6 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
1086 | if (err < 0) | 1086 | if (err < 0) |
1087 | return err; | 1087 | return err; |
1088 | } | 1088 | } |
1089 | /* audio codec should override the mixer name */ | ||
1090 | if (codec->afg || !*codec->bus->card->mixername) | ||
1091 | snprintf(codec->bus->card->mixername, | ||
1092 | sizeof(codec->bus->card->mixername), | ||
1093 | "%s %s", codec->vendor_name, codec->chip_name); | ||
1094 | 1089 | ||
1095 | if (is_generic_config(codec)) { | 1090 | if (is_generic_config(codec)) { |
1096 | err = snd_hda_parse_generic_codec(codec); | 1091 | err = snd_hda_parse_generic_codec(codec); |
@@ -1109,6 +1104,11 @@ int snd_hda_codec_configure(struct hda_codec *codec) | |||
1109 | patched: | 1104 | patched: |
1110 | if (!err && codec->patch_ops.unsol_event) | 1105 | if (!err && codec->patch_ops.unsol_event) |
1111 | err = init_unsol_queue(codec->bus); | 1106 | err = init_unsol_queue(codec->bus); |
1107 | /* audio codec should override the mixer name */ | ||
1108 | if (!err && (codec->afg || !*codec->bus->card->mixername)) | ||
1109 | snprintf(codec->bus->card->mixername, | ||
1110 | sizeof(codec->bus->card->mixername), | ||
1111 | "%s %s", codec->vendor_name, codec->chip_name); | ||
1112 | return err; | 1112 | return err; |
1113 | } | 1113 | } |
1114 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); | 1114 | EXPORT_SYMBOL_HDA(snd_hda_codec_configure); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9b56f937913e..ff8ad46cc50e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2322,6 +2322,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev) | |||
2322 | * white/black-list for enable_msi | 2322 | * white/black-list for enable_msi |
2323 | */ | 2323 | */ |
2324 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { | 2324 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { |
2325 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | ||
2325 | {} | 2326 | {} |
2326 | }; | 2327 | }; |
2327 | 2328 | ||
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 4b200da1bd18..fe0423c39598 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -66,6 +66,7 @@ struct cs_spec { | |||
66 | /* available models */ | 66 | /* available models */ |
67 | enum { | 67 | enum { |
68 | CS420X_MBP55, | 68 | CS420X_MBP55, |
69 | CS420X_IMAC27, | ||
69 | CS420X_AUTO, | 70 | CS420X_AUTO, |
70 | CS420X_MODELS | 71 | CS420X_MODELS |
71 | }; | 72 | }; |
@@ -827,7 +828,8 @@ static void cs_automute(struct hda_codec *codec) | |||
827 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 828 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
828 | hp_present ? 0 : PIN_OUT); | 829 | hp_present ? 0 : PIN_OUT); |
829 | } | 830 | } |
830 | if (spec->board_config == CS420X_MBP55) { | 831 | if (spec->board_config == CS420X_MBP55 || |
832 | spec->board_config == CS420X_IMAC27) { | ||
831 | unsigned int gpio = hp_present ? 0x02 : 0x08; | 833 | unsigned int gpio = hp_present ? 0x02 : 0x08; |
832 | snd_hda_codec_write(codec, 0x01, 0, | 834 | snd_hda_codec_write(codec, 0x01, 0, |
833 | AC_VERB_SET_GPIO_DATA, gpio); | 835 | AC_VERB_SET_GPIO_DATA, gpio); |
@@ -1069,12 +1071,14 @@ static int cs_parse_auto_config(struct hda_codec *codec) | |||
1069 | 1071 | ||
1070 | static const char *cs420x_models[CS420X_MODELS] = { | 1072 | static const char *cs420x_models[CS420X_MODELS] = { |
1071 | [CS420X_MBP55] = "mbp55", | 1073 | [CS420X_MBP55] = "mbp55", |
1074 | [CS420X_IMAC27] = "imac27", | ||
1072 | [CS420X_AUTO] = "auto", | 1075 | [CS420X_AUTO] = "auto", |
1073 | }; | 1076 | }; |
1074 | 1077 | ||
1075 | 1078 | ||
1076 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { | 1079 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { |
1077 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), | 1080 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), |
1081 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), | ||
1078 | {} /* terminator */ | 1082 | {} /* terminator */ |
1079 | }; | 1083 | }; |
1080 | 1084 | ||
@@ -1097,8 +1101,23 @@ static struct cs_pincfg mbp55_pincfgs[] = { | |||
1097 | {} /* terminator */ | 1101 | {} /* terminator */ |
1098 | }; | 1102 | }; |
1099 | 1103 | ||
1104 | static struct cs_pincfg imac27_pincfgs[] = { | ||
1105 | { 0x09, 0x012b4050 }, | ||
1106 | { 0x0a, 0x90100140 }, | ||
1107 | { 0x0b, 0x90100142 }, | ||
1108 | { 0x0c, 0x018b3020 }, | ||
1109 | { 0x0d, 0x90a00110 }, | ||
1110 | { 0x0e, 0x400000f0 }, | ||
1111 | { 0x0f, 0x01cbe030 }, | ||
1112 | { 0x10, 0x014be060 }, | ||
1113 | { 0x12, 0x01ab9070 }, | ||
1114 | { 0x15, 0x400000f0 }, | ||
1115 | {} /* terminator */ | ||
1116 | }; | ||
1117 | |||
1100 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { | 1118 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { |
1101 | [CS420X_MBP55] = mbp55_pincfgs, | 1119 | [CS420X_MBP55] = mbp55_pincfgs, |
1120 | [CS420X_IMAC27] = imac27_pincfgs, | ||
1102 | }; | 1121 | }; |
1103 | 1122 | ||
1104 | static void fix_pincfg(struct hda_codec *codec, int model) | 1123 | static void fix_pincfg(struct hda_codec *codec, int model) |
@@ -1128,6 +1147,7 @@ static int patch_cs420x(struct hda_codec *codec) | |||
1128 | fix_pincfg(codec, spec->board_config); | 1147 | fix_pincfg(codec, spec->board_config); |
1129 | 1148 | ||
1130 | switch (spec->board_config) { | 1149 | switch (spec->board_config) { |
1150 | case CS420X_IMAC27: | ||
1131 | case CS420X_MBP55: | 1151 | case CS420X_MBP55: |
1132 | /* GPIO1 = headphones */ | 1152 | /* GPIO1 = headphones */ |
1133 | /* GPIO3 = speakers */ | 1153 | /* GPIO3 = speakers */ |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index a09c03c3f62b..c578c28f368e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "hda_codec.h" | 30 | #include "hda_codec.h" |
31 | #include "hda_local.h" | 31 | #include "hda_local.h" |
32 | #include "hda_beep.h" | ||
32 | 33 | ||
33 | #define CXT_PIN_DIR_IN 0x00 | 34 | #define CXT_PIN_DIR_IN 0x00 |
34 | #define CXT_PIN_DIR_OUT 0x01 | 35 | #define CXT_PIN_DIR_OUT 0x01 |
@@ -111,6 +112,7 @@ struct conexant_spec { | |||
111 | unsigned int dell_automute; | 112 | unsigned int dell_automute; |
112 | unsigned int port_d_mode; | 113 | unsigned int port_d_mode; |
113 | unsigned char ext_mic_bias; | 114 | unsigned char ext_mic_bias; |
115 | unsigned int dell_vostro; | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, | 118 | static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo, |
@@ -476,6 +478,7 @@ static void conexant_free(struct hda_codec *codec) | |||
476 | snd_array_free(&spec->jacks); | 478 | snd_array_free(&spec->jacks); |
477 | } | 479 | } |
478 | #endif | 480 | #endif |
481 | snd_hda_detach_beep_device(codec); | ||
479 | kfree(codec->spec); | 482 | kfree(codec->spec); |
480 | } | 483 | } |
481 | 484 | ||
@@ -2109,9 +2112,12 @@ static int cxt5066_mic_boost_mux_enum_get(struct snd_kcontrol *kcontrol, | |||
2109 | { | 2112 | { |
2110 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 2113 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
2111 | int val; | 2114 | int val; |
2115 | hda_nid_t nid = kcontrol->private_value & 0xff; | ||
2116 | int inout = (kcontrol->private_value & 0x100) ? | ||
2117 | AC_AMP_GET_INPUT : AC_AMP_GET_OUTPUT; | ||
2112 | 2118 | ||
2113 | val = snd_hda_codec_read(codec, 0x17, 0, | 2119 | val = snd_hda_codec_read(codec, nid, 0, |
2114 | AC_VERB_GET_AMP_GAIN_MUTE, AC_AMP_GET_OUTPUT); | 2120 | AC_VERB_GET_AMP_GAIN_MUTE, inout); |
2115 | 2121 | ||
2116 | ucontrol->value.enumerated.item[0] = val & AC_AMP_GAIN; | 2122 | ucontrol->value.enumerated.item[0] = val & AC_AMP_GAIN; |
2117 | return 0; | 2123 | return 0; |
@@ -2123,6 +2129,9 @@ static int cxt5066_mic_boost_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
2123 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 2129 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
2124 | const struct hda_input_mux *imux = &cxt5066_analog_mic_boost; | 2130 | const struct hda_input_mux *imux = &cxt5066_analog_mic_boost; |
2125 | unsigned int idx; | 2131 | unsigned int idx; |
2132 | hda_nid_t nid = kcontrol->private_value & 0xff; | ||
2133 | int inout = (kcontrol->private_value & 0x100) ? | ||
2134 | AC_AMP_SET_INPUT : AC_AMP_SET_OUTPUT; | ||
2126 | 2135 | ||
2127 | if (!imux->num_items) | 2136 | if (!imux->num_items) |
2128 | return 0; | 2137 | return 0; |
@@ -2130,9 +2139,9 @@ static int cxt5066_mic_boost_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
2130 | if (idx >= imux->num_items) | 2139 | if (idx >= imux->num_items) |
2131 | idx = imux->num_items - 1; | 2140 | idx = imux->num_items - 1; |
2132 | 2141 | ||
2133 | snd_hda_codec_write_cache(codec, 0x17, 0, | 2142 | snd_hda_codec_write_cache(codec, nid, 0, |
2134 | AC_VERB_SET_AMP_GAIN_MUTE, | 2143 | AC_VERB_SET_AMP_GAIN_MUTE, |
2135 | AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | AC_AMP_SET_OUTPUT | | 2144 | AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | inout | |
2136 | imux->items[idx].index); | 2145 | imux->items[idx].index); |
2137 | 2146 | ||
2138 | return 1; | 2147 | return 1; |
@@ -2201,10 +2210,11 @@ static struct snd_kcontrol_new cxt5066_mixers[] = { | |||
2201 | 2210 | ||
2202 | { | 2211 | { |
2203 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2212 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2204 | .name = "Analog Mic Boost Capture Enum", | 2213 | .name = "Ext Mic Boost Capture Enum", |
2205 | .info = cxt5066_mic_boost_mux_enum_info, | 2214 | .info = cxt5066_mic_boost_mux_enum_info, |
2206 | .get = cxt5066_mic_boost_mux_enum_get, | 2215 | .get = cxt5066_mic_boost_mux_enum_get, |
2207 | .put = cxt5066_mic_boost_mux_enum_put, | 2216 | .put = cxt5066_mic_boost_mux_enum_put, |
2217 | .private_value = 0x17, | ||
2208 | }, | 2218 | }, |
2209 | 2219 | ||
2210 | HDA_BIND_VOL("Capture Volume", &cxt5066_bind_capture_vol_others), | 2220 | HDA_BIND_VOL("Capture Volume", &cxt5066_bind_capture_vol_others), |
@@ -2212,6 +2222,19 @@ static struct snd_kcontrol_new cxt5066_mixers[] = { | |||
2212 | {} | 2222 | {} |
2213 | }; | 2223 | }; |
2214 | 2224 | ||
2225 | static struct snd_kcontrol_new cxt5066_vostro_mixers[] = { | ||
2226 | { | ||
2227 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
2228 | .name = "Int Mic Boost Capture Enum", | ||
2229 | .info = cxt5066_mic_boost_mux_enum_info, | ||
2230 | .get = cxt5066_mic_boost_mux_enum_get, | ||
2231 | .put = cxt5066_mic_boost_mux_enum_put, | ||
2232 | .private_value = 0x23 | 0x100, | ||
2233 | }, | ||
2234 | HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT), | ||
2235 | {} | ||
2236 | }; | ||
2237 | |||
2215 | static struct hda_verb cxt5066_init_verbs[] = { | 2238 | static struct hda_verb cxt5066_init_verbs[] = { |
2216 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */ | 2239 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port B */ |
2217 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */ | 2240 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, /* Port C */ |
@@ -2397,11 +2420,16 @@ static struct hda_verb cxt5066_init_verbs_portd_lo[] = { | |||
2397 | /* initialize jack-sensing, too */ | 2420 | /* initialize jack-sensing, too */ |
2398 | static int cxt5066_init(struct hda_codec *codec) | 2421 | static int cxt5066_init(struct hda_codec *codec) |
2399 | { | 2422 | { |
2423 | struct conexant_spec *spec = codec->spec; | ||
2424 | |||
2400 | snd_printdd("CXT5066: init\n"); | 2425 | snd_printdd("CXT5066: init\n"); |
2401 | conexant_init(codec); | 2426 | conexant_init(codec); |
2402 | if (codec->patch_ops.unsol_event) { | 2427 | if (codec->patch_ops.unsol_event) { |
2403 | cxt5066_hp_automute(codec); | 2428 | cxt5066_hp_automute(codec); |
2404 | cxt5066_automic(codec); | 2429 | if (spec->dell_vostro) |
2430 | cxt5066_vostro_automic(codec); | ||
2431 | else | ||
2432 | cxt5066_automic(codec); | ||
2405 | } | 2433 | } |
2406 | return 0; | 2434 | return 0; |
2407 | } | 2435 | } |
@@ -2500,7 +2528,10 @@ static int patch_cxt5066(struct hda_codec *codec) | |||
2500 | spec->init_verbs[0] = cxt5066_init_verbs_vostro; | 2528 | spec->init_verbs[0] = cxt5066_init_verbs_vostro; |
2501 | spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; | 2529 | spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc; |
2502 | spec->mixers[spec->num_mixers++] = cxt5066_mixers; | 2530 | spec->mixers[spec->num_mixers++] = cxt5066_mixers; |
2531 | spec->mixers[spec->num_mixers++] = cxt5066_vostro_mixers; | ||
2503 | spec->port_d_mode = 0; | 2532 | spec->port_d_mode = 0; |
2533 | spec->dell_vostro = 1; | ||
2534 | snd_hda_attach_beep_device(codec, 0x13); | ||
2504 | 2535 | ||
2505 | /* no S/PDIF out */ | 2536 | /* no S/PDIF out */ |
2506 | spec->multiout.dig_out_nid = 0; | 2537 | spec->multiout.dig_out_nid = 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 20c1828e4bac..c7465053d6bb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -131,8 +131,8 @@ enum { | |||
131 | enum { | 131 | enum { |
132 | ALC269_BASIC, | 132 | ALC269_BASIC, |
133 | ALC269_QUANTA_FL1, | 133 | ALC269_QUANTA_FL1, |
134 | ALC269_ASUS_EEEPC_P703, | 134 | ALC269_ASUS_AMIC, |
135 | ALC269_ASUS_EEEPC_P901, | 135 | ALC269_ASUS_DMIC, |
136 | ALC269_FUJITSU, | 136 | ALC269_FUJITSU, |
137 | ALC269_LIFEBOOK, | 137 | ALC269_LIFEBOOK, |
138 | ALC269_AUTO, | 138 | ALC269_AUTO, |
@@ -188,6 +188,8 @@ enum { | |||
188 | ALC663_ASUS_MODE4, | 188 | ALC663_ASUS_MODE4, |
189 | ALC663_ASUS_MODE5, | 189 | ALC663_ASUS_MODE5, |
190 | ALC663_ASUS_MODE6, | 190 | ALC663_ASUS_MODE6, |
191 | ALC663_ASUS_MODE7, | ||
192 | ALC663_ASUS_MODE8, | ||
191 | ALC272_DELL, | 193 | ALC272_DELL, |
192 | ALC272_DELL_ZM1, | 194 | ALC272_DELL_ZM1, |
193 | ALC272_SAMSUNG_NC10, | 195 | ALC272_SAMSUNG_NC10, |
@@ -335,6 +337,9 @@ struct alc_spec { | |||
335 | /* hooks */ | 337 | /* hooks */ |
336 | void (*init_hook)(struct hda_codec *codec); | 338 | void (*init_hook)(struct hda_codec *codec); |
337 | void (*unsol_event)(struct hda_codec *codec, unsigned int res); | 339 | void (*unsol_event)(struct hda_codec *codec, unsigned int res); |
340 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
341 | void (*power_hook)(struct hda_codec *codec, int power); | ||
342 | #endif | ||
338 | 343 | ||
339 | /* for pin sensing */ | 344 | /* for pin sensing */ |
340 | unsigned int sense_updated: 1; | 345 | unsigned int sense_updated: 1; |
@@ -386,6 +391,7 @@ struct alc_config_preset { | |||
386 | void (*init_hook)(struct hda_codec *); | 391 | void (*init_hook)(struct hda_codec *); |
387 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 392 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
388 | struct hda_amp_list *loopbacks; | 393 | struct hda_amp_list *loopbacks; |
394 | void (*power_hook)(struct hda_codec *codec, int power); | ||
389 | #endif | 395 | #endif |
390 | }; | 396 | }; |
391 | 397 | ||
@@ -898,6 +904,7 @@ static void setup_preset(struct hda_codec *codec, | |||
898 | spec->unsol_event = preset->unsol_event; | 904 | spec->unsol_event = preset->unsol_event; |
899 | spec->init_hook = preset->init_hook; | 905 | spec->init_hook = preset->init_hook; |
900 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 906 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
907 | spec->power_hook = preset->power_hook; | ||
901 | spec->loopback.amplist = preset->loopbacks; | 908 | spec->loopback.amplist = preset->loopbacks; |
902 | #endif | 909 | #endif |
903 | 910 | ||
@@ -1663,9 +1670,6 @@ static struct hda_verb alc889_acer_aspire_8930g_verbs[] = { | |||
1663 | /* some bit here disables the other DACs. Init=0x4900 */ | 1670 | /* some bit here disables the other DACs. Init=0x4900 */ |
1664 | {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, | 1671 | {0x20, AC_VERB_SET_COEF_INDEX, 0x08}, |
1665 | {0x20, AC_VERB_SET_PROC_COEF, 0x0000}, | 1672 | {0x20, AC_VERB_SET_PROC_COEF, 0x0000}, |
1666 | /* Enable amplifiers */ | ||
1667 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, | ||
1668 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, | ||
1669 | /* DMIC fix | 1673 | /* DMIC fix |
1670 | * This laptop has a stereo digital microphone. The mics are only 1cm apart | 1674 | * This laptop has a stereo digital microphone. The mics are only 1cm apart |
1671 | * which makes the stereo useless. However, either the mic or the ALC889 | 1675 | * which makes the stereo useless. However, either the mic or the ALC889 |
@@ -1778,6 +1782,25 @@ static struct snd_kcontrol_new alc888_base_mixer[] = { | |||
1778 | { } /* end */ | 1782 | { } /* end */ |
1779 | }; | 1783 | }; |
1780 | 1784 | ||
1785 | static struct snd_kcontrol_new alc889_acer_aspire_8930g_mixer[] = { | ||
1786 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
1787 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
1788 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | ||
1789 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | ||
1790 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, | ||
1791 | HDA_OUTPUT), | ||
1792 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | ||
1793 | HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | ||
1794 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | ||
1795 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
1796 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
1797 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
1798 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | ||
1799 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
1800 | { } /* end */ | ||
1801 | }; | ||
1802 | |||
1803 | |||
1781 | static void alc888_acer_aspire_4930g_setup(struct hda_codec *codec) | 1804 | static void alc888_acer_aspire_4930g_setup(struct hda_codec *codec) |
1782 | { | 1805 | { |
1783 | struct alc_spec *spec = codec->spec; | 1806 | struct alc_spec *spec = codec->spec; |
@@ -1808,6 +1831,16 @@ static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec) | |||
1808 | spec->autocfg.speaker_pins[2] = 0x1b; | 1831 | spec->autocfg.speaker_pins[2] = 0x1b; |
1809 | } | 1832 | } |
1810 | 1833 | ||
1834 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
1835 | static void alc889_power_eapd(struct hda_codec *codec, int power) | ||
1836 | { | ||
1837 | snd_hda_codec_write(codec, 0x14, 0, | ||
1838 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | ||
1839 | snd_hda_codec_write(codec, 0x15, 0, | ||
1840 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | ||
1841 | } | ||
1842 | #endif | ||
1843 | |||
1811 | /* | 1844 | /* |
1812 | * ALC880 3-stack model | 1845 | * ALC880 3-stack model |
1813 | * | 1846 | * |
@@ -3601,12 +3634,29 @@ static void alc_free(struct hda_codec *codec) | |||
3601 | snd_hda_detach_beep_device(codec); | 3634 | snd_hda_detach_beep_device(codec); |
3602 | } | 3635 | } |
3603 | 3636 | ||
3637 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
3638 | static int alc_suspend(struct hda_codec *codec, pm_message_t state) | ||
3639 | { | ||
3640 | struct alc_spec *spec = codec->spec; | ||
3641 | if (spec && spec->power_hook) | ||
3642 | spec->power_hook(codec, 0); | ||
3643 | return 0; | ||
3644 | } | ||
3645 | #endif | ||
3646 | |||
3604 | #ifdef SND_HDA_NEEDS_RESUME | 3647 | #ifdef SND_HDA_NEEDS_RESUME |
3605 | static int alc_resume(struct hda_codec *codec) | 3648 | static int alc_resume(struct hda_codec *codec) |
3606 | { | 3649 | { |
3650 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
3651 | struct alc_spec *spec = codec->spec; | ||
3652 | #endif | ||
3607 | codec->patch_ops.init(codec); | 3653 | codec->patch_ops.init(codec); |
3608 | snd_hda_codec_resume_amp(codec); | 3654 | snd_hda_codec_resume_amp(codec); |
3609 | snd_hda_codec_resume_cache(codec); | 3655 | snd_hda_codec_resume_cache(codec); |
3656 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
3657 | if (spec && spec->power_hook) | ||
3658 | spec->power_hook(codec, 1); | ||
3659 | #endif | ||
3610 | return 0; | 3660 | return 0; |
3611 | } | 3661 | } |
3612 | #endif | 3662 | #endif |
@@ -3623,6 +3673,7 @@ static struct hda_codec_ops alc_patch_ops = { | |||
3623 | .resume = alc_resume, | 3673 | .resume = alc_resume, |
3624 | #endif | 3674 | #endif |
3625 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 3675 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
3676 | .suspend = alc_suspend, | ||
3626 | .check_power_status = alc_check_power_status, | 3677 | .check_power_status = alc_check_power_status, |
3627 | #endif | 3678 | #endif |
3628 | }; | 3679 | }; |
@@ -8919,7 +8970,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
8919 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), | 8970 | SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), |
8920 | SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), | 8971 | SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), |
8921 | SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ | 8972 | SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ |
8922 | SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC883_TARGA_2ch_DIG), | 8973 | SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO), |
8923 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), | 8974 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), |
8924 | SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG), | 8975 | SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG), |
8925 | SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG), | 8976 | SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG), |
@@ -9282,6 +9333,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
9282 | .dac_nids = alc883_dac_nids, | 9333 | .dac_nids = alc883_dac_nids, |
9283 | .adc_nids = alc883_adc_nids_alt, | 9334 | .adc_nids = alc883_adc_nids_alt, |
9284 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), | 9335 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), |
9336 | .capsrc_nids = alc883_capsrc_nids, | ||
9285 | .dig_out_nid = ALC883_DIGOUT_NID, | 9337 | .dig_out_nid = ALC883_DIGOUT_NID, |
9286 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | 9338 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), |
9287 | .channel_mode = alc883_3ST_2ch_modes, | 9339 | .channel_mode = alc883_3ST_2ch_modes, |
@@ -9378,10 +9430,11 @@ static struct alc_config_preset alc882_presets[] = { | |||
9378 | .init_hook = alc_automute_amp, | 9430 | .init_hook = alc_automute_amp, |
9379 | }, | 9431 | }, |
9380 | [ALC888_ACER_ASPIRE_8930G] = { | 9432 | [ALC888_ACER_ASPIRE_8930G] = { |
9381 | .mixers = { alc888_base_mixer, | 9433 | .mixers = { alc889_acer_aspire_8930g_mixer, |
9382 | alc883_chmode_mixer }, | 9434 | alc883_chmode_mixer }, |
9383 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, | 9435 | .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, |
9384 | alc889_acer_aspire_8930g_verbs }, | 9436 | alc889_acer_aspire_8930g_verbs, |
9437 | alc889_eapd_verbs}, | ||
9385 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 9438 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
9386 | .dac_nids = alc883_dac_nids, | 9439 | .dac_nids = alc883_dac_nids, |
9387 | .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), | 9440 | .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), |
@@ -9398,6 +9451,9 @@ static struct alc_config_preset alc882_presets[] = { | |||
9398 | .unsol_event = alc_automute_amp_unsol_event, | 9451 | .unsol_event = alc_automute_amp_unsol_event, |
9399 | .setup = alc889_acer_aspire_8930g_setup, | 9452 | .setup = alc889_acer_aspire_8930g_setup, |
9400 | .init_hook = alc_automute_amp, | 9453 | .init_hook = alc_automute_amp, |
9454 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
9455 | .power_hook = alc889_power_eapd, | ||
9456 | #endif | ||
9401 | }, | 9457 | }, |
9402 | [ALC888_ACER_ASPIRE_7730G] = { | 9458 | [ALC888_ACER_ASPIRE_7730G] = { |
9403 | .mixers = { alc883_3ST_6ch_mixer, | 9459 | .mixers = { alc883_3ST_6ch_mixer, |
@@ -9428,6 +9484,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
9428 | .dac_nids = alc883_dac_nids, | 9484 | .dac_nids = alc883_dac_nids, |
9429 | .adc_nids = alc883_adc_nids_alt, | 9485 | .adc_nids = alc883_adc_nids_alt, |
9430 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), | 9486 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), |
9487 | .capsrc_nids = alc883_capsrc_nids, | ||
9431 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), | 9488 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), |
9432 | .channel_mode = alc883_sixstack_modes, | 9489 | .channel_mode = alc883_sixstack_modes, |
9433 | .input_mux = &alc883_capture_source, | 9490 | .input_mux = &alc883_capture_source, |
@@ -9489,6 +9546,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
9489 | .dac_nids = alc883_dac_nids, | 9546 | .dac_nids = alc883_dac_nids, |
9490 | .adc_nids = alc883_adc_nids_alt, | 9547 | .adc_nids = alc883_adc_nids_alt, |
9491 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), | 9548 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt), |
9549 | .capsrc_nids = alc883_capsrc_nids, | ||
9492 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | 9550 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), |
9493 | .channel_mode = alc883_3ST_2ch_modes, | 9551 | .channel_mode = alc883_3ST_2ch_modes, |
9494 | .input_mux = &alc883_lenovo_101e_capture_source, | 9552 | .input_mux = &alc883_lenovo_101e_capture_source, |
@@ -9668,6 +9726,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
9668 | alc880_gpio1_init_verbs }, | 9726 | alc880_gpio1_init_verbs }, |
9669 | .adc_nids = alc883_adc_nids, | 9727 | .adc_nids = alc883_adc_nids, |
9670 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | 9728 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), |
9729 | .capsrc_nids = alc883_capsrc_nids, | ||
9671 | .dac_nids = alc883_dac_nids, | 9730 | .dac_nids = alc883_dac_nids, |
9672 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 9731 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
9673 | .channel_mode = alc889A_mb31_6ch_modes, | 9732 | .channel_mode = alc889A_mb31_6ch_modes, |
@@ -10678,6 +10737,13 @@ static struct hda_verb alc262_lenovo_3000_unsol_verbs[] = { | |||
10678 | {} | 10737 | {} |
10679 | }; | 10738 | }; |
10680 | 10739 | ||
10740 | static struct hda_verb alc262_lenovo_3000_init_verbs[] = { | ||
10741 | /* Front Mic pin: input vref at 50% */ | ||
10742 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
10743 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
10744 | {} | ||
10745 | }; | ||
10746 | |||
10681 | static struct hda_input_mux alc262_fujitsu_capture_source = { | 10747 | static struct hda_input_mux alc262_fujitsu_capture_source = { |
10682 | .num_items = 3, | 10748 | .num_items = 3, |
10683 | .items = { | 10749 | .items = { |
@@ -11720,7 +11786,8 @@ static struct alc_config_preset alc262_presets[] = { | |||
11720 | [ALC262_LENOVO_3000] = { | 11786 | [ALC262_LENOVO_3000] = { |
11721 | .mixers = { alc262_lenovo_3000_mixer }, | 11787 | .mixers = { alc262_lenovo_3000_mixer }, |
11722 | .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs, | 11788 | .init_verbs = { alc262_init_verbs, alc262_EAPD_verbs, |
11723 | alc262_lenovo_3000_unsol_verbs }, | 11789 | alc262_lenovo_3000_unsol_verbs, |
11790 | alc262_lenovo_3000_init_verbs }, | ||
11724 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | 11791 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), |
11725 | .dac_nids = alc262_dac_nids, | 11792 | .dac_nids = alc262_dac_nids, |
11726 | .hp_nid = 0x03, | 11793 | .hp_nid = 0x03, |
@@ -13232,10 +13299,12 @@ static struct hda_verb alc269_eeepc_amic_init_verbs[] = { | |||
13232 | /* toggle speaker-output according to the hp-jack state */ | 13299 | /* toggle speaker-output according to the hp-jack state */ |
13233 | static void alc269_speaker_automute(struct hda_codec *codec) | 13300 | static void alc269_speaker_automute(struct hda_codec *codec) |
13234 | { | 13301 | { |
13302 | struct alc_spec *spec = codec->spec; | ||
13303 | unsigned int nid = spec->autocfg.hp_pins[0]; | ||
13235 | unsigned int present; | 13304 | unsigned int present; |
13236 | unsigned char bits; | 13305 | unsigned char bits; |
13237 | 13306 | ||
13238 | present = snd_hda_jack_detect(codec, 0x15); | 13307 | present = snd_hda_jack_detect(codec, nid); |
13239 | bits = present ? AMP_IN_MUTE(0) : 0; | 13308 | bits = present ? AMP_IN_MUTE(0) : 0; |
13240 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13309 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13241 | AMP_IN_MUTE(0), bits); | 13310 | AMP_IN_MUTE(0), bits); |
@@ -13460,8 +13529,8 @@ static void alc269_auto_init(struct hda_codec *codec) | |||
13460 | static const char *alc269_models[ALC269_MODEL_LAST] = { | 13529 | static const char *alc269_models[ALC269_MODEL_LAST] = { |
13461 | [ALC269_BASIC] = "basic", | 13530 | [ALC269_BASIC] = "basic", |
13462 | [ALC269_QUANTA_FL1] = "quanta", | 13531 | [ALC269_QUANTA_FL1] = "quanta", |
13463 | [ALC269_ASUS_EEEPC_P703] = "eeepc-p703", | 13532 | [ALC269_ASUS_AMIC] = "asus-amic", |
13464 | [ALC269_ASUS_EEEPC_P901] = "eeepc-p901", | 13533 | [ALC269_ASUS_DMIC] = "asus-dmic", |
13465 | [ALC269_FUJITSU] = "fujitsu", | 13534 | [ALC269_FUJITSU] = "fujitsu", |
13466 | [ALC269_LIFEBOOK] = "lifebook", | 13535 | [ALC269_LIFEBOOK] = "lifebook", |
13467 | [ALC269_AUTO] = "auto", | 13536 | [ALC269_AUTO] = "auto", |
@@ -13470,18 +13539,41 @@ static const char *alc269_models[ALC269_MODEL_LAST] = { | |||
13470 | static struct snd_pci_quirk alc269_cfg_tbl[] = { | 13539 | static struct snd_pci_quirk alc269_cfg_tbl[] = { |
13471 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_QUANTA_FL1), | 13540 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_QUANTA_FL1), |
13472 | SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", | 13541 | SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", |
13473 | ALC269_ASUS_EEEPC_P703), | 13542 | ALC269_ASUS_AMIC), |
13474 | SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_ASUS_EEEPC_P703), | 13543 | SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_ASUS_AMIC), |
13475 | SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_ASUS_EEEPC_P703), | 13544 | SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80JT", ALC269_ASUS_AMIC), |
13476 | SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_ASUS_EEEPC_P703), | 13545 | SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_ASUS_AMIC), |
13477 | SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_ASUS_EEEPC_P703), | 13546 | SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82Jv", ALC269_ASUS_AMIC), |
13478 | SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_ASUS_EEEPC_P703), | 13547 | SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_ASUS_AMIC), |
13479 | SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_ASUS_EEEPC_P703), | 13548 | SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_ASUS_AMIC), |
13549 | SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_ASUS_AMIC), | ||
13550 | SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_ASUS_AMIC), | ||
13551 | SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_ASUS_AMIC), | ||
13552 | SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_ASUS_AMIC), | ||
13553 | SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_ASUS_AMIC), | ||
13554 | SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_ASUS_AMIC), | ||
13555 | SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_ASUS_AMIC), | ||
13556 | SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_ASUS_AMIC), | ||
13557 | SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_ASUS_AMIC), | ||
13558 | SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_ASUS_AMIC), | ||
13559 | SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_ASUS_AMIC), | ||
13560 | SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_ASUS_AMIC), | ||
13561 | SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_ASUS_AMIC), | ||
13562 | SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_ASUS_AMIC), | ||
13563 | SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_ASUS_AMIC), | ||
13564 | SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_ASUS_AMIC), | ||
13565 | SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_ASUS_AMIC), | ||
13566 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ASUS_DMIC), | ||
13567 | SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_ASUS_AMIC), | ||
13568 | SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_ASUS_AMIC), | ||
13569 | SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_ASUS_AMIC), | ||
13570 | SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_ASUS_AMIC), | ||
13480 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS Eeepc P901", | 13571 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS Eeepc P901", |
13481 | ALC269_ASUS_EEEPC_P901), | 13572 | ALC269_ASUS_DMIC), |
13482 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS Eeepc S101", | 13573 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS Eeepc S101", |
13483 | ALC269_ASUS_EEEPC_P901), | 13574 | ALC269_ASUS_DMIC), |
13484 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ASUS_EEEPC_P901), | 13575 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_ASUS_DMIC), |
13576 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_ASUS_DMIC), | ||
13485 | SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU), | 13577 | SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU), |
13486 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK), | 13578 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK), |
13487 | {} | 13579 | {} |
@@ -13511,7 +13603,7 @@ static struct alc_config_preset alc269_presets[] = { | |||
13511 | .setup = alc269_quanta_fl1_setup, | 13603 | .setup = alc269_quanta_fl1_setup, |
13512 | .init_hook = alc269_quanta_fl1_init_hook, | 13604 | .init_hook = alc269_quanta_fl1_init_hook, |
13513 | }, | 13605 | }, |
13514 | [ALC269_ASUS_EEEPC_P703] = { | 13606 | [ALC269_ASUS_AMIC] = { |
13515 | .mixers = { alc269_eeepc_mixer }, | 13607 | .mixers = { alc269_eeepc_mixer }, |
13516 | .cap_mixer = alc269_epc_capture_mixer, | 13608 | .cap_mixer = alc269_epc_capture_mixer, |
13517 | .init_verbs = { alc269_init_verbs, | 13609 | .init_verbs = { alc269_init_verbs, |
@@ -13525,7 +13617,7 @@ static struct alc_config_preset alc269_presets[] = { | |||
13525 | .setup = alc269_eeepc_amic_setup, | 13617 | .setup = alc269_eeepc_amic_setup, |
13526 | .init_hook = alc269_eeepc_inithook, | 13618 | .init_hook = alc269_eeepc_inithook, |
13527 | }, | 13619 | }, |
13528 | [ALC269_ASUS_EEEPC_P901] = { | 13620 | [ALC269_ASUS_DMIC] = { |
13529 | .mixers = { alc269_eeepc_mixer }, | 13621 | .mixers = { alc269_eeepc_mixer }, |
13530 | .cap_mixer = alc269_epc_capture_mixer, | 13622 | .cap_mixer = alc269_epc_capture_mixer, |
13531 | .init_verbs = { alc269_init_verbs, | 13623 | .init_verbs = { alc269_init_verbs, |
@@ -16160,6 +16252,52 @@ static struct snd_kcontrol_new alc663_g50v_mixer[] = { | |||
16160 | { } /* end */ | 16252 | { } /* end */ |
16161 | }; | 16253 | }; |
16162 | 16254 | ||
16255 | static struct hda_bind_ctls alc663_asus_mode7_8_all_bind_switch = { | ||
16256 | .ops = &snd_hda_bind_sw, | ||
16257 | .values = { | ||
16258 | HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | ||
16259 | HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT), | ||
16260 | HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT), | ||
16261 | HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT), | ||
16262 | HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT), | ||
16263 | 0 | ||
16264 | }, | ||
16265 | }; | ||
16266 | |||
16267 | static struct hda_bind_ctls alc663_asus_mode7_8_sp_bind_switch = { | ||
16268 | .ops = &snd_hda_bind_sw, | ||
16269 | .values = { | ||
16270 | HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | ||
16271 | HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT), | ||
16272 | 0 | ||
16273 | }, | ||
16274 | }; | ||
16275 | |||
16276 | static struct snd_kcontrol_new alc663_mode7_mixer[] = { | ||
16277 | HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch), | ||
16278 | HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol), | ||
16279 | HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch), | ||
16280 | HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
16281 | HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT), | ||
16282 | HDA_CODEC_VOLUME("IntMic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
16283 | HDA_CODEC_MUTE("IntMic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
16284 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
16285 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
16286 | { } /* end */ | ||
16287 | }; | ||
16288 | |||
16289 | static struct snd_kcontrol_new alc663_mode8_mixer[] = { | ||
16290 | HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch), | ||
16291 | HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol), | ||
16292 | HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch), | ||
16293 | HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
16294 | HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT), | ||
16295 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
16296 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
16297 | { } /* end */ | ||
16298 | }; | ||
16299 | |||
16300 | |||
16163 | static struct snd_kcontrol_new alc662_chmode_mixer[] = { | 16301 | static struct snd_kcontrol_new alc662_chmode_mixer[] = { |
16164 | { | 16302 | { |
16165 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 16303 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -16447,6 +16585,45 @@ static struct hda_verb alc272_dell_init_verbs[] = { | |||
16447 | {} | 16585 | {} |
16448 | }; | 16586 | }; |
16449 | 16587 | ||
16588 | static struct hda_verb alc663_mode7_init_verbs[] = { | ||
16589 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
16590 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
16591 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
16592 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16593 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
16594 | {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16595 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
16596 | {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
16597 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16598 | {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */ | ||
16599 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
16600 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)}, | ||
16601 | {0x19, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT}, | ||
16602 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
16603 | {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
16604 | {} | ||
16605 | }; | ||
16606 | |||
16607 | static struct hda_verb alc663_mode8_init_verbs[] = { | ||
16608 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
16609 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
16610 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16611 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | ||
16612 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
16613 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
16614 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16615 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
16616 | {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
16617 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
16618 | {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */ | ||
16619 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
16620 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)}, | ||
16621 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
16622 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT}, | ||
16623 | {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
16624 | {} | ||
16625 | }; | ||
16626 | |||
16450 | static struct snd_kcontrol_new alc662_auto_capture_mixer[] = { | 16627 | static struct snd_kcontrol_new alc662_auto_capture_mixer[] = { |
16451 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), | 16628 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), |
16452 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), | 16629 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), |
@@ -16626,6 +16803,54 @@ static void alc663_two_hp_m2_speaker_automute(struct hda_codec *codec) | |||
16626 | } | 16803 | } |
16627 | } | 16804 | } |
16628 | 16805 | ||
16806 | static void alc663_two_hp_m7_speaker_automute(struct hda_codec *codec) | ||
16807 | { | ||
16808 | unsigned int present1, present2; | ||
16809 | |||
16810 | present1 = snd_hda_codec_read(codec, 0x1b, 0, | ||
16811 | AC_VERB_GET_PIN_SENSE, 0) | ||
16812 | & AC_PINSENSE_PRESENCE; | ||
16813 | present2 = snd_hda_codec_read(codec, 0x21, 0, | ||
16814 | AC_VERB_GET_PIN_SENSE, 0) | ||
16815 | & AC_PINSENSE_PRESENCE; | ||
16816 | |||
16817 | if (present1 || present2) { | ||
16818 | snd_hda_codec_write_cache(codec, 0x14, 0, | ||
16819 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | ||
16820 | snd_hda_codec_write_cache(codec, 0x17, 0, | ||
16821 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | ||
16822 | } else { | ||
16823 | snd_hda_codec_write_cache(codec, 0x14, 0, | ||
16824 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); | ||
16825 | snd_hda_codec_write_cache(codec, 0x17, 0, | ||
16826 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); | ||
16827 | } | ||
16828 | } | ||
16829 | |||
16830 | static void alc663_two_hp_m8_speaker_automute(struct hda_codec *codec) | ||
16831 | { | ||
16832 | unsigned int present1, present2; | ||
16833 | |||
16834 | present1 = snd_hda_codec_read(codec, 0x21, 0, | ||
16835 | AC_VERB_GET_PIN_SENSE, 0) | ||
16836 | & AC_PINSENSE_PRESENCE; | ||
16837 | present2 = snd_hda_codec_read(codec, 0x15, 0, | ||
16838 | AC_VERB_GET_PIN_SENSE, 0) | ||
16839 | & AC_PINSENSE_PRESENCE; | ||
16840 | |||
16841 | if (present1 || present2) { | ||
16842 | snd_hda_codec_write_cache(codec, 0x14, 0, | ||
16843 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | ||
16844 | snd_hda_codec_write_cache(codec, 0x17, 0, | ||
16845 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | ||
16846 | } else { | ||
16847 | snd_hda_codec_write_cache(codec, 0x14, 0, | ||
16848 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); | ||
16849 | snd_hda_codec_write_cache(codec, 0x17, 0, | ||
16850 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); | ||
16851 | } | ||
16852 | } | ||
16853 | |||
16629 | static void alc663_m51va_unsol_event(struct hda_codec *codec, | 16854 | static void alc663_m51va_unsol_event(struct hda_codec *codec, |
16630 | unsigned int res) | 16855 | unsigned int res) |
16631 | { | 16856 | { |
@@ -16645,7 +16870,7 @@ static void alc663_m51va_setup(struct hda_codec *codec) | |||
16645 | spec->ext_mic.pin = 0x18; | 16870 | spec->ext_mic.pin = 0x18; |
16646 | spec->ext_mic.mux_idx = 0; | 16871 | spec->ext_mic.mux_idx = 0; |
16647 | spec->int_mic.pin = 0x12; | 16872 | spec->int_mic.pin = 0x12; |
16648 | spec->int_mic.mux_idx = 1; | 16873 | spec->int_mic.mux_idx = 9; |
16649 | spec->auto_mic = 1; | 16874 | spec->auto_mic = 1; |
16650 | } | 16875 | } |
16651 | 16876 | ||
@@ -16657,7 +16882,17 @@ static void alc663_m51va_inithook(struct hda_codec *codec) | |||
16657 | 16882 | ||
16658 | /* ***************** Mode1 ******************************/ | 16883 | /* ***************** Mode1 ******************************/ |
16659 | #define alc663_mode1_unsol_event alc663_m51va_unsol_event | 16884 | #define alc663_mode1_unsol_event alc663_m51va_unsol_event |
16660 | #define alc663_mode1_setup alc663_m51va_setup | 16885 | |
16886 | static void alc663_mode1_setup(struct hda_codec *codec) | ||
16887 | { | ||
16888 | struct alc_spec *spec = codec->spec; | ||
16889 | spec->ext_mic.pin = 0x18; | ||
16890 | spec->ext_mic.mux_idx = 0; | ||
16891 | spec->int_mic.pin = 0x19; | ||
16892 | spec->int_mic.mux_idx = 1; | ||
16893 | spec->auto_mic = 1; | ||
16894 | } | ||
16895 | |||
16661 | #define alc663_mode1_inithook alc663_m51va_inithook | 16896 | #define alc663_mode1_inithook alc663_m51va_inithook |
16662 | 16897 | ||
16663 | /* ***************** Mode2 ******************************/ | 16898 | /* ***************** Mode2 ******************************/ |
@@ -16674,7 +16909,7 @@ static void alc662_mode2_unsol_event(struct hda_codec *codec, | |||
16674 | } | 16909 | } |
16675 | } | 16910 | } |
16676 | 16911 | ||
16677 | #define alc662_mode2_setup alc663_m51va_setup | 16912 | #define alc662_mode2_setup alc663_mode1_setup |
16678 | 16913 | ||
16679 | static void alc662_mode2_inithook(struct hda_codec *codec) | 16914 | static void alc662_mode2_inithook(struct hda_codec *codec) |
16680 | { | 16915 | { |
@@ -16695,7 +16930,7 @@ static void alc663_mode3_unsol_event(struct hda_codec *codec, | |||
16695 | } | 16930 | } |
16696 | } | 16931 | } |
16697 | 16932 | ||
16698 | #define alc663_mode3_setup alc663_m51va_setup | 16933 | #define alc663_mode3_setup alc663_mode1_setup |
16699 | 16934 | ||
16700 | static void alc663_mode3_inithook(struct hda_codec *codec) | 16935 | static void alc663_mode3_inithook(struct hda_codec *codec) |
16701 | { | 16936 | { |
@@ -16716,7 +16951,7 @@ static void alc663_mode4_unsol_event(struct hda_codec *codec, | |||
16716 | } | 16951 | } |
16717 | } | 16952 | } |
16718 | 16953 | ||
16719 | #define alc663_mode4_setup alc663_m51va_setup | 16954 | #define alc663_mode4_setup alc663_mode1_setup |
16720 | 16955 | ||
16721 | static void alc663_mode4_inithook(struct hda_codec *codec) | 16956 | static void alc663_mode4_inithook(struct hda_codec *codec) |
16722 | { | 16957 | { |
@@ -16737,7 +16972,7 @@ static void alc663_mode5_unsol_event(struct hda_codec *codec, | |||
16737 | } | 16972 | } |
16738 | } | 16973 | } |
16739 | 16974 | ||
16740 | #define alc663_mode5_setup alc663_m51va_setup | 16975 | #define alc663_mode5_setup alc663_mode1_setup |
16741 | 16976 | ||
16742 | static void alc663_mode5_inithook(struct hda_codec *codec) | 16977 | static void alc663_mode5_inithook(struct hda_codec *codec) |
16743 | { | 16978 | { |
@@ -16758,7 +16993,7 @@ static void alc663_mode6_unsol_event(struct hda_codec *codec, | |||
16758 | } | 16993 | } |
16759 | } | 16994 | } |
16760 | 16995 | ||
16761 | #define alc663_mode6_setup alc663_m51va_setup | 16996 | #define alc663_mode6_setup alc663_mode1_setup |
16762 | 16997 | ||
16763 | static void alc663_mode6_inithook(struct hda_codec *codec) | 16998 | static void alc663_mode6_inithook(struct hda_codec *codec) |
16764 | { | 16999 | { |
@@ -16766,6 +17001,50 @@ static void alc663_mode6_inithook(struct hda_codec *codec) | |||
16766 | alc_mic_automute(codec); | 17001 | alc_mic_automute(codec); |
16767 | } | 17002 | } |
16768 | 17003 | ||
17004 | /* ***************** Mode7 ******************************/ | ||
17005 | static void alc663_mode7_unsol_event(struct hda_codec *codec, | ||
17006 | unsigned int res) | ||
17007 | { | ||
17008 | switch (res >> 26) { | ||
17009 | case ALC880_HP_EVENT: | ||
17010 | alc663_two_hp_m7_speaker_automute(codec); | ||
17011 | break; | ||
17012 | case ALC880_MIC_EVENT: | ||
17013 | alc_mic_automute(codec); | ||
17014 | break; | ||
17015 | } | ||
17016 | } | ||
17017 | |||
17018 | #define alc663_mode7_setup alc663_mode1_setup | ||
17019 | |||
17020 | static void alc663_mode7_inithook(struct hda_codec *codec) | ||
17021 | { | ||
17022 | alc663_two_hp_m7_speaker_automute(codec); | ||
17023 | alc_mic_automute(codec); | ||
17024 | } | ||
17025 | |||
17026 | /* ***************** Mode8 ******************************/ | ||
17027 | static void alc663_mode8_unsol_event(struct hda_codec *codec, | ||
17028 | unsigned int res) | ||
17029 | { | ||
17030 | switch (res >> 26) { | ||
17031 | case ALC880_HP_EVENT: | ||
17032 | alc663_two_hp_m8_speaker_automute(codec); | ||
17033 | break; | ||
17034 | case ALC880_MIC_EVENT: | ||
17035 | alc_mic_automute(codec); | ||
17036 | break; | ||
17037 | } | ||
17038 | } | ||
17039 | |||
17040 | #define alc663_mode8_setup alc663_m51va_setup | ||
17041 | |||
17042 | static void alc663_mode8_inithook(struct hda_codec *codec) | ||
17043 | { | ||
17044 | alc663_two_hp_m8_speaker_automute(codec); | ||
17045 | alc_mic_automute(codec); | ||
17046 | } | ||
17047 | |||
16769 | static void alc663_g71v_hp_automute(struct hda_codec *codec) | 17048 | static void alc663_g71v_hp_automute(struct hda_codec *codec) |
16770 | { | 17049 | { |
16771 | unsigned int present; | 17050 | unsigned int present; |
@@ -16900,6 +17179,8 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { | |||
16900 | [ALC663_ASUS_MODE4] = "asus-mode4", | 17179 | [ALC663_ASUS_MODE4] = "asus-mode4", |
16901 | [ALC663_ASUS_MODE5] = "asus-mode5", | 17180 | [ALC663_ASUS_MODE5] = "asus-mode5", |
16902 | [ALC663_ASUS_MODE6] = "asus-mode6", | 17181 | [ALC663_ASUS_MODE6] = "asus-mode6", |
17182 | [ALC663_ASUS_MODE7] = "asus-mode7", | ||
17183 | [ALC663_ASUS_MODE8] = "asus-mode8", | ||
16903 | [ALC272_DELL] = "dell", | 17184 | [ALC272_DELL] = "dell", |
16904 | [ALC272_DELL_ZM1] = "dell-zm1", | 17185 | [ALC272_DELL_ZM1] = "dell-zm1", |
16905 | [ALC272_SAMSUNG_NC10] = "samsung-nc10", | 17186 | [ALC272_SAMSUNG_NC10] = "samsung-nc10", |
@@ -16916,12 +17197,22 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
16916 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), | 17197 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), |
16917 | SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_ASUS_MODE2), | 17198 | SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_ASUS_MODE2), |
16918 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), | 17199 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), |
17200 | SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC663_ASUS_MODE1), | ||
17201 | SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC663_ASUS_MODE1), | ||
16919 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), | 17202 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), |
17203 | SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC663_ASUS_MODE7), | ||
17204 | SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC663_ASUS_MODE7), | ||
17205 | SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC663_ASUS_MODE8), | ||
17206 | SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC663_ASUS_MODE3), | ||
17207 | SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC663_ASUS_MODE1), | ||
16920 | SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_ASUS_MODE2), | 17208 | SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_ASUS_MODE2), |
17209 | SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_ASUS_MODE2), | ||
17210 | SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC663_ASUS_MODE1), | ||
16921 | SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_ASUS_MODE2), | 17211 | SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_ASUS_MODE2), |
16922 | SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC663_ASUS_MODE6), | 17212 | SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC663_ASUS_MODE6), |
16923 | SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC663_ASUS_MODE6), | 17213 | SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC663_ASUS_MODE6), |
16924 | SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_ASUS_MODE2), | 17214 | SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_ASUS_MODE2), |
17215 | SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC663_ASUS_MODE1), | ||
16925 | SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC663_ASUS_MODE3), | 17216 | SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC663_ASUS_MODE3), |
16926 | SND_PCI_QUIRK(0x1043, 0x17c3, "ASUS UX20", ALC663_ASUS_M51VA), | 17217 | SND_PCI_QUIRK(0x1043, 0x17c3, "ASUS UX20", ALC663_ASUS_M51VA), |
16927 | SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_ASUS_MODE2), | 17218 | SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_ASUS_MODE2), |
@@ -17205,6 +17496,36 @@ static struct alc_config_preset alc662_presets[] = { | |||
17205 | .setup = alc663_mode6_setup, | 17496 | .setup = alc663_mode6_setup, |
17206 | .init_hook = alc663_mode6_inithook, | 17497 | .init_hook = alc663_mode6_inithook, |
17207 | }, | 17498 | }, |
17499 | [ALC663_ASUS_MODE7] = { | ||
17500 | .mixers = { alc663_mode7_mixer }, | ||
17501 | .cap_mixer = alc662_auto_capture_mixer, | ||
17502 | .init_verbs = { alc662_init_verbs, | ||
17503 | alc663_mode7_init_verbs }, | ||
17504 | .num_dacs = ARRAY_SIZE(alc662_dac_nids), | ||
17505 | .hp_nid = 0x03, | ||
17506 | .dac_nids = alc662_dac_nids, | ||
17507 | .dig_out_nid = ALC662_DIGOUT_NID, | ||
17508 | .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes), | ||
17509 | .channel_mode = alc662_3ST_2ch_modes, | ||
17510 | .unsol_event = alc663_mode7_unsol_event, | ||
17511 | .setup = alc663_mode7_setup, | ||
17512 | .init_hook = alc663_mode7_inithook, | ||
17513 | }, | ||
17514 | [ALC663_ASUS_MODE8] = { | ||
17515 | .mixers = { alc663_mode8_mixer }, | ||
17516 | .cap_mixer = alc662_auto_capture_mixer, | ||
17517 | .init_verbs = { alc662_init_verbs, | ||
17518 | alc663_mode8_init_verbs }, | ||
17519 | .num_dacs = ARRAY_SIZE(alc662_dac_nids), | ||
17520 | .hp_nid = 0x03, | ||
17521 | .dac_nids = alc662_dac_nids, | ||
17522 | .dig_out_nid = ALC662_DIGOUT_NID, | ||
17523 | .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes), | ||
17524 | .channel_mode = alc662_3ST_2ch_modes, | ||
17525 | .unsol_event = alc663_mode8_unsol_event, | ||
17526 | .setup = alc663_mode8_setup, | ||
17527 | .init_hook = alc663_mode8_inithook, | ||
17528 | }, | ||
17208 | [ALC272_DELL] = { | 17529 | [ALC272_DELL] = { |
17209 | .mixers = { alc663_m51va_mixer }, | 17530 | .mixers = { alc663_m51va_mixer }, |
17210 | .cap_mixer = alc272_auto_capture_mixer, | 17531 | .cap_mixer = alc272_auto_capture_mixer, |
@@ -17688,7 +18009,9 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
17688 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, | 18009 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
17689 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, | 18010 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, |
17690 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, | 18011 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, |
18012 | { .id = 0x10ec0270, .name = "ALC270", .patch = patch_alc269 }, | ||
17691 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, | 18013 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, |
18014 | { .id = 0x10ec0275, .name = "ALC275", .patch = patch_alc269 }, | ||
17692 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 18015 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
17693 | .patch = patch_alc861 }, | 18016 | .patch = patch_alc861 }, |
17694 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 18017 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3d59f8325848..eeda7beeb57a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -2104,6 +2104,7 @@ static unsigned int ref9205_pin_configs[12] = { | |||
2104 | 10280204 | 2104 | 10280204 |
2105 | 1028021F | 2105 | 1028021F |
2106 | 10280228 (Dell Vostro 1500) | 2106 | 10280228 (Dell Vostro 1500) |
2107 | 10280229 (Dell Vostro 1700) | ||
2107 | */ | 2108 | */ |
2108 | static unsigned int dell_9205_m42_pin_configs[12] = { | 2109 | static unsigned int dell_9205_m42_pin_configs[12] = { |
2109 | 0x0321101F, 0x03A11020, 0x400003FA, 0x90170310, | 2110 | 0x0321101F, 0x03A11020, 0x400003FA, 0x90170310, |
@@ -2189,6 +2190,8 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = { | |||
2189 | "Dell Inspiron", STAC_9205_DELL_M44), | 2190 | "Dell Inspiron", STAC_9205_DELL_M44), |
2190 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, | 2191 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, |
2191 | "Dell Vostro 1500", STAC_9205_DELL_M42), | 2192 | "Dell Vostro 1500", STAC_9205_DELL_M42), |
2193 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0229, | ||
2194 | "Dell Vostro 1700", STAC_9205_DELL_M42), | ||
2192 | /* Gateway */ | 2195 | /* Gateway */ |
2193 | SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD), | 2196 | SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD), |
2194 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), | 2197 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), |
@@ -3779,15 +3782,16 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3779 | err = snd_hda_attach_beep_device(codec, nid); | 3782 | err = snd_hda_attach_beep_device(codec, nid); |
3780 | if (err < 0) | 3783 | if (err < 0) |
3781 | return err; | 3784 | return err; |
3782 | /* IDT/STAC codecs have linear beep tone parameter */ | 3785 | if (codec->beep) { |
3783 | codec->beep->linear_tone = 1; | 3786 | /* IDT/STAC codecs have linear beep tone parameter */ |
3784 | /* if no beep switch is available, make its own one */ | 3787 | codec->beep->linear_tone = 1; |
3785 | caps = query_amp_caps(codec, nid, HDA_OUTPUT); | 3788 | /* if no beep switch is available, make its own one */ |
3786 | if (codec->beep && | 3789 | caps = query_amp_caps(codec, nid, HDA_OUTPUT); |
3787 | !((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT)) { | 3790 | if (!(caps & AC_AMPCAP_MUTE)) { |
3788 | err = stac92xx_beep_switch_ctl(codec); | 3791 | err = stac92xx_beep_switch_ctl(codec); |
3789 | if (err < 0) | 3792 | if (err < 0) |
3790 | return err; | 3793 | return err; |
3794 | } | ||
3791 | } | 3795 | } |
3792 | } | 3796 | } |
3793 | #endif | 3797 | #endif |
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index b69861d52161..3ef16bbc8c83 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -470,7 +470,7 @@ EXPORT_SYMBOL_GPL(soc_codec_dev_ak4642); | |||
470 | 470 | ||
471 | static int __init ak4642_modinit(void) | 471 | static int __init ak4642_modinit(void) |
472 | { | 472 | { |
473 | int ret; | 473 | int ret = 0; |
474 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 474 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
475 | ret = i2c_add_driver(&ak4642_i2c_driver); | 475 | ret = i2c_add_driver(&ak4642_i2c_driver); |
476 | #endif | 476 | #endif |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index bbc72c2ddfca..81b8c9dfe7fc 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
@@ -191,6 +191,7 @@ static int ac97_analog_prepare(struct snd_pcm_substream *substream, | |||
191 | vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS); | 191 | vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS); |
192 | 192 | ||
193 | vra |= 0x1; /* enable variable rate audio */ | 193 | vra |= 0x1; /* enable variable rate audio */ |
194 | vra &= ~0x4; /* disable SPDIF output */ | ||
194 | 195 | ||
195 | stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra); | 196 | stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra); |
196 | 197 | ||
@@ -221,22 +222,6 @@ static int ac97_digital_prepare(struct snd_pcm_substream *substream, | |||
221 | return stac9766_ac97_write(codec, reg, runtime->rate); | 222 | return stac9766_ac97_write(codec, reg, runtime->rate); |
222 | } | 223 | } |
223 | 224 | ||
224 | static int ac97_digital_trigger(struct snd_pcm_substream *substream, | ||
225 | int cmd, struct snd_soc_dai *dai) | ||
226 | { | ||
227 | struct snd_soc_codec *codec = dai->codec; | ||
228 | unsigned short vra; | ||
229 | |||
230 | switch (cmd) { | ||
231 | case SNDRV_PCM_TRIGGER_STOP: | ||
232 | vra = stac9766_ac97_read(codec, AC97_EXTENDED_STATUS); | ||
233 | vra &= !0x04; | ||
234 | stac9766_ac97_write(codec, AC97_EXTENDED_STATUS, vra); | ||
235 | break; | ||
236 | } | ||
237 | return 0; | ||
238 | } | ||
239 | |||
240 | static int stac9766_set_bias_level(struct snd_soc_codec *codec, | 225 | static int stac9766_set_bias_level(struct snd_soc_codec *codec, |
241 | enum snd_soc_bias_level level) | 226 | enum snd_soc_bias_level level) |
242 | { | 227 | { |
@@ -315,7 +300,6 @@ static struct snd_soc_dai_ops stac9766_dai_ops_analog = { | |||
315 | 300 | ||
316 | static struct snd_soc_dai_ops stac9766_dai_ops_digital = { | 301 | static struct snd_soc_dai_ops stac9766_dai_ops_digital = { |
317 | .prepare = ac97_digital_prepare, | 302 | .prepare = ac97_digital_prepare, |
318 | .trigger = ac97_digital_trigger, | ||
319 | }; | 303 | }; |
320 | 304 | ||
321 | struct snd_soc_dai stac9766_dai[] = { | 305 | struct snd_soc_dai stac9766_dai[] = { |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index 81c57b5c591c..a808675388fc 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -47,7 +47,7 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = { | |||
47 | }; | 47 | }; |
48 | 48 | ||
49 | #define WM8974_POWER1_BIASEN 0x08 | 49 | #define WM8974_POWER1_BIASEN 0x08 |
50 | #define WM8974_POWER1_BUFIOEN 0x10 | 50 | #define WM8974_POWER1_BUFIOEN 0x04 |
51 | 51 | ||
52 | struct wm8974_priv { | 52 | struct wm8974_priv { |
53 | struct snd_soc_codec codec; | 53 | struct snd_soc_codec codec; |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 0ac1215dcd9b..e237bf615129 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -463,7 +463,8 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
463 | { | 463 | { |
464 | u16 *cache = codec->reg_cache; | 464 | u16 *cache = codec->reg_cache; |
465 | 465 | ||
466 | soc_ac97_ops.write(codec->ac97, reg, val); | 466 | if (reg < 0x7c) |
467 | soc_ac97_ops.write(codec->ac97, reg, val); | ||
467 | reg = reg >> 1; | 468 | reg = reg >> 1; |
468 | if (reg < (ARRAY_SIZE(wm9712_reg))) | 469 | if (reg < (ARRAY_SIZE(wm9712_reg))) |
469 | cache[reg] = val; | 470 | cache[reg] = val; |
diff --git a/sound/soc/imx/mx27vis_wm8974.c b/sound/soc/imx/mx27vis_wm8974.c index 0267d2d91685..07d2a248438c 100644 --- a/sound/soc/imx/mx27vis_wm8974.c +++ b/sound/soc/imx/mx27vis_wm8974.c | |||
@@ -180,7 +180,8 @@ static int mx27vis_hifi_hw_free(struct snd_pcm_substream *substream) | |||
180 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 180 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; |
181 | 181 | ||
182 | /* disable the PLL */ | 182 | /* disable the PLL */ |
183 | return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, 0, 0); | 183 | return codec_dai->ops->set_pll(codec_dai, IGNORED_ARG, IGNORED_ARG, |
184 | 0, 0); | ||
184 | } | 185 | } |
185 | 186 | ||
186 | /* | 187 | /* |
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index c071f9603a38..3c85c0f92823 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/i2c/twl4030.h> | 27 | #include <linux/i2c/twl.h> |
28 | #include <sound/core.h> | 28 | #include <sound/core.h> |
29 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
30 | #include <sound/soc.h> | 30 | #include <sound/soc.h> |
@@ -321,11 +321,11 @@ static int __init sdp3430_soc_init(void) | |||
321 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ | 321 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ |
322 | 322 | ||
323 | /* Set TWL4030 GPIO6 as EXTMUTE signal */ | 323 | /* Set TWL4030 GPIO6 as EXTMUTE signal */ |
324 | twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, | 324 | twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, |
325 | TWL4030_INTBR_PMBR1); | 325 | TWL4030_INTBR_PMBR1); |
326 | pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03); | 326 | pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03); |
327 | pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02); | 327 | pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02); |
328 | twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, | 328 | twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, |
329 | TWL4030_INTBR_PMBR1); | 329 | TWL4030_INTBR_PMBR1); |
330 | 330 | ||
331 | ret = platform_device_add(sdp3430_snd_device); | 331 | ret = platform_device_add(sdp3430_snd_device); |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 9c49c11c43ce..42813b808389 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -876,7 +876,7 @@ static int fsi_probe(struct platform_device *pdev) | |||
876 | 876 | ||
877 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 877 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
878 | irq = platform_get_irq(pdev, 0); | 878 | irq = platform_get_irq(pdev, 0); |
879 | if (!res || !irq) { | 879 | if (!res || (int)irq <= 0) { |
880 | dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); | 880 | dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); |
881 | ret = -ENODEV; | 881 | ret = -ENODEV; |
882 | goto exit; | 882 | goto exit; |