diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-26 18:32:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-26 18:32:39 -0400 |
commit | 2390c0fca6d31af0c1194a491d9629fbe27703b8 (patch) | |
tree | 303f982c94a75339c93d4468df54b86fdd2abdd9 | |
parent | 65dd4b91080157fce76a3d60338e33dfa02c4bf8 (diff) | |
parent | cff7873554eedc044029c41a9fd694245d97eff8 (diff) |
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A workaround for an ASUS laptop and a few ASoC changes; most of the
commits are tagged for stable, too."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Improve sequencing of AIF channel enables
ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
ASoC: fsi: update for dmaengine prep_slave_sg fallout.
ASoC: core: Fix card RTD count for deferred probe.
ASoC: cs42l73: don't use negative array index
ASoC: dapm: Ensure power gets managed for line widgets
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l73.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 276 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 7 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 1 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 2 |
6 files changed, 231 insertions, 58 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e65e35433055..818f90bc7d57 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -6109,6 +6109,7 @@ static const struct alc_fixup alc269_fixups[] = { | |||
6109 | 6109 | ||
6110 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 6110 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
6111 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), | 6111 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), |
6112 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), | ||
6112 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 6113 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
6113 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | 6114 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
6114 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), | 6115 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), |
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 78979b3e0e95..07c44b71f096 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
@@ -929,6 +929,8 @@ static int cs42l73_set_mclk(struct snd_soc_dai *dai, unsigned int freq) | |||
929 | 929 | ||
930 | /* MCLKX -> MCLK */ | 930 | /* MCLKX -> MCLK */ |
931 | mclkx_coeff = cs42l73_get_mclkx_coeff(freq); | 931 | mclkx_coeff = cs42l73_get_mclkx_coeff(freq); |
932 | if (mclkx_coeff < 0) | ||
933 | return mclkx_coeff; | ||
932 | 934 | ||
933 | mclk = cs42l73_mclkx_coeffs[mclkx_coeff].mclkx / | 935 | mclk = cs42l73_mclkx_coeffs[mclkx_coeff].mclkx / |
934 | cs42l73_mclkx_coeffs[mclkx_coeff].ratio; | 936 | cs42l73_mclkx_coeffs[mclkx_coeff].ratio; |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 7c49642af052..6c1fe3afd4b5 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1000,61 +1000,170 @@ static void wm8994_update_class_w(struct snd_soc_codec *codec) | |||
1000 | } | 1000 | } |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | static int late_enable_ev(struct snd_soc_dapm_widget *w, | 1003 | static int aif1clk_ev(struct snd_soc_dapm_widget *w, |
1004 | struct snd_kcontrol *kcontrol, int event) | 1004 | struct snd_kcontrol *kcontrol, int event) |
1005 | { | 1005 | { |
1006 | struct snd_soc_codec *codec = w->codec; | 1006 | struct snd_soc_codec *codec = w->codec; |
1007 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1007 | struct wm8994 *control = codec->control_data; |
1008 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; | ||
1009 | int dac; | ||
1010 | int adc; | ||
1011 | int val; | ||
1012 | |||
1013 | switch (control->type) { | ||
1014 | case WM8994: | ||
1015 | case WM8958: | ||
1016 | mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA; | ||
1017 | break; | ||
1018 | default: | ||
1019 | break; | ||
1020 | } | ||
1008 | 1021 | ||
1009 | switch (event) { | 1022 | switch (event) { |
1010 | case SND_SOC_DAPM_PRE_PMU: | 1023 | case SND_SOC_DAPM_PRE_PMU: |
1011 | if (wm8994->aif1clk_enable) { | 1024 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); |
1012 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1025 | if ((val & WM8994_AIF1ADCL_SRC) && |
1013 | WM8994_AIF1CLK_ENA_MASK, | 1026 | (val & WM8994_AIF1ADCR_SRC)) |
1014 | WM8994_AIF1CLK_ENA); | 1027 | adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA; |
1015 | wm8994->aif1clk_enable = 0; | 1028 | else if (!(val & WM8994_AIF1ADCL_SRC) && |
1016 | } | 1029 | !(val & WM8994_AIF1ADCR_SRC)) |
1017 | if (wm8994->aif2clk_enable) { | 1030 | adc = WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; |
1018 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1031 | else |
1019 | WM8994_AIF2CLK_ENA_MASK, | 1032 | adc = WM8994_AIF1ADC1R_ENA | WM8994_AIF1ADC2R_ENA | |
1020 | WM8994_AIF2CLK_ENA); | 1033 | WM8994_AIF1ADC1L_ENA | WM8994_AIF1ADC2L_ENA; |
1021 | wm8994->aif2clk_enable = 0; | 1034 | |
1022 | } | 1035 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_2); |
1036 | if ((val & WM8994_AIF1DACL_SRC) && | ||
1037 | (val & WM8994_AIF1DACR_SRC)) | ||
1038 | dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA; | ||
1039 | else if (!(val & WM8994_AIF1DACL_SRC) && | ||
1040 | !(val & WM8994_AIF1DACR_SRC)) | ||
1041 | dac = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; | ||
1042 | else | ||
1043 | dac = WM8994_AIF1DAC1R_ENA | WM8994_AIF1DAC2R_ENA | | ||
1044 | WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC2L_ENA; | ||
1045 | |||
1046 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1047 | mask, adc); | ||
1048 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1049 | mask, dac); | ||
1050 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1051 | WM8994_AIF1DSPCLK_ENA | | ||
1052 | WM8994_SYSDSPCLK_ENA, | ||
1053 | WM8994_AIF1DSPCLK_ENA | | ||
1054 | WM8994_SYSDSPCLK_ENA); | ||
1055 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, mask, | ||
1056 | WM8994_AIF1ADC1R_ENA | | ||
1057 | WM8994_AIF1ADC1L_ENA | | ||
1058 | WM8994_AIF1ADC2R_ENA | | ||
1059 | WM8994_AIF1ADC2L_ENA); | ||
1060 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, mask, | ||
1061 | WM8994_AIF1DAC1R_ENA | | ||
1062 | WM8994_AIF1DAC1L_ENA | | ||
1063 | WM8994_AIF1DAC2R_ENA | | ||
1064 | WM8994_AIF1DAC2L_ENA); | ||
1023 | break; | 1065 | break; |
1024 | } | ||
1025 | 1066 | ||
1026 | /* We may also have postponed startup of DSP, handle that. */ | 1067 | case SND_SOC_DAPM_PRE_PMD: |
1027 | wm8958_aif_ev(w, kcontrol, event); | 1068 | case SND_SOC_DAPM_POST_PMD: |
1069 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1070 | mask, 0); | ||
1071 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1072 | mask, 0); | ||
1073 | |||
1074 | val = snd_soc_read(codec, WM8994_CLOCKING_1); | ||
1075 | if (val & WM8994_AIF2DSPCLK_ENA) | ||
1076 | val = WM8994_SYSDSPCLK_ENA; | ||
1077 | else | ||
1078 | val = 0; | ||
1079 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1080 | WM8994_SYSDSPCLK_ENA | | ||
1081 | WM8994_AIF1DSPCLK_ENA, val); | ||
1082 | break; | ||
1083 | } | ||
1028 | 1084 | ||
1029 | return 0; | 1085 | return 0; |
1030 | } | 1086 | } |
1031 | 1087 | ||
1032 | static int late_disable_ev(struct snd_soc_dapm_widget *w, | 1088 | static int aif2clk_ev(struct snd_soc_dapm_widget *w, |
1033 | struct snd_kcontrol *kcontrol, int event) | 1089 | struct snd_kcontrol *kcontrol, int event) |
1034 | { | 1090 | { |
1035 | struct snd_soc_codec *codec = w->codec; | 1091 | struct snd_soc_codec *codec = w->codec; |
1036 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1092 | int dac; |
1093 | int adc; | ||
1094 | int val; | ||
1037 | 1095 | ||
1038 | switch (event) { | 1096 | switch (event) { |
1097 | case SND_SOC_DAPM_PRE_PMU: | ||
1098 | val = snd_soc_read(codec, WM8994_AIF2_CONTROL_1); | ||
1099 | if ((val & WM8994_AIF2ADCL_SRC) && | ||
1100 | (val & WM8994_AIF2ADCR_SRC)) | ||
1101 | adc = WM8994_AIF2ADCR_ENA; | ||
1102 | else if (!(val & WM8994_AIF2ADCL_SRC) && | ||
1103 | !(val & WM8994_AIF2ADCR_SRC)) | ||
1104 | adc = WM8994_AIF2ADCL_ENA; | ||
1105 | else | ||
1106 | adc = WM8994_AIF2ADCL_ENA | WM8994_AIF2ADCR_ENA; | ||
1107 | |||
1108 | |||
1109 | val = snd_soc_read(codec, WM8994_AIF2_CONTROL_2); | ||
1110 | if ((val & WM8994_AIF2DACL_SRC) && | ||
1111 | (val & WM8994_AIF2DACR_SRC)) | ||
1112 | dac = WM8994_AIF2DACR_ENA; | ||
1113 | else if (!(val & WM8994_AIF2DACL_SRC) && | ||
1114 | !(val & WM8994_AIF2DACR_SRC)) | ||
1115 | dac = WM8994_AIF2DACL_ENA; | ||
1116 | else | ||
1117 | dac = WM8994_AIF2DACL_ENA | WM8994_AIF2DACR_ENA; | ||
1118 | |||
1119 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1120 | WM8994_AIF2ADCL_ENA | | ||
1121 | WM8994_AIF2ADCR_ENA, adc); | ||
1122 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1123 | WM8994_AIF2DACL_ENA | | ||
1124 | WM8994_AIF2DACR_ENA, dac); | ||
1125 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1126 | WM8994_AIF2DSPCLK_ENA | | ||
1127 | WM8994_SYSDSPCLK_ENA, | ||
1128 | WM8994_AIF2DSPCLK_ENA | | ||
1129 | WM8994_SYSDSPCLK_ENA); | ||
1130 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
1131 | WM8994_AIF2ADCL_ENA | | ||
1132 | WM8994_AIF2ADCR_ENA, | ||
1133 | WM8994_AIF2ADCL_ENA | | ||
1134 | WM8994_AIF2ADCR_ENA); | ||
1135 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
1136 | WM8994_AIF2DACL_ENA | | ||
1137 | WM8994_AIF2DACR_ENA, | ||
1138 | WM8994_AIF2DACL_ENA | | ||
1139 | WM8994_AIF2DACR_ENA); | ||
1140 | break; | ||
1141 | |||
1142 | case SND_SOC_DAPM_PRE_PMD: | ||
1039 | case SND_SOC_DAPM_POST_PMD: | 1143 | case SND_SOC_DAPM_POST_PMD: |
1040 | if (wm8994->aif1clk_disable) { | 1144 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, |
1041 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | 1145 | WM8994_AIF2DACL_ENA | |
1042 | WM8994_AIF1CLK_ENA_MASK, 0); | 1146 | WM8994_AIF2DACR_ENA, 0); |
1043 | wm8994->aif1clk_disable = 0; | 1147 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, |
1044 | } | 1148 | WM8994_AIF2ADCL_ENA | |
1045 | if (wm8994->aif2clk_disable) { | 1149 | WM8994_AIF2ADCR_ENA, 0); |
1046 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | 1150 | |
1047 | WM8994_AIF2CLK_ENA_MASK, 0); | 1151 | val = snd_soc_read(codec, WM8994_CLOCKING_1); |
1048 | wm8994->aif2clk_disable = 0; | 1152 | if (val & WM8994_AIF1DSPCLK_ENA) |
1049 | } | 1153 | val = WM8994_SYSDSPCLK_ENA; |
1154 | else | ||
1155 | val = 0; | ||
1156 | snd_soc_update_bits(codec, WM8994_CLOCKING_1, | ||
1157 | WM8994_SYSDSPCLK_ENA | | ||
1158 | WM8994_AIF2DSPCLK_ENA, val); | ||
1050 | break; | 1159 | break; |
1051 | } | 1160 | } |
1052 | 1161 | ||
1053 | return 0; | 1162 | return 0; |
1054 | } | 1163 | } |
1055 | 1164 | ||
1056 | static int aif1clk_ev(struct snd_soc_dapm_widget *w, | 1165 | static int aif1clk_late_ev(struct snd_soc_dapm_widget *w, |
1057 | struct snd_kcontrol *kcontrol, int event) | 1166 | struct snd_kcontrol *kcontrol, int event) |
1058 | { | 1167 | { |
1059 | struct snd_soc_codec *codec = w->codec; | 1168 | struct snd_soc_codec *codec = w->codec; |
1060 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1169 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
@@ -1071,8 +1180,8 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
1071 | return 0; | 1180 | return 0; |
1072 | } | 1181 | } |
1073 | 1182 | ||
1074 | static int aif2clk_ev(struct snd_soc_dapm_widget *w, | 1183 | static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, |
1075 | struct snd_kcontrol *kcontrol, int event) | 1184 | struct snd_kcontrol *kcontrol, int event) |
1076 | { | 1185 | { |
1077 | struct snd_soc_codec *codec = w->codec; | 1186 | struct snd_soc_codec *codec = w->codec; |
1078 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1187 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
@@ -1089,6 +1198,63 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, | |||
1089 | return 0; | 1198 | return 0; |
1090 | } | 1199 | } |
1091 | 1200 | ||
1201 | static int late_enable_ev(struct snd_soc_dapm_widget *w, | ||
1202 | struct snd_kcontrol *kcontrol, int event) | ||
1203 | { | ||
1204 | struct snd_soc_codec *codec = w->codec; | ||
1205 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
1206 | |||
1207 | switch (event) { | ||
1208 | case SND_SOC_DAPM_PRE_PMU: | ||
1209 | if (wm8994->aif1clk_enable) { | ||
1210 | aif1clk_ev(w, kcontrol, event); | ||
1211 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | ||
1212 | WM8994_AIF1CLK_ENA_MASK, | ||
1213 | WM8994_AIF1CLK_ENA); | ||
1214 | wm8994->aif1clk_enable = 0; | ||
1215 | } | ||
1216 | if (wm8994->aif2clk_enable) { | ||
1217 | aif2clk_ev(w, kcontrol, event); | ||
1218 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | ||
1219 | WM8994_AIF2CLK_ENA_MASK, | ||
1220 | WM8994_AIF2CLK_ENA); | ||
1221 | wm8994->aif2clk_enable = 0; | ||
1222 | } | ||
1223 | break; | ||
1224 | } | ||
1225 | |||
1226 | /* We may also have postponed startup of DSP, handle that. */ | ||
1227 | wm8958_aif_ev(w, kcontrol, event); | ||
1228 | |||
1229 | return 0; | ||
1230 | } | ||
1231 | |||
1232 | static int late_disable_ev(struct snd_soc_dapm_widget *w, | ||
1233 | struct snd_kcontrol *kcontrol, int event) | ||
1234 | { | ||
1235 | struct snd_soc_codec *codec = w->codec; | ||
1236 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
1237 | |||
1238 | switch (event) { | ||
1239 | case SND_SOC_DAPM_POST_PMD: | ||
1240 | if (wm8994->aif1clk_disable) { | ||
1241 | snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1, | ||
1242 | WM8994_AIF1CLK_ENA_MASK, 0); | ||
1243 | aif1clk_ev(w, kcontrol, event); | ||
1244 | wm8994->aif1clk_disable = 0; | ||
1245 | } | ||
1246 | if (wm8994->aif2clk_disable) { | ||
1247 | snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1, | ||
1248 | WM8994_AIF2CLK_ENA_MASK, 0); | ||
1249 | aif2clk_ev(w, kcontrol, event); | ||
1250 | wm8994->aif2clk_disable = 0; | ||
1251 | } | ||
1252 | break; | ||
1253 | } | ||
1254 | |||
1255 | return 0; | ||
1256 | } | ||
1257 | |||
1092 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, | 1258 | static int adc_mux_ev(struct snd_soc_dapm_widget *w, |
1093 | struct snd_kcontrol *kcontrol, int event) | 1259 | struct snd_kcontrol *kcontrol, int event) |
1094 | { | 1260 | { |
@@ -1385,9 +1551,9 @@ static const struct snd_kcontrol_new aif2dacr_src_mux = | |||
1385 | SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum); | 1551 | SOC_DAPM_ENUM("AIF2DACR Mux", aif2dacr_src_enum); |
1386 | 1552 | ||
1387 | static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { | 1553 | static const struct snd_soc_dapm_widget wm8994_lateclk_revd_widgets[] = { |
1388 | SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_ev, | 1554 | SND_SOC_DAPM_SUPPLY("AIF1CLK", SND_SOC_NOPM, 0, 0, aif1clk_late_ev, |
1389 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1555 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), |
1390 | SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_ev, | 1556 | SND_SOC_DAPM_SUPPLY("AIF2CLK", SND_SOC_NOPM, 0, 0, aif2clk_late_ev, |
1391 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1557 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), |
1392 | 1558 | ||
1393 | SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, | 1559 | SND_SOC_DAPM_PGA_E("Late DAC1L Enable PGA", SND_SOC_NOPM, 0, 0, NULL, 0, |
@@ -1416,8 +1582,10 @@ SND_SOC_DAPM_POST("Late Disable PGA", late_disable_ev) | |||
1416 | }; | 1582 | }; |
1417 | 1583 | ||
1418 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { | 1584 | static const struct snd_soc_dapm_widget wm8994_lateclk_widgets[] = { |
1419 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0), | 1585 | SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, aif1clk_ev, |
1420 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0), | 1586 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
1587 | SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, aif2clk_ev, | ||
1588 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | ||
1421 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), | 1589 | SND_SOC_DAPM_PGA("Direct Voice", SND_SOC_NOPM, 0, 0, NULL, 0), |
1422 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, | 1590 | SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0, |
1423 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), | 1591 | left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)), |
@@ -1470,30 +1638,30 @@ SND_SOC_DAPM_SUPPLY("VMID", SND_SOC_NOPM, 0, 0, vmid_event, | |||
1470 | SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event, | 1638 | SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event, |
1471 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1639 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1472 | 1640 | ||
1473 | SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0), | 1641 | SND_SOC_DAPM_SUPPLY("DSP1CLK", SND_SOC_NOPM, 3, 0, NULL, 0), |
1474 | SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0), | 1642 | SND_SOC_DAPM_SUPPLY("DSP2CLK", SND_SOC_NOPM, 2, 0, NULL, 0), |
1475 | SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0), | 1643 | SND_SOC_DAPM_SUPPLY("DSPINTCLK", SND_SOC_NOPM, 1, 0, NULL, 0), |
1476 | 1644 | ||
1477 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, | 1645 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", NULL, |
1478 | 0, WM8994_POWER_MANAGEMENT_4, 9, 0), | 1646 | 0, SND_SOC_NOPM, 9, 0), |
1479 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, | 1647 | SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", NULL, |
1480 | 0, WM8994_POWER_MANAGEMENT_4, 8, 0), | 1648 | 0, SND_SOC_NOPM, 8, 0), |
1481 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, | 1649 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1L", NULL, 0, |
1482 | WM8994_POWER_MANAGEMENT_5, 9, 0, wm8958_aif_ev, | 1650 | SND_SOC_NOPM, 9, 0, wm8958_aif_ev, |
1483 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1651 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1484 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, | 1652 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC1R", NULL, 0, |
1485 | WM8994_POWER_MANAGEMENT_5, 8, 0, wm8958_aif_ev, | 1653 | SND_SOC_NOPM, 8, 0, wm8958_aif_ev, |
1486 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1654 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1487 | 1655 | ||
1488 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, | 1656 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", NULL, |
1489 | 0, WM8994_POWER_MANAGEMENT_4, 11, 0), | 1657 | 0, SND_SOC_NOPM, 11, 0), |
1490 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, | 1658 | SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", NULL, |
1491 | 0, WM8994_POWER_MANAGEMENT_4, 10, 0), | 1659 | 0, SND_SOC_NOPM, 10, 0), |
1492 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, | 1660 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2L", NULL, 0, |
1493 | WM8994_POWER_MANAGEMENT_5, 11, 0, wm8958_aif_ev, | 1661 | SND_SOC_NOPM, 11, 0, wm8958_aif_ev, |
1494 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1662 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1495 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, | 1663 | SND_SOC_DAPM_AIF_IN_E("AIF1DAC2R", NULL, 0, |
1496 | WM8994_POWER_MANAGEMENT_5, 10, 0, wm8958_aif_ev, | 1664 | SND_SOC_NOPM, 10, 0, wm8958_aif_ev, |
1497 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 1665 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
1498 | 1666 | ||
1499 | SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0, | 1667 | SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0, |
@@ -1520,14 +1688,14 @@ SND_SOC_DAPM_MIXER("DAC1R Mixer", SND_SOC_NOPM, 0, 0, | |||
1520 | dac1r_mix, ARRAY_SIZE(dac1r_mix)), | 1688 | dac1r_mix, ARRAY_SIZE(dac1r_mix)), |
1521 | 1689 | ||
1522 | SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, | 1690 | SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0, |
1523 | WM8994_POWER_MANAGEMENT_4, 13, 0), | 1691 | SND_SOC_NOPM, 13, 0), |
1524 | SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, | 1692 | SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0, |
1525 | WM8994_POWER_MANAGEMENT_4, 12, 0), | 1693 | SND_SOC_NOPM, 12, 0), |
1526 | SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, | 1694 | SND_SOC_DAPM_AIF_IN_E("AIF2DACL", NULL, 0, |
1527 | WM8994_POWER_MANAGEMENT_5, 13, 0, wm8958_aif_ev, | 1695 | SND_SOC_NOPM, 13, 0, wm8958_aif_ev, |
1528 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1696 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1529 | SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, | 1697 | SND_SOC_DAPM_AIF_IN_E("AIF2DACR", NULL, 0, |
1530 | WM8994_POWER_MANAGEMENT_5, 12, 0, wm8958_aif_ev, | 1698 | SND_SOC_NOPM, 12, 0, wm8958_aif_ev, |
1531 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 1699 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
1532 | 1700 | ||
1533 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", NULL, 0, SND_SOC_NOPM, 0, 0), | 1701 | SND_SOC_DAPM_AIF_IN("AIF1DACDAT", NULL, 0, SND_SOC_NOPM, 0, 0), |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 378cc5b056d7..74ed2dffbffd 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1001,11 +1001,10 @@ static void fsi_dma_do_tasklet(unsigned long data) | |||
1001 | sg_dma_address(&sg) = buf; | 1001 | sg_dma_address(&sg) = buf; |
1002 | sg_dma_len(&sg) = len; | 1002 | sg_dma_len(&sg) = len; |
1003 | 1003 | ||
1004 | desc = chan->device->device_prep_slave_sg(chan, &sg, 1, dir, | 1004 | desc = dmaengine_prep_slave_sg(chan, &sg, 1, dir, |
1005 | DMA_PREP_INTERRUPT | | 1005 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
1006 | DMA_CTRL_ACK); | ||
1007 | if (!desc) { | 1006 | if (!desc) { |
1008 | dev_err(dai->dev, "device_prep_slave_sg() fail\n"); | 1007 | dev_err(dai->dev, "dmaengine_prep_slave_sg() fail\n"); |
1009 | return; | 1008 | return; |
1010 | } | 1009 | } |
1011 | 1010 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index accdcb7d4d9d..1d6a80c9f4c2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3113,6 +3113,7 @@ int snd_soc_register_card(struct snd_soc_card *card) | |||
3113 | GFP_KERNEL); | 3113 | GFP_KERNEL); |
3114 | if (card->rtd == NULL) | 3114 | if (card->rtd == NULL) |
3115 | return -ENOMEM; | 3115 | return -ENOMEM; |
3116 | card->num_rtd = 0; | ||
3116 | card->rtd_aux = &card->rtd[card->num_links]; | 3117 | card->rtd_aux = &card->rtd[card->num_links]; |
3117 | 3118 | ||
3118 | for (i = 0; i < card->num_links; i++) | 3119 | for (i = 0; i < card->num_links; i++) |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5cbd2d7623b8..1bb6d4a63cd8 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -67,6 +67,7 @@ static int dapm_up_seq[] = { | |||
67 | [snd_soc_dapm_out_drv] = 10, | 67 | [snd_soc_dapm_out_drv] = 10, |
68 | [snd_soc_dapm_hp] = 10, | 68 | [snd_soc_dapm_hp] = 10, |
69 | [snd_soc_dapm_spk] = 10, | 69 | [snd_soc_dapm_spk] = 10, |
70 | [snd_soc_dapm_line] = 10, | ||
70 | [snd_soc_dapm_post] = 11, | 71 | [snd_soc_dapm_post] = 11, |
71 | }; | 72 | }; |
72 | 73 | ||
@@ -75,6 +76,7 @@ static int dapm_down_seq[] = { | |||
75 | [snd_soc_dapm_adc] = 1, | 76 | [snd_soc_dapm_adc] = 1, |
76 | [snd_soc_dapm_hp] = 2, | 77 | [snd_soc_dapm_hp] = 2, |
77 | [snd_soc_dapm_spk] = 2, | 78 | [snd_soc_dapm_spk] = 2, |
79 | [snd_soc_dapm_line] = 2, | ||
78 | [snd_soc_dapm_out_drv] = 2, | 80 | [snd_soc_dapm_out_drv] = 2, |
79 | [snd_soc_dapm_pga] = 4, | 81 | [snd_soc_dapm_pga] = 4, |
80 | [snd_soc_dapm_mixer_named_ctl] = 5, | 82 | [snd_soc_dapm_mixer_named_ctl] = 5, |