diff options
-rw-r--r-- | sound/arm/pxa2xx-ac97-lib.c | 12 | ||||
-rw-r--r-- | sound/core/jack.c | 3 | ||||
-rw-r--r-- | sound/core/pcm_lib.c | 48 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 24 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 88 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 52 | ||||
-rw-r--r-- | sound/usb/usx2y/us122l.c | 13 |
8 files changed, 154 insertions, 87 deletions
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 99026dfb81ea..34c1d94f921e 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c | |||
@@ -50,7 +50,7 @@ unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
50 | mutex_lock(&car_mutex); | 50 | mutex_lock(&car_mutex); |
51 | 51 | ||
52 | /* set up primary or secondary codec space */ | 52 | /* set up primary or secondary codec space */ |
53 | if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) | 53 | if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) |
54 | reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; | 54 | reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; |
55 | else | 55 | else |
56 | reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; | 56 | reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; |
@@ -90,7 +90,7 @@ void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
90 | mutex_lock(&car_mutex); | 90 | mutex_lock(&car_mutex); |
91 | 91 | ||
92 | /* set up primary or secondary codec space */ | 92 | /* set up primary or secondary codec space */ |
93 | if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) | 93 | if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) |
94 | reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; | 94 | reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; |
95 | else | 95 | else |
96 | reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; | 96 | reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; |
@@ -200,7 +200,7 @@ static inline void pxa_ac97_cold_pxa3xx(void) | |||
200 | bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) | 200 | bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) |
201 | { | 201 | { |
202 | #ifdef CONFIG_PXA25x | 202 | #ifdef CONFIG_PXA25x |
203 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 203 | if (cpu_is_pxa25x()) |
204 | pxa_ac97_warm_pxa25x(); | 204 | pxa_ac97_warm_pxa25x(); |
205 | else | 205 | else |
206 | #endif | 206 | #endif |
@@ -230,7 +230,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset); | |||
230 | bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) | 230 | bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) |
231 | { | 231 | { |
232 | #ifdef CONFIG_PXA25x | 232 | #ifdef CONFIG_PXA25x |
233 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 233 | if (cpu_is_pxa25x()) |
234 | pxa_ac97_cold_pxa25x(); | 234 | pxa_ac97_cold_pxa25x(); |
235 | else | 235 | else |
236 | #endif | 236 | #endif |
@@ -301,7 +301,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_suspend); | |||
301 | 301 | ||
302 | int pxa2xx_ac97_hw_resume(void) | 302 | int pxa2xx_ac97_hw_resume(void) |
303 | { | 303 | { |
304 | if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { | 304 | if (cpu_is_pxa25x() || cpu_is_pxa27x()) { |
305 | pxa_gpio_mode(GPIO31_SYNC_AC97_MD); | 305 | pxa_gpio_mode(GPIO31_SYNC_AC97_MD); |
306 | pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); | 306 | pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); |
307 | pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); | 307 | pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); |
@@ -325,7 +325,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev) | |||
325 | if (ret < 0) | 325 | if (ret < 0) |
326 | goto err; | 326 | goto err; |
327 | 327 | ||
328 | if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { | 328 | if (cpu_is_pxa25x() || cpu_is_pxa27x()) { |
329 | pxa_gpio_mode(GPIO31_SYNC_AC97_MD); | 329 | pxa_gpio_mode(GPIO31_SYNC_AC97_MD); |
330 | pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); | 330 | pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); |
331 | pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); | 331 | pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); |
diff --git a/sound/core/jack.c b/sound/core/jack.c index 8133a2b173a5..bd2d9e6b55e9 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -147,6 +147,9 @@ EXPORT_SYMBOL(snd_jack_set_parent); | |||
147 | */ | 147 | */ |
148 | void snd_jack_report(struct snd_jack *jack, int status) | 148 | void snd_jack_report(struct snd_jack *jack, int status) |
149 | { | 149 | { |
150 | if (!jack) | ||
151 | return; | ||
152 | |||
150 | if (jack->type & SND_JACK_HEADPHONE) | 153 | if (jack->type & SND_JACK_HEADPHONE) |
151 | input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT, | 154 | input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT, |
152 | status & SND_JACK_HEADPHONE); | 155 | status & SND_JACK_HEADPHONE); |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 6ea5cfb83998..921691080f35 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -908,12 +908,12 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, | |||
908 | EXPORT_SYMBOL(snd_pcm_hw_rule_add); | 908 | EXPORT_SYMBOL(snd_pcm_hw_rule_add); |
909 | 909 | ||
910 | /** | 910 | /** |
911 | * snd_pcm_hw_constraint_mask | 911 | * snd_pcm_hw_constraint_mask - apply the given bitmap mask constraint |
912 | * @runtime: PCM runtime instance | 912 | * @runtime: PCM runtime instance |
913 | * @var: hw_params variable to apply the mask | 913 | * @var: hw_params variable to apply the mask |
914 | * @mask: the bitmap mask | 914 | * @mask: the bitmap mask |
915 | * | 915 | * |
916 | * Apply the constraint of the given bitmap mask to a mask parameter. | 916 | * Apply the constraint of the given bitmap mask to a 32-bit mask parameter. |
917 | */ | 917 | */ |
918 | int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, | 918 | int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, |
919 | u_int32_t mask) | 919 | u_int32_t mask) |
@@ -928,12 +928,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param | |||
928 | } | 928 | } |
929 | 929 | ||
930 | /** | 930 | /** |
931 | * snd_pcm_hw_constraint_mask64 | 931 | * snd_pcm_hw_constraint_mask64 - apply the given bitmap mask constraint |
932 | * @runtime: PCM runtime instance | 932 | * @runtime: PCM runtime instance |
933 | * @var: hw_params variable to apply the mask | 933 | * @var: hw_params variable to apply the mask |
934 | * @mask: the 64bit bitmap mask | 934 | * @mask: the 64bit bitmap mask |
935 | * | 935 | * |
936 | * Apply the constraint of the given bitmap mask to a mask parameter. | 936 | * Apply the constraint of the given bitmap mask to a 64-bit mask parameter. |
937 | */ | 937 | */ |
938 | int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, | 938 | int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, |
939 | u_int64_t mask) | 939 | u_int64_t mask) |
@@ -949,7 +949,7 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par | |||
949 | } | 949 | } |
950 | 950 | ||
951 | /** | 951 | /** |
952 | * snd_pcm_hw_constraint_integer | 952 | * snd_pcm_hw_constraint_integer - apply an integer constraint to an interval |
953 | * @runtime: PCM runtime instance | 953 | * @runtime: PCM runtime instance |
954 | * @var: hw_params variable to apply the integer constraint | 954 | * @var: hw_params variable to apply the integer constraint |
955 | * | 955 | * |
@@ -964,7 +964,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa | |||
964 | EXPORT_SYMBOL(snd_pcm_hw_constraint_integer); | 964 | EXPORT_SYMBOL(snd_pcm_hw_constraint_integer); |
965 | 965 | ||
966 | /** | 966 | /** |
967 | * snd_pcm_hw_constraint_minmax | 967 | * snd_pcm_hw_constraint_minmax - apply a min/max range constraint to an interval |
968 | * @runtime: PCM runtime instance | 968 | * @runtime: PCM runtime instance |
969 | * @var: hw_params variable to apply the range | 969 | * @var: hw_params variable to apply the range |
970 | * @min: the minimal value | 970 | * @min: the minimal value |
@@ -995,7 +995,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params, | |||
995 | 995 | ||
996 | 996 | ||
997 | /** | 997 | /** |
998 | * snd_pcm_hw_constraint_list | 998 | * snd_pcm_hw_constraint_list - apply a list of constraints to a parameter |
999 | * @runtime: PCM runtime instance | 999 | * @runtime: PCM runtime instance |
1000 | * @cond: condition bits | 1000 | * @cond: condition bits |
1001 | * @var: hw_params variable to apply the list constraint | 1001 | * @var: hw_params variable to apply the list constraint |
@@ -1031,7 +1031,7 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params, | |||
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | /** | 1033 | /** |
1034 | * snd_pcm_hw_constraint_ratnums | 1034 | * snd_pcm_hw_constraint_ratnums - apply ratnums constraint to a parameter |
1035 | * @runtime: PCM runtime instance | 1035 | * @runtime: PCM runtime instance |
1036 | * @cond: condition bits | 1036 | * @cond: condition bits |
1037 | * @var: hw_params variable to apply the ratnums constraint | 1037 | * @var: hw_params variable to apply the ratnums constraint |
@@ -1064,7 +1064,7 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params, | |||
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | /** | 1066 | /** |
1067 | * snd_pcm_hw_constraint_ratdens | 1067 | * snd_pcm_hw_constraint_ratdens - apply ratdens constraint to a parameter |
1068 | * @runtime: PCM runtime instance | 1068 | * @runtime: PCM runtime instance |
1069 | * @cond: condition bits | 1069 | * @cond: condition bits |
1070 | * @var: hw_params variable to apply the ratdens constraint | 1070 | * @var: hw_params variable to apply the ratdens constraint |
@@ -1095,7 +1095,7 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params, | |||
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | /** | 1097 | /** |
1098 | * snd_pcm_hw_constraint_msbits | 1098 | * snd_pcm_hw_constraint_msbits - add a hw constraint msbits rule |
1099 | * @runtime: PCM runtime instance | 1099 | * @runtime: PCM runtime instance |
1100 | * @cond: condition bits | 1100 | * @cond: condition bits |
1101 | * @width: sample bits width | 1101 | * @width: sample bits width |
@@ -1123,7 +1123,7 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params, | |||
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | /** | 1125 | /** |
1126 | * snd_pcm_hw_constraint_step | 1126 | * snd_pcm_hw_constraint_step - add a hw constraint step rule |
1127 | * @runtime: PCM runtime instance | 1127 | * @runtime: PCM runtime instance |
1128 | * @cond: condition bits | 1128 | * @cond: condition bits |
1129 | * @var: hw_params variable to apply the step constraint | 1129 | * @var: hw_params variable to apply the step constraint |
@@ -1154,7 +1154,7 @@ static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm | |||
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | /** | 1156 | /** |
1157 | * snd_pcm_hw_constraint_pow2 | 1157 | * snd_pcm_hw_constraint_pow2 - add a hw constraint power-of-2 rule |
1158 | * @runtime: PCM runtime instance | 1158 | * @runtime: PCM runtime instance |
1159 | * @cond: condition bits | 1159 | * @cond: condition bits |
1160 | * @var: hw_params variable to apply the power-of-2 constraint | 1160 | * @var: hw_params variable to apply the power-of-2 constraint |
@@ -1202,13 +1202,13 @@ void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params) | |||
1202 | EXPORT_SYMBOL(_snd_pcm_hw_params_any); | 1202 | EXPORT_SYMBOL(_snd_pcm_hw_params_any); |
1203 | 1203 | ||
1204 | /** | 1204 | /** |
1205 | * snd_pcm_hw_param_value | 1205 | * snd_pcm_hw_param_value - return @params field @var value |
1206 | * @params: the hw_params instance | 1206 | * @params: the hw_params instance |
1207 | * @var: parameter to retrieve | 1207 | * @var: parameter to retrieve |
1208 | * @dir: pointer to the direction (-1,0,1) or NULL | 1208 | * @dir: pointer to the direction (-1,0,1) or %NULL |
1209 | * | 1209 | * |
1210 | * Return the value for field PAR if it's fixed in configuration space | 1210 | * Return the value for field @var if it's fixed in configuration space |
1211 | * defined by PARAMS. Return -EINVAL otherwise | 1211 | * defined by @params. Return -%EINVAL otherwise. |
1212 | */ | 1212 | */ |
1213 | int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, | 1213 | int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, |
1214 | snd_pcm_hw_param_t var, int *dir) | 1214 | snd_pcm_hw_param_t var, int *dir) |
@@ -1271,13 +1271,13 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, | |||
1271 | 1271 | ||
1272 | 1272 | ||
1273 | /** | 1273 | /** |
1274 | * snd_pcm_hw_param_first | 1274 | * snd_pcm_hw_param_first - refine config space and return minimum value |
1275 | * @pcm: PCM instance | 1275 | * @pcm: PCM instance |
1276 | * @params: the hw_params instance | 1276 | * @params: the hw_params instance |
1277 | * @var: parameter to retrieve | 1277 | * @var: parameter to retrieve |
1278 | * @dir: pointer to the direction (-1,0,1) or NULL | 1278 | * @dir: pointer to the direction (-1,0,1) or %NULL |
1279 | * | 1279 | * |
1280 | * Inside configuration space defined by PARAMS remove from PAR all | 1280 | * Inside configuration space defined by @params remove from @var all |
1281 | * values > minimum. Reduce configuration space accordingly. | 1281 | * values > minimum. Reduce configuration space accordingly. |
1282 | * Return the minimum. | 1282 | * Return the minimum. |
1283 | */ | 1283 | */ |
@@ -1317,13 +1317,13 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, | |||
1317 | 1317 | ||
1318 | 1318 | ||
1319 | /** | 1319 | /** |
1320 | * snd_pcm_hw_param_last | 1320 | * snd_pcm_hw_param_last - refine config space and return maximum value |
1321 | * @pcm: PCM instance | 1321 | * @pcm: PCM instance |
1322 | * @params: the hw_params instance | 1322 | * @params: the hw_params instance |
1323 | * @var: parameter to retrieve | 1323 | * @var: parameter to retrieve |
1324 | * @dir: pointer to the direction (-1,0,1) or NULL | 1324 | * @dir: pointer to the direction (-1,0,1) or %NULL |
1325 | * | 1325 | * |
1326 | * Inside configuration space defined by PARAMS remove from PAR all | 1326 | * Inside configuration space defined by @params remove from @var all |
1327 | * values < maximum. Reduce configuration space accordingly. | 1327 | * values < maximum. Reduce configuration space accordingly. |
1328 | * Return the maximum. | 1328 | * Return the maximum. |
1329 | */ | 1329 | */ |
@@ -1345,11 +1345,11 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, | |||
1345 | EXPORT_SYMBOL(snd_pcm_hw_param_last); | 1345 | EXPORT_SYMBOL(snd_pcm_hw_param_last); |
1346 | 1346 | ||
1347 | /** | 1347 | /** |
1348 | * snd_pcm_hw_param_choose | 1348 | * snd_pcm_hw_param_choose - choose a configuration defined by @params |
1349 | * @pcm: PCM instance | 1349 | * @pcm: PCM instance |
1350 | * @params: the hw_params instance | 1350 | * @params: the hw_params instance |
1351 | * | 1351 | * |
1352 | * Choose one configuration from configuration space defined by PARAMS | 1352 | * Choose one configuration from configuration space defined by @params. |
1353 | * The configuration chosen is that obtained fixing in this order: | 1353 | * The configuration chosen is that obtained fixing in this order: |
1354 | * first access, first format, first subformat, min channels, | 1354 | * first access, first format, first subformat, min channels, |
1355 | * min rate, min period time, max buffer size, min tick time | 1355 | * min rate, min period time, max buffer size, min tick time |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index e61e12506ded..aef18682c035 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -875,10 +875,8 @@ static struct action_ops snd_pcm_action_start = { | |||
875 | }; | 875 | }; |
876 | 876 | ||
877 | /** | 877 | /** |
878 | * snd_pcm_start | 878 | * snd_pcm_start - start all linked streams |
879 | * @substream: the PCM substream instance | 879 | * @substream: the PCM substream instance |
880 | * | ||
881 | * Start all linked streams. | ||
882 | */ | 880 | */ |
883 | int snd_pcm_start(struct snd_pcm_substream *substream) | 881 | int snd_pcm_start(struct snd_pcm_substream *substream) |
884 | { | 882 | { |
@@ -926,12 +924,11 @@ static struct action_ops snd_pcm_action_stop = { | |||
926 | }; | 924 | }; |
927 | 925 | ||
928 | /** | 926 | /** |
929 | * snd_pcm_stop | 927 | * snd_pcm_stop - try to stop all running streams in the substream group |
930 | * @substream: the PCM substream instance | 928 | * @substream: the PCM substream instance |
931 | * @state: PCM state after stopping the stream | 929 | * @state: PCM state after stopping the stream |
932 | * | 930 | * |
933 | * Try to stop all running streams in the substream group. | 931 | * The state of each stream is then changed to the given state unconditionally. |
934 | * The state of each stream is changed to the given value after that unconditionally. | ||
935 | */ | 932 | */ |
936 | int snd_pcm_stop(struct snd_pcm_substream *substream, int state) | 933 | int snd_pcm_stop(struct snd_pcm_substream *substream, int state) |
937 | { | 934 | { |
@@ -941,11 +938,10 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state) | |||
941 | EXPORT_SYMBOL(snd_pcm_stop); | 938 | EXPORT_SYMBOL(snd_pcm_stop); |
942 | 939 | ||
943 | /** | 940 | /** |
944 | * snd_pcm_drain_done | 941 | * snd_pcm_drain_done - stop the DMA only when the given stream is playback |
945 | * @substream: the PCM substream | 942 | * @substream: the PCM substream |
946 | * | 943 | * |
947 | * Stop the DMA only when the given stream is playback. | 944 | * After stopping, the state is changed to SETUP. |
948 | * The state is changed to SETUP. | ||
949 | * Unlike snd_pcm_stop(), this affects only the given stream. | 945 | * Unlike snd_pcm_stop(), this affects only the given stream. |
950 | */ | 946 | */ |
951 | int snd_pcm_drain_done(struct snd_pcm_substream *substream) | 947 | int snd_pcm_drain_done(struct snd_pcm_substream *substream) |
@@ -1065,10 +1061,9 @@ static struct action_ops snd_pcm_action_suspend = { | |||
1065 | }; | 1061 | }; |
1066 | 1062 | ||
1067 | /** | 1063 | /** |
1068 | * snd_pcm_suspend | 1064 | * snd_pcm_suspend - trigger SUSPEND to all linked streams |
1069 | * @substream: the PCM substream | 1065 | * @substream: the PCM substream |
1070 | * | 1066 | * |
1071 | * Trigger SUSPEND to all linked streams. | ||
1072 | * After this call, all streams are changed to SUSPENDED state. | 1067 | * After this call, all streams are changed to SUSPENDED state. |
1073 | */ | 1068 | */ |
1074 | int snd_pcm_suspend(struct snd_pcm_substream *substream) | 1069 | int snd_pcm_suspend(struct snd_pcm_substream *substream) |
@@ -1088,10 +1083,9 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream) | |||
1088 | EXPORT_SYMBOL(snd_pcm_suspend); | 1083 | EXPORT_SYMBOL(snd_pcm_suspend); |
1089 | 1084 | ||
1090 | /** | 1085 | /** |
1091 | * snd_pcm_suspend_all | 1086 | * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm |
1092 | * @pcm: the PCM instance | 1087 | * @pcm: the PCM instance |
1093 | * | 1088 | * |
1094 | * Trigger SUSPEND to all substreams in the given pcm. | ||
1095 | * After this call, all streams are changed to SUSPENDED state. | 1089 | * After this call, all streams are changed to SUSPENDED state. |
1096 | */ | 1090 | */ |
1097 | int snd_pcm_suspend_all(struct snd_pcm *pcm) | 1091 | int snd_pcm_suspend_all(struct snd_pcm *pcm) |
@@ -1313,11 +1307,9 @@ static struct action_ops snd_pcm_action_prepare = { | |||
1313 | }; | 1307 | }; |
1314 | 1308 | ||
1315 | /** | 1309 | /** |
1316 | * snd_pcm_prepare | 1310 | * snd_pcm_prepare - prepare the PCM substream to be triggerable |
1317 | * @substream: the PCM substream instance | 1311 | * @substream: the PCM substream instance |
1318 | * @file: file to refer f_flags | 1312 | * @file: file to refer f_flags |
1319 | * | ||
1320 | * Prepare the PCM substream to be triggerable. | ||
1321 | */ | 1313 | */ |
1322 | static int snd_pcm_prepare(struct snd_pcm_substream *substream, | 1314 | static int snd_pcm_prepare(struct snd_pcm_substream *substream, |
1323 | struct file *file) | 1315 | struct file *file) |
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 1a65775d28e1..2eed2c8b98da 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec) | |||
116 | codec->pcm_info = info; | 116 | codec->pcm_info = info; |
117 | 117 | ||
118 | info->name = "NVIDIA HDMI"; | 118 | info->name = "NVIDIA HDMI"; |
119 | info->pcm_type = HDA_PCM_TYPE_HDMI; | ||
119 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; | 120 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; |
120 | 121 | ||
121 | return 0; | 122 | return 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0b6e682c46d0..e72707cb60a3 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -822,6 +822,27 @@ static void alc_sku_automute(struct hda_codec *codec) | |||
822 | spec->jack_present ? 0 : PIN_OUT); | 822 | spec->jack_present ? 0 : PIN_OUT); |
823 | } | 823 | } |
824 | 824 | ||
825 | static void alc_mic_automute(struct hda_codec *codec) | ||
826 | { | ||
827 | struct alc_spec *spec = codec->spec; | ||
828 | unsigned int present; | ||
829 | unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC]; | ||
830 | unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]; | ||
831 | unsigned int mix_nid = spec->capsrc_nids[0]; | ||
832 | unsigned int capsrc_idx_mic, capsrc_idx_fmic; | ||
833 | |||
834 | capsrc_idx_mic = mic_nid - 0x18; | ||
835 | capsrc_idx_fmic = fmic_nid - 0x18; | ||
836 | present = snd_hda_codec_read(codec, mic_nid, 0, | ||
837 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
838 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
839 | 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80)); | ||
840 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
841 | 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0)); | ||
842 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic, | ||
843 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
844 | } | ||
845 | |||
825 | /* unsolicited event for HP jack sensing */ | 846 | /* unsolicited event for HP jack sensing */ |
826 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | 847 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) |
827 | { | 848 | { |
@@ -829,10 +850,17 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | |||
829 | res >>= 28; | 850 | res >>= 28; |
830 | else | 851 | else |
831 | res >>= 26; | 852 | res >>= 26; |
832 | if (res != ALC880_HP_EVENT) | 853 | if (res == ALC880_HP_EVENT) |
833 | return; | 854 | alc_sku_automute(codec); |
855 | |||
856 | if (res == ALC880_MIC_EVENT) | ||
857 | alc_mic_automute(codec); | ||
858 | } | ||
834 | 859 | ||
860 | static void alc_inithook(struct hda_codec *codec) | ||
861 | { | ||
835 | alc_sku_automute(codec); | 862 | alc_sku_automute(codec); |
863 | alc_mic_automute(codec); | ||
836 | } | 864 | } |
837 | 865 | ||
838 | /* additional initialization for ALC888 variants */ | 866 | /* additional initialization for ALC888 variants */ |
@@ -1018,10 +1046,17 @@ do_sku: | |||
1018 | else | 1046 | else |
1019 | return; | 1047 | return; |
1020 | } | 1048 | } |
1049 | if (spec->autocfg.hp_pins[0]) | ||
1050 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, | ||
1051 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
1052 | AC_USRSP_EN | ALC880_HP_EVENT); | ||
1021 | 1053 | ||
1022 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, | 1054 | if (spec->autocfg.input_pins[AUTO_PIN_MIC] && |
1023 | AC_VERB_SET_UNSOLICITED_ENABLE, | 1055 | spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]) |
1024 | AC_USRSP_EN | ALC880_HP_EVENT); | 1056 | snd_hda_codec_write(codec, |
1057 | spec->autocfg.input_pins[AUTO_PIN_MIC], 0, | ||
1058 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
1059 | AC_USRSP_EN | ALC880_MIC_EVENT); | ||
1025 | 1060 | ||
1026 | spec->unsol_event = alc_sku_unsol_event; | 1061 | spec->unsol_event = alc_sku_unsol_event; |
1027 | } | 1062 | } |
@@ -3808,7 +3843,7 @@ static void alc880_auto_init(struct hda_codec *codec) | |||
3808 | alc880_auto_init_extra_out(codec); | 3843 | alc880_auto_init_extra_out(codec); |
3809 | alc880_auto_init_analog_input(codec); | 3844 | alc880_auto_init_analog_input(codec); |
3810 | if (spec->unsol_event) | 3845 | if (spec->unsol_event) |
3811 | alc_sku_automute(codec); | 3846 | alc_inithook(codec); |
3812 | } | 3847 | } |
3813 | 3848 | ||
3814 | /* | 3849 | /* |
@@ -5219,7 +5254,7 @@ static void alc260_auto_init(struct hda_codec *codec) | |||
5219 | alc260_auto_init_multi_out(codec); | 5254 | alc260_auto_init_multi_out(codec); |
5220 | alc260_auto_init_analog_input(codec); | 5255 | alc260_auto_init_analog_input(codec); |
5221 | if (spec->unsol_event) | 5256 | if (spec->unsol_event) |
5222 | alc_sku_automute(codec); | 5257 | alc_inithook(codec); |
5223 | } | 5258 | } |
5224 | 5259 | ||
5225 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 5260 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -6629,7 +6664,7 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6629 | alc882_auto_init_analog_input(codec); | 6664 | alc882_auto_init_analog_input(codec); |
6630 | alc882_auto_init_input_src(codec); | 6665 | alc882_auto_init_input_src(codec); |
6631 | if (spec->unsol_event) | 6666 | if (spec->unsol_event) |
6632 | alc_sku_automute(codec); | 6667 | alc_inithook(codec); |
6633 | } | 6668 | } |
6634 | 6669 | ||
6635 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ | 6670 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ |
@@ -8306,8 +8341,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8306 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), | 8341 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), |
8307 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 8342 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
8308 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 8343 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
8344 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), | ||
8309 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 8345 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
8310 | SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V), | ||
8311 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8346 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8312 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8347 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8313 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8348 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
@@ -8758,7 +8793,7 @@ static void alc883_auto_init(struct hda_codec *codec) | |||
8758 | alc883_auto_init_analog_input(codec); | 8793 | alc883_auto_init_analog_input(codec); |
8759 | alc883_auto_init_input_src(codec); | 8794 | alc883_auto_init_input_src(codec); |
8760 | if (spec->unsol_event) | 8795 | if (spec->unsol_event) |
8761 | alc_sku_automute(codec); | 8796 | alc_inithook(codec); |
8762 | } | 8797 | } |
8763 | 8798 | ||
8764 | static int patch_alc883(struct hda_codec *codec) | 8799 | static int patch_alc883(struct hda_codec *codec) |
@@ -8802,8 +8837,13 @@ static int patch_alc883(struct hda_codec *codec) | |||
8802 | 8837 | ||
8803 | switch (codec->vendor_id) { | 8838 | switch (codec->vendor_id) { |
8804 | case 0x10ec0888: | 8839 | case 0x10ec0888: |
8805 | spec->stream_name_analog = "ALC888 Analog"; | 8840 | if (codec->revision_id == 0x100101) { |
8806 | spec->stream_name_digital = "ALC888 Digital"; | 8841 | spec->stream_name_analog = "ALC1200 Analog"; |
8842 | spec->stream_name_digital = "ALC1200 Digital"; | ||
8843 | } else { | ||
8844 | spec->stream_name_analog = "ALC888 Analog"; | ||
8845 | spec->stream_name_digital = "ALC888 Digital"; | ||
8846 | } | ||
8807 | break; | 8847 | break; |
8808 | case 0x10ec0889: | 8848 | case 0x10ec0889: |
8809 | spec->stream_name_analog = "ALC889 Analog"; | 8849 | spec->stream_name_analog = "ALC889 Analog"; |
@@ -10285,7 +10325,7 @@ static void alc262_auto_init(struct hda_codec *codec) | |||
10285 | alc262_auto_init_analog_input(codec); | 10325 | alc262_auto_init_analog_input(codec); |
10286 | alc262_auto_init_input_src(codec); | 10326 | alc262_auto_init_input_src(codec); |
10287 | if (spec->unsol_event) | 10327 | if (spec->unsol_event) |
10288 | alc_sku_automute(codec); | 10328 | alc_inithook(codec); |
10289 | } | 10329 | } |
10290 | 10330 | ||
10291 | /* | 10331 | /* |
@@ -10343,7 +10383,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10343 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), | 10383 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), |
10344 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 10384 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
10345 | ALC262_TOSHIBA_RX1), | 10385 | ALC262_TOSHIBA_RX1), |
10346 | SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), | 10386 | SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), |
10347 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), | 10387 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), |
10348 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | 10388 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), |
10349 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), | 10389 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), |
@@ -11417,7 +11457,7 @@ static void alc268_auto_init(struct hda_codec *codec) | |||
11417 | alc268_auto_init_mono_speaker_out(codec); | 11457 | alc268_auto_init_mono_speaker_out(codec); |
11418 | alc268_auto_init_analog_input(codec); | 11458 | alc268_auto_init_analog_input(codec); |
11419 | if (spec->unsol_event) | 11459 | if (spec->unsol_event) |
11420 | alc_sku_automute(codec); | 11460 | alc_inithook(codec); |
11421 | } | 11461 | } |
11422 | 11462 | ||
11423 | /* | 11463 | /* |
@@ -12200,7 +12240,7 @@ static void alc269_auto_init(struct hda_codec *codec) | |||
12200 | alc269_auto_init_hp_out(codec); | 12240 | alc269_auto_init_hp_out(codec); |
12201 | alc269_auto_init_analog_input(codec); | 12241 | alc269_auto_init_analog_input(codec); |
12202 | if (spec->unsol_event) | 12242 | if (spec->unsol_event) |
12203 | alc_sku_automute(codec); | 12243 | alc_inithook(codec); |
12204 | } | 12244 | } |
12205 | 12245 | ||
12206 | /* | 12246 | /* |
@@ -13281,7 +13321,7 @@ static void alc861_auto_init(struct hda_codec *codec) | |||
13281 | alc861_auto_init_hp_out(codec); | 13321 | alc861_auto_init_hp_out(codec); |
13282 | alc861_auto_init_analog_input(codec); | 13322 | alc861_auto_init_analog_input(codec); |
13283 | if (spec->unsol_event) | 13323 | if (spec->unsol_event) |
13284 | alc_sku_automute(codec); | 13324 | alc_inithook(codec); |
13285 | } | 13325 | } |
13286 | 13326 | ||
13287 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 13327 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -14393,7 +14433,7 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
14393 | alc861vd_auto_init_analog_input(codec); | 14433 | alc861vd_auto_init_analog_input(codec); |
14394 | alc861vd_auto_init_input_src(codec); | 14434 | alc861vd_auto_init_input_src(codec); |
14395 | if (spec->unsol_event) | 14435 | if (spec->unsol_event) |
14396 | alc_sku_automute(codec); | 14436 | alc_inithook(codec); |
14397 | } | 14437 | } |
14398 | 14438 | ||
14399 | static int patch_alc861vd(struct hda_codec *codec) | 14439 | static int patch_alc861vd(struct hda_codec *codec) |
@@ -15667,7 +15707,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { | |||
15667 | 15707 | ||
15668 | static struct snd_pci_quirk alc662_cfg_tbl[] = { | 15708 | static struct snd_pci_quirk alc662_cfg_tbl[] = { |
15669 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), | 15709 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), |
15670 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V), | 15710 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V), |
15671 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), | 15711 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), |
15672 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), | 15712 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), |
15673 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), | 15713 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), |
@@ -15680,6 +15720,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
15680 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), | 15720 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), |
15681 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), | 15721 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), |
15682 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), | 15722 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), |
15723 | SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1), | ||
15683 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), | 15724 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), |
15684 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), | 15725 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), |
15685 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), | 15726 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), |
@@ -16223,7 +16264,7 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
16223 | alc662_auto_init_analog_input(codec); | 16264 | alc662_auto_init_analog_input(codec); |
16224 | alc662_auto_init_input_src(codec); | 16265 | alc662_auto_init_input_src(codec); |
16225 | if (spec->unsol_event) | 16266 | if (spec->unsol_event) |
16226 | alc_sku_automute(codec); | 16267 | alc_inithook(codec); |
16227 | } | 16268 | } |
16228 | 16269 | ||
16229 | static int patch_alc662(struct hda_codec *codec) | 16270 | static int patch_alc662(struct hda_codec *codec) |
@@ -16268,6 +16309,9 @@ static int patch_alc662(struct hda_codec *codec) | |||
16268 | if (codec->vendor_id == 0x10ec0663) { | 16309 | if (codec->vendor_id == 0x10ec0663) { |
16269 | spec->stream_name_analog = "ALC663 Analog"; | 16310 | spec->stream_name_analog = "ALC663 Analog"; |
16270 | spec->stream_name_digital = "ALC663 Digital"; | 16311 | spec->stream_name_digital = "ALC663 Digital"; |
16312 | } else if (codec->vendor_id == 0x10ec0272) { | ||
16313 | spec->stream_name_analog = "ALC272 Analog"; | ||
16314 | spec->stream_name_digital = "ALC272 Digital"; | ||
16271 | } else { | 16315 | } else { |
16272 | spec->stream_name_analog = "ALC662 Analog"; | 16316 | spec->stream_name_analog = "ALC662 Analog"; |
16273 | spec->stream_name_digital = "ALC662 Digital"; | 16317 | spec->stream_name_digital = "ALC662 Digital"; |
@@ -16305,6 +16349,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16305 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, | 16349 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
16306 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, | 16350 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, |
16307 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, | 16351 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, |
16352 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, | ||
16308 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 16353 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
16309 | .patch = patch_alc861 }, | 16354 | .patch = patch_alc861 }, |
16310 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 16355 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
@@ -16323,7 +16368,10 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16323 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", | 16368 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", |
16324 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ | 16369 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ |
16325 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, | 16370 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, |
16371 | { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 }, | ||
16326 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, | 16372 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, |
16373 | { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", | ||
16374 | .patch = patch_alc883 }, | ||
16327 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, | 16375 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, |
16328 | {} /* terminator */ | 16376 | {} /* terminator */ |
16329 | }; | 16377 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c461baa83c2a..a2ac7205d45d 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -322,8 +322,8 @@ static hda_nid_t stac92hd71bxx_mux_nids[2] = { | |||
322 | 0x1a, 0x1b | 322 | 0x1a, 0x1b |
323 | }; | 323 | }; |
324 | 324 | ||
325 | static hda_nid_t stac92hd71bxx_dmux_nids[1] = { | 325 | static hda_nid_t stac92hd71bxx_dmux_nids[2] = { |
326 | 0x1c, | 326 | 0x1c, 0x1d, |
327 | }; | 327 | }; |
328 | 328 | ||
329 | static hda_nid_t stac92hd71bxx_smux_nids[2] = { | 329 | static hda_nid_t stac92hd71bxx_smux_nids[2] = { |
@@ -861,20 +861,18 @@ static struct hda_verb stac92hd71bxx_core_init[] = { | |||
861 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 861 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
862 | /* connect headphone jack to dac1 */ | 862 | /* connect headphone jack to dac1 */ |
863 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | 863 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, |
864 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ | ||
865 | /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ | 864 | /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ |
866 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 865 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
867 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 866 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
868 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 867 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
869 | }; | 868 | }; |
870 | 869 | ||
871 | #define HD_DISABLE_PORTF 3 | 870 | #define HD_DISABLE_PORTF 2 |
872 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { | 871 | static struct hda_verb stac92hd71bxx_analog_core_init[] = { |
873 | /* start of config #1 */ | 872 | /* start of config #1 */ |
874 | 873 | ||
875 | /* connect port 0f to audio mixer */ | 874 | /* connect port 0f to audio mixer */ |
876 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, | 875 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, |
877 | { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ | ||
878 | /* unmute right and left channels for node 0x0f */ | 876 | /* unmute right and left channels for node 0x0f */ |
879 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 877 | { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
880 | /* start of config #2 */ | 878 | /* start of config #2 */ |
@@ -883,10 +881,6 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
883 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | 881 | { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
884 | /* connect headphone jack to dac1 */ | 882 | /* connect headphone jack to dac1 */ |
885 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | 883 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, |
886 | /* connect port 0d to audio mixer */ | ||
887 | { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2}, | ||
888 | /* unmute dac0 input in audio mixer */ | ||
889 | { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f}, | ||
890 | /* unmute right and left channels for nodes 0x0a, 0xd */ | 884 | /* unmute right and left channels for nodes 0x0a, 0xd */ |
891 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 885 | { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
892 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | 886 | { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, |
@@ -1107,6 +1101,7 @@ static struct snd_kcontrol_new stac92hd83xxx_mixer[] = { | |||
1107 | 1101 | ||
1108 | static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { | 1102 | static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { |
1109 | STAC_INPUT_SOURCE(2), | 1103 | STAC_INPUT_SOURCE(2), |
1104 | STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2), | ||
1110 | 1105 | ||
1111 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT), | 1106 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT), |
1112 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT), | 1107 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT), |
@@ -1119,8 +1114,17 @@ static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { | |||
1119 | HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT), | 1114 | HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT), |
1120 | */ | 1115 | */ |
1121 | 1116 | ||
1122 | HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT), | 1117 | HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT), |
1123 | HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT), | 1118 | HDA_CODEC_VOLUME("Import0 Mux Capture Volume", 0x17, 0x0, HDA_INPUT), |
1119 | |||
1120 | HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT), | ||
1121 | HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT), | ||
1122 | |||
1123 | HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT), | ||
1124 | HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT), | ||
1125 | |||
1126 | HDA_CODEC_MUTE("DAC1 Capture Switch", 0x17, 0x4, HDA_INPUT), | ||
1127 | HDA_CODEC_VOLUME("DAC1 Capture Volume", 0x17, 0x4, HDA_INPUT), | ||
1124 | { } /* end */ | 1128 | { } /* end */ |
1125 | }; | 1129 | }; |
1126 | 1130 | ||
@@ -1649,7 +1653,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | |||
1649 | 1653 | ||
1650 | static unsigned int ref92hd71bxx_pin_configs[11] = { | 1654 | static unsigned int ref92hd71bxx_pin_configs[11] = { |
1651 | 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, | 1655 | 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, |
1652 | 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0, | 1656 | 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0, |
1653 | 0x90a000f0, 0x01452050, 0x01452050, | 1657 | 0x90a000f0, 0x01452050, 0x01452050, |
1654 | }; | 1658 | }; |
1655 | 1659 | ||
@@ -2812,7 +2816,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
2812 | static const char *chname[4] = { | 2816 | static const char *chname[4] = { |
2813 | "Front", "Surround", NULL /*CLFE*/, "Side" | 2817 | "Front", "Surround", NULL /*CLFE*/, "Side" |
2814 | }; | 2818 | }; |
2815 | hda_nid_t nid; | 2819 | hda_nid_t nid = 0; |
2816 | int i, err; | 2820 | int i, err; |
2817 | 2821 | ||
2818 | struct sigmatel_spec *spec = codec->spec; | 2822 | struct sigmatel_spec *spec = codec->spec; |
@@ -3000,7 +3004,7 @@ static int stac92xx_auto_create_mono_output_ctls(struct hda_codec *codec) | |||
3000 | 3004 | ||
3001 | /* labels for amp mux outputs */ | 3005 | /* labels for amp mux outputs */ |
3002 | static const char *stac92xx_amp_labels[3] = { | 3006 | static const char *stac92xx_amp_labels[3] = { |
3003 | "Front Microphone", "Microphone", "Line In" | 3007 | "Front Microphone", "Microphone", "Line In", |
3004 | }; | 3008 | }; |
3005 | 3009 | ||
3006 | /* create amp out controls mux on capable codecs */ | 3010 | /* create amp out controls mux on capable codecs */ |
@@ -4327,6 +4331,16 @@ static struct hda_codec_ops stac92hd71bxx_patch_ops = { | |||
4327 | #endif | 4331 | #endif |
4328 | }; | 4332 | }; |
4329 | 4333 | ||
4334 | static struct hda_input_mux stac92hd71bxx_dmux = { | ||
4335 | .num_items = 4, | ||
4336 | .items = { | ||
4337 | { "Analog Inputs", 0x00 }, | ||
4338 | { "Mixer", 0x01 }, | ||
4339 | { "Digital Mic 1", 0x02 }, | ||
4340 | { "Digital Mic 2", 0x03 }, | ||
4341 | } | ||
4342 | }; | ||
4343 | |||
4330 | static int patch_stac92hd71bxx(struct hda_codec *codec) | 4344 | static int patch_stac92hd71bxx(struct hda_codec *codec) |
4331 | { | 4345 | { |
4332 | struct sigmatel_spec *spec; | 4346 | struct sigmatel_spec *spec; |
@@ -4341,6 +4355,8 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) | |||
4341 | spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); | 4355 | spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); |
4342 | spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); | 4356 | spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); |
4343 | spec->pin_nids = stac92hd71bxx_pin_nids; | 4357 | spec->pin_nids = stac92hd71bxx_pin_nids; |
4358 | memcpy(&spec->private_dimux, &stac92hd71bxx_dmux, | ||
4359 | sizeof(stac92hd71bxx_dmux)); | ||
4344 | spec->board_config = snd_hda_check_board_config(codec, | 4360 | spec->board_config = snd_hda_check_board_config(codec, |
4345 | STAC_92HD71BXX_MODELS, | 4361 | STAC_92HD71BXX_MODELS, |
4346 | stac92hd71bxx_models, | 4362 | stac92hd71bxx_models, |
@@ -4392,6 +4408,7 @@ again: | |||
4392 | /* no output amps */ | 4408 | /* no output amps */ |
4393 | spec->num_pwrs = 0; | 4409 | spec->num_pwrs = 0; |
4394 | spec->mixer = stac92hd71bxx_analog_mixer; | 4410 | spec->mixer = stac92hd71bxx_analog_mixer; |
4411 | spec->dinput_mux = &spec->private_dimux; | ||
4395 | 4412 | ||
4396 | /* disable VSW */ | 4413 | /* disable VSW */ |
4397 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; | 4414 | spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; |
@@ -4409,12 +4426,13 @@ again: | |||
4409 | spec->num_pwrs = 0; | 4426 | spec->num_pwrs = 0; |
4410 | /* fallthru */ | 4427 | /* fallthru */ |
4411 | default: | 4428 | default: |
4429 | spec->dinput_mux = &spec->private_dimux; | ||
4412 | spec->mixer = stac92hd71bxx_analog_mixer; | 4430 | spec->mixer = stac92hd71bxx_analog_mixer; |
4413 | spec->init = stac92hd71bxx_analog_core_init; | 4431 | spec->init = stac92hd71bxx_analog_core_init; |
4414 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; | 4432 | codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; |
4415 | } | 4433 | } |
4416 | 4434 | ||
4417 | spec->aloopback_mask = 0x20; | 4435 | spec->aloopback_mask = 0x50; |
4418 | spec->aloopback_shift = 0; | 4436 | spec->aloopback_shift = 0; |
4419 | 4437 | ||
4420 | if (spec->board_config > STAC_92HD71BXX_REF) { | 4438 | if (spec->board_config > STAC_92HD71BXX_REF) { |
@@ -4456,6 +4474,10 @@ again: | |||
4456 | spec->multiout.num_dacs = 1; | 4474 | spec->multiout.num_dacs = 1; |
4457 | spec->multiout.hp_nid = 0x11; | 4475 | spec->multiout.hp_nid = 0x11; |
4458 | spec->multiout.dac_nids = stac92hd71bxx_dac_nids; | 4476 | spec->multiout.dac_nids = stac92hd71bxx_dac_nids; |
4477 | if (spec->dinput_mux) | ||
4478 | spec->private_dimux.num_items += | ||
4479 | spec->num_dmics - | ||
4480 | (ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1); | ||
4459 | 4481 | ||
4460 | err = stac92xx_parse_auto_config(codec, 0x21, 0x23); | 4482 | err = stac92xx_parse_auto_config(codec, 0x21, 0x23); |
4461 | if (!err) { | 4483 | if (!err) { |
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index b441fe2cd190..c2515b680f9f 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c | |||
@@ -118,12 +118,11 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, | |||
118 | void *vaddr; | 118 | void *vaddr; |
119 | struct us122l *us122l = area->vm_private_data; | 119 | struct us122l *us122l = area->vm_private_data; |
120 | struct usb_stream *s; | 120 | struct usb_stream *s; |
121 | int vm_f = VM_FAULT_SIGBUS; | ||
122 | 121 | ||
123 | mutex_lock(&us122l->mutex); | 122 | mutex_lock(&us122l->mutex); |
124 | s = us122l->sk.s; | 123 | s = us122l->sk.s; |
125 | if (!s) | 124 | if (!s) |
126 | goto out; | 125 | goto unlock; |
127 | 126 | ||
128 | offset = vmf->pgoff << PAGE_SHIFT; | 127 | offset = vmf->pgoff << PAGE_SHIFT; |
129 | if (offset < PAGE_ALIGN(s->read_size)) | 128 | if (offset < PAGE_ALIGN(s->read_size)) |
@@ -131,7 +130,7 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, | |||
131 | else { | 130 | else { |
132 | offset -= PAGE_ALIGN(s->read_size); | 131 | offset -= PAGE_ALIGN(s->read_size); |
133 | if (offset >= PAGE_ALIGN(s->write_size)) | 132 | if (offset >= PAGE_ALIGN(s->write_size)) |
134 | goto out; | 133 | goto unlock; |
135 | 134 | ||
136 | vaddr = us122l->sk.write_page + offset; | 135 | vaddr = us122l->sk.write_page + offset; |
137 | } | 136 | } |
@@ -141,9 +140,11 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, | |||
141 | mutex_unlock(&us122l->mutex); | 140 | mutex_unlock(&us122l->mutex); |
142 | 141 | ||
143 | vmf->page = page; | 142 | vmf->page = page; |
144 | vm_f = 0; | 143 | |
145 | out: | 144 | return 0; |
146 | return vm_f; | 145 | unlock: |
146 | mutex_unlock(&us122l->mutex); | ||
147 | return VM_FAULT_SIGBUS; | ||
147 | } | 148 | } |
148 | 149 | ||
149 | static void usb_stream_hwdep_vm_close(struct vm_area_struct *area) | 150 | static void usb_stream_hwdep_vm_close(struct vm_area_struct *area) |