diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-06 13:44:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-06 13:44:49 -0500 |
commit | 6277d53a9ff34ecd3837690b243aa8c8c993898d (patch) | |
tree | e0e737357cadbb08efee0bc60c5e1506f150dc4d /sound | |
parent | d7a62cd0332115d4c7c4689abea0d889a30d8349 (diff) | |
parent | 2133991d58703aa5986e3789a7ae338bb45f2894 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Don't set to D3 in Cirrus errata init verbs
ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
ASoC: WM8994: Ensure late enable events are processed for the ADCs
ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
ASoC: Fix WM9081 platform data initialisation
ALSA: hda - Fix unable to record issue on ASUS N82JV
ALSA: HDA: Realtek: Fixup jack detection to input subsystem
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 51 | ||||
-rw-r--r-- | sound/soc/codecs/wm9081.c | 5 |
5 files changed, 57 insertions, 15 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index a07b031090d8..067982f4f182 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -1039,9 +1039,11 @@ static struct hda_verb cs_errata_init_verbs[] = { | |||
1039 | {0x11, AC_VERB_SET_PROC_COEF, 0x0008}, | 1039 | {0x11, AC_VERB_SET_PROC_COEF, 0x0008}, |
1040 | {0x11, AC_VERB_SET_PROC_STATE, 0x00}, | 1040 | {0x11, AC_VERB_SET_PROC_STATE, 0x00}, |
1041 | 1041 | ||
1042 | #if 0 /* Don't to set to D3 as we are in power-up sequence */ | ||
1042 | {0x07, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Rx: D3 */ | 1043 | {0x07, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Rx: D3 */ |
1043 | {0x08, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Tx: D3 */ | 1044 | {0x08, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Tx: D3 */ |
1044 | /*{0x01, AC_VERB_SET_POWER_STATE, 0x03},*/ /* AFG: D3 This is already handled */ | 1045 | /*{0x01, AC_VERB_SET_POWER_STATE, 0x03},*/ /* AFG: D3 This is already handled */ |
1046 | #endif | ||
1045 | 1047 | ||
1046 | {} /* terminator */ | 1048 | {} /* terminator */ |
1047 | }; | 1049 | }; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index a58767736727..ec0fa2dd0a27 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1634,6 +1634,9 @@ static struct hda_codec_preset snd_hda_preset_hdmi[] = { | |||
1634 | { .id = 0x10de0012, .name = "GPU 12 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1634 | { .id = 0x10de0012, .name = "GPU 12 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
1635 | { .id = 0x10de0013, .name = "GPU 13 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1635 | { .id = 0x10de0013, .name = "GPU 13 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
1636 | { .id = 0x10de0014, .name = "GPU 14 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1636 | { .id = 0x10de0014, .name = "GPU 14 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
1637 | { .id = 0x10de0015, .name = "GPU 15 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | ||
1638 | { .id = 0x10de0016, .name = "GPU 16 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | ||
1639 | /* 17 is known to be absent */ | ||
1637 | { .id = 0x10de0018, .name = "GPU 18 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1640 | { .id = 0x10de0018, .name = "GPU 18 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
1638 | { .id = 0x10de0019, .name = "GPU 19 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1641 | { .id = 0x10de0019, .name = "GPU 19 HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
1639 | { .id = 0x10de001a, .name = "GPU 1a HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, | 1642 | { .id = 0x10de001a, .name = "GPU 1a HDMI/DP", .patch = patch_nvhdmi_8ch_89 }, |
@@ -1676,6 +1679,8 @@ MODULE_ALIAS("snd-hda-codec-id:10de0011"); | |||
1676 | MODULE_ALIAS("snd-hda-codec-id:10de0012"); | 1679 | MODULE_ALIAS("snd-hda-codec-id:10de0012"); |
1677 | MODULE_ALIAS("snd-hda-codec-id:10de0013"); | 1680 | MODULE_ALIAS("snd-hda-codec-id:10de0013"); |
1678 | MODULE_ALIAS("snd-hda-codec-id:10de0014"); | 1681 | MODULE_ALIAS("snd-hda-codec-id:10de0014"); |
1682 | MODULE_ALIAS("snd-hda-codec-id:10de0015"); | ||
1683 | MODULE_ALIAS("snd-hda-codec-id:10de0016"); | ||
1679 | MODULE_ALIAS("snd-hda-codec-id:10de0018"); | 1684 | MODULE_ALIAS("snd-hda-codec-id:10de0018"); |
1680 | MODULE_ALIAS("snd-hda-codec-id:10de0019"); | 1685 | MODULE_ALIAS("snd-hda-codec-id:10de0019"); |
1681 | MODULE_ALIAS("snd-hda-codec-id:10de001a"); | 1686 | MODULE_ALIAS("snd-hda-codec-id:10de001a"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3328a259a242..4261bb8eec1d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1133,11 +1133,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl) | |||
1133 | nid = spec->autocfg.hp_pins[i]; | 1133 | nid = spec->autocfg.hp_pins[i]; |
1134 | if (!nid) | 1134 | if (!nid) |
1135 | break; | 1135 | break; |
1136 | if (snd_hda_jack_detect(codec, nid)) { | 1136 | alc_report_jack(codec, nid); |
1137 | spec->jack_present = 1; | 1137 | spec->jack_present |= snd_hda_jack_detect(codec, nid); |
1138 | break; | ||
1139 | } | ||
1140 | alc_report_jack(codec, spec->autocfg.hp_pins[i]); | ||
1141 | } | 1138 | } |
1142 | 1139 | ||
1143 | mute = spec->jack_present ? HDA_AMP_MUTE : 0; | 1140 | mute = spec->jack_present ? HDA_AMP_MUTE : 0; |
@@ -15015,7 +15012,7 @@ static struct snd_pci_quirk alc269_cfg_tbl[] = { | |||
15015 | SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269VB_AMIC), | 15012 | SND_PCI_QUIRK(0x1043, 0x11e3, "ASUS U33Jc", ALC269VB_AMIC), |
15016 | SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269VB_AMIC), | 15013 | SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80Jt", ALC269VB_AMIC), |
15017 | SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_AMIC), | 15014 | SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_AMIC), |
15018 | SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82Jv", ALC269_AMIC), | 15015 | SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82JV", ALC269VB_AMIC), |
15019 | SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_AMIC), | 15016 | SND_PCI_QUIRK(0x1043, 0x12d3, "ASUS N61Jv", ALC269_AMIC), |
15020 | SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_AMIC), | 15017 | SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_AMIC), |
15021 | SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_AMIC), | 15018 | SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_AMIC), |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index ebaee5ca7434..4afbe3b2e443 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -110,6 +110,9 @@ struct wm8994_priv { | |||
110 | 110 | ||
111 | unsigned int aif1clk_enable:1; | 111 | unsigned int aif1clk_enable:1; |
112 | unsigned int aif2clk_enable:1; | 112 | unsigned int aif2clk_enable:1; |
113 | |||
114 | unsigned int aif1clk_disable:1; | ||
115 | unsigned int aif2clk_disable:1; | ||
113 | }; | 116 | }; |
114 | 117 | ||
115 | static int wm8994_readable(unsigned int reg) | 118 | static int wm8994_readable(unsigned int reg) |
@@ -1015,14 +1018,18 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w, | |||
1015 | 1018 | ||
1016 | switch (event) { | 1019 | switch (event) { |
1017 | case SND_SOC_DAPM_PRE_PMU: | 1020 | case SND_SOC_DAPM_PRE_PMU: |
1018 | if (wm8994->aif1clk_enable) | 1021 | if (wm8994->aif1clk_enable) { |
1019 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1022 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, |
1020 | WM8994_AIF1CLK_ENA_MASK, | 1023 | WM8994_AIF1CLK_ENA_MASK, |
1021 | WM8994_AIF1CLK_ENA); | 1024 | WM8994_AIF1CLK_ENA); |
1022 | if (wm8994->aif2clk_enable) | 1025 | wm8994->aif1clk_enable = 0; |
1026 | } | ||
1027 | if (wm8994->aif2clk_enable) { | ||
1023 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1028 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, |
1024 | WM8994_AIF2CLK_ENA_MASK, | 1029 | WM8994_AIF2CLK_ENA_MASK, |
1025 | WM8994_AIF2CLK_ENA); | 1030 | WM8994_AIF2CLK_ENA); |
1031 | wm8994->aif2clk_enable = 0; | ||
1032 | } | ||
1026 | break; | 1033 | break; |
1027 | } | 1034 | } |
1028 | 1035 | ||
@@ -1037,15 +1044,15 @@ static int late_disable_ev(struct snd_soc_dapm_widget *w, | |||
1037 | 1044 | ||
1038 | switch (event) { | 1045 | switch (event) { |
1039 | case SND_SOC_DAPM_POST_PMD: | 1046 | case SND_SOC_DAPM_POST_PMD: |
1040 | if (wm8994->aif1clk_enable) { | 1047 | if (wm8994->aif1clk_disable) { |
1041 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1048 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, |
1042 | WM8994_AIF1CLK_ENA_MASK, 0); | 1049 | WM8994_AIF1CLK_ENA_MASK, 0); |
1043 | wm8994->aif1clk_enable = 0; | 1050 | wm8994->aif1clk_disable = 0; |
1044 | } | 1051 | } |
1045 | if (wm8994->aif2clk_enable) { | 1052 | if (wm8994->aif2clk_disable) { |
1046 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1053 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, |
1047 | WM8994_AIF2CLK_ENA_MASK, 0); | 1054 | WM8994_AIF2CLK_ENA_MASK, 0); |
1048 | wm8994->aif2clk_enable = 0; | 1055 | wm8994->aif2clk_disable = 0; |
1049 | } | 1056 | } |
1050 | break; | 1057 | break; |
1051 | } | 1058 | } |
@@ -1063,6 +1070,9 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
1063 | case SND_SOC_DAPM_PRE_PMU: | 1070 | case SND_SOC_DAPM_PRE_PMU: |
1064 | wm8994->aif1clk_enable = 1; | 1071 | wm8994->aif1clk_enable = 1; |
1065 | break; | 1072 | break; |
1073 | case SND_SOC_DAPM_POST_PMD: | ||
1074 | wm8994->aif1clk_disable = 1; | ||
1075 | break; | ||
1066 | } | 1076 | } |
1067 | 1077 | ||
1068 | return 0; | 1078 | return 0; |
@@ -1078,11 +1088,21 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, | |||
1078 | case SND_SOC_DAPM_PRE_PMU: | 1088 | case SND_SOC_DAPM_PRE_PMU: |
1079 | wm8994->aif2clk_enable = 1; | 1089 | wm8994->aif2clk_enable = 1; |
1080 | break; | 1090 | break; |
1091 | case SND_SOC_DAPM_POST_PMD: | ||
1092 | wm8994->aif2clk_disable = 1; | ||
1093 | break; | ||
1081 | } | 1094 | } |
1082 | 1095 | ||
1083 | return 0; | 1096 | return 0; |
1084 | } | 1097 | } |
1085 | 1098 | ||
1099 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, | ||
1100 | struct snd_kcontrol *kcontrol, int event) | ||
1101 | { | ||
1102 | late_enable_ev(w, kcontrol, event); | ||
1103 | return 0; | ||
1104 | } | ||
1105 | |||
1086 | static int dac_ev(struct snd_soc_dapm_widget *w, | 1106 | static int dac_ev(struct snd_soc_dapm_widget *w, |
1087 | struct snd_kcontrol *kcontrol, int event) | 1107 | struct snd_kcontrol *kcontrol, int event) |
1088 | { | 1108 | { |
@@ -1403,6 +1423,18 @@ SND_SOC_DAPM_DAC("DAC1L", NULL, WM8994_POWER_MANAGEMENT_5, 1, 0), | |||
1403 | SND_SOC_DAPM_DAC("DAC1R", NULL, WM8994_POWER_MANAGEMENT_5, 0, 0), | 1423 | SND_SOC_DAPM_DAC("DAC1R", NULL, WM8994_POWER_MANAGEMENT_5, 0, 0), |
1404 | }; | 1424 | }; |
1405 | 1425 | ||
1426 | static const struct snd_soc_dapm_widget wm8994_adc_revd_widgets[] = { | ||
1427 | SND_SOC_DAPM_MUX_E("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux, | ||
1428 | adc_mux_ev, SND_SOC_DAPM_PRE_PMU), | ||
1429 | SND_SOC_DAPM_MUX_E("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux, | ||
1430 | adc_mux_ev, SND_SOC_DAPM_PRE_PMU), | ||
1431 | }; | ||
1432 | |||
1433 | static const struct snd_soc_dapm_widget wm8994_adc_widgets[] = { | ||
1434 | SND_SOC_DAPM_MUX("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux), | ||
1435 | SND_SOC_DAPM_MUX("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux), | ||
1436 | }; | ||
1437 | |||
1406 | static const struct snd_soc_dapm_widget wm8994_dapm_widgets[] = { | 1438 | static const struct snd_soc_dapm_widget wm8994_dapm_widgets[] = { |
1407 | SND_SOC_DAPM_INPUT("DMIC1DAT"), | 1439 | SND_SOC_DAPM_INPUT("DMIC1DAT"), |
1408 | SND_SOC_DAPM_INPUT("DMIC2DAT"), | 1440 | SND_SOC_DAPM_INPUT("DMIC2DAT"), |
@@ -1497,9 +1529,6 @@ SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0), | |||
1497 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), | 1529 | SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0), |
1498 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), | 1530 | SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0), |
1499 | 1531 | ||
1500 | SND_SOC_DAPM_MUX("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux), | ||
1501 | SND_SOC_DAPM_MUX("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux), | ||
1502 | |||
1503 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), | 1532 | SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux), |
1504 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), | 1533 | SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux), |
1505 | 1534 | ||
@@ -3280,11 +3309,15 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) | |||
3280 | if (wm8994->revision < 4) { | 3309 | if (wm8994->revision < 4) { |
3281 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_revd_widgets, | 3310 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_revd_widgets, |
3282 | ARRAY_SIZE(wm8994_lateclk_revd_widgets)); | 3311 | ARRAY_SIZE(wm8994_lateclk_revd_widgets)); |
3312 | snd_soc_dapm_new_controls(dapm, wm8994_adc_revd_widgets, | ||
3313 | ARRAY_SIZE(wm8994_adc_revd_widgets)); | ||
3283 | snd_soc_dapm_new_controls(dapm, wm8994_dac_revd_widgets, | 3314 | snd_soc_dapm_new_controls(dapm, wm8994_dac_revd_widgets, |
3284 | ARRAY_SIZE(wm8994_dac_revd_widgets)); | 3315 | ARRAY_SIZE(wm8994_dac_revd_widgets)); |
3285 | } else { | 3316 | } else { |
3286 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, | 3317 | snd_soc_dapm_new_controls(dapm, wm8994_lateclk_widgets, |
3287 | ARRAY_SIZE(wm8994_lateclk_widgets)); | 3318 | ARRAY_SIZE(wm8994_lateclk_widgets)); |
3319 | snd_soc_dapm_new_controls(dapm, wm8994_adc_widgets, | ||
3320 | ARRAY_SIZE(wm8994_adc_widgets)); | ||
3288 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, | 3321 | snd_soc_dapm_new_controls(dapm, wm8994_dac_widgets, |
3289 | ARRAY_SIZE(wm8994_dac_widgets)); | 3322 | ARRAY_SIZE(wm8994_dac_widgets)); |
3290 | } | 3323 | } |
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 43825b2102a5..cce704c275c6 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/device.h> | ||
18 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
@@ -1341,6 +1342,10 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c, | |||
1341 | wm9081->control_type = SND_SOC_I2C; | 1342 | wm9081->control_type = SND_SOC_I2C; |
1342 | wm9081->control_data = i2c; | 1343 | wm9081->control_data = i2c; |
1343 | 1344 | ||
1345 | if (dev_get_platdata(&i2c->dev)) | ||
1346 | memcpy(&wm9081->retune, dev_get_platdata(&i2c->dev), | ||
1347 | sizeof(wm9081->retune)); | ||
1348 | |||
1344 | ret = snd_soc_register_codec(&i2c->dev, | 1349 | ret = snd_soc_register_codec(&i2c->dev, |
1345 | &soc_codec_dev_wm9081, &wm9081_dai, 1); | 1350 | &soc_codec_dev_wm9081, &wm9081_dai, 1); |
1346 | if (ret < 0) | 1351 | if (ret < 0) |