Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic/samsung' and 'asoc/topic/sh' into asoc-next

+41 -15
+6 -3
Documentation/devicetree/bindings/sound/rt5640.txt
··· 14 14 15 15 - realtek,in1-differential 16 16 - realtek,in2-differential 17 - Boolean. Indicate MIC1/2 input are differential, rather than single-ended. 17 + - realtek,in3-differential 18 + Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended. 18 19 19 20 - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 20 21 ··· 25 24 * DMIC2 26 25 * MICBIAS1 27 26 * IN1P 28 - * IN1R 27 + * IN1N 29 28 * IN2P 30 - * IN2R 29 + * IN2N 30 + * IN3P 31 + * IN3N 31 32 * HPOL 32 33 * HPOR 33 34 * LOUTL
+2 -1
include/sound/rt5640.h
··· 12 12 #define __LINUX_SND_RT5640_H 13 13 14 14 struct rt5640_platform_data { 15 - /* IN1 & IN2 can optionally be differential */ 15 + /* IN1 & IN2 & IN3 can optionally be differential */ 16 16 bool in1_diff; 17 17 bool in2_diff; 18 + bool in3_diff; 18 19 19 20 bool dmic_en; 20 21 bool dmic1_data_pin; /* 0 = IN1P; 1 = GPIO3 */
+7 -3
sound/soc/codecs/rt298.c
··· 48 48 int is_hp_in; 49 49 }; 50 50 51 - static struct reg_default rt298_index_def[] = { 51 + static const struct reg_default rt298_index_def[] = { 52 52 { 0x01, 0xa5a8 }, 53 53 { 0x02, 0x8e95 }, 54 54 { 0x03, 0x0002 }, ··· 128 128 case VERB_CMD(AC_VERB_GET_EAPD_BTLENABLE, RT298_HP_OUT, 0): 129 129 return true; 130 130 default: 131 - return true; 131 + return false; 132 132 } 133 133 134 134 ··· 1164 1164 return -ENODEV; 1165 1165 } 1166 1166 1167 - rt298->index_cache = rt298_index_def; 1167 + rt298->index_cache = devm_kmemdup(&i2c->dev, rt298_index_def, 1168 + sizeof(rt298_index_def), GFP_KERNEL); 1169 + if (!rt298->index_cache) 1170 + return -ENOMEM; 1171 + 1168 1172 rt298->index_cache_size = INDEX_CACHE_SIZE; 1169 1173 rt298->i2c = i2c; 1170 1174 i2c_set_clientdata(i2c, rt298);
+21 -1
sound/soc/codecs/rt5640.c
··· 405 405 SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5640_DAC1_DIG_VOL, 406 406 RT5640_L_VOL_SFT, RT5640_R_VOL_SFT, 407 407 175, 0, dac_vol_tlv), 408 - /* IN1/IN2 Control */ 408 + /* IN1/IN2/IN3 Control */ 409 409 SOC_SINGLE_TLV("IN1 Boost", RT5640_IN1_IN2, 410 410 RT5640_BST_SFT1, 8, 0, bst_tlv), 411 411 SOC_SINGLE_TLV("IN2 Boost", RT5640_IN3_IN4, 412 412 RT5640_BST_SFT2, 8, 0, bst_tlv), 413 + SOC_SINGLE_TLV("IN3 Boost", RT5640_IN1_IN2, 414 + RT5640_BST_SFT2, 8, 0, bst_tlv), 415 + 413 416 /* INL/INR Volume Control */ 414 417 SOC_DOUBLE_TLV("IN Capture Volume", RT5640_INL_INR_VOL, 415 418 RT5640_INL_VOL_SFT, RT5640_INR_VOL_SFT, ··· 601 598 RT5640_M_HP_L_RM_L_SFT, 1, 1), 602 599 SOC_DAPM_SINGLE("INL Switch", RT5640_REC_L2_MIXER, 603 600 RT5640_M_IN_L_RM_L_SFT, 1, 1), 601 + SOC_DAPM_SINGLE("BST3 Switch", RT5640_REC_L2_MIXER, 602 + RT5640_M_BST2_RM_L_SFT, 1, 1), 604 603 SOC_DAPM_SINGLE("BST2 Switch", RT5640_REC_L2_MIXER, 605 604 RT5640_M_BST4_RM_L_SFT, 1, 1), 606 605 SOC_DAPM_SINGLE("BST1 Switch", RT5640_REC_L2_MIXER, ··· 616 611 RT5640_M_HP_R_RM_R_SFT, 1, 1), 617 612 SOC_DAPM_SINGLE("INR Switch", RT5640_REC_R2_MIXER, 618 613 RT5640_M_IN_R_RM_R_SFT, 1, 1), 614 + SOC_DAPM_SINGLE("BST3 Switch", RT5640_REC_R2_MIXER, 615 + RT5640_M_BST2_RM_R_SFT, 1, 1), 619 616 SOC_DAPM_SINGLE("BST2 Switch", RT5640_REC_R2_MIXER, 620 617 RT5640_M_BST4_RM_R_SFT, 1, 1), 621 618 SOC_DAPM_SINGLE("BST1 Switch", RT5640_REC_R2_MIXER, ··· 1072 1065 SND_SOC_DAPM_INPUT("IN1N"), 1073 1066 SND_SOC_DAPM_INPUT("IN2P"), 1074 1067 SND_SOC_DAPM_INPUT("IN2N"), 1068 + SND_SOC_DAPM_INPUT("IN3P"), 1069 + SND_SOC_DAPM_INPUT("IN3N"), 1075 1070 SND_SOC_DAPM_PGA("DMIC L1", SND_SOC_NOPM, 0, 0, NULL, 0), 1076 1071 SND_SOC_DAPM_PGA("DMIC R1", SND_SOC_NOPM, 0, 0, NULL, 0), 1077 1072 SND_SOC_DAPM_PGA("DMIC L2", SND_SOC_NOPM, 0, 0, NULL, 0), ··· 1090 1081 RT5640_PWR_BST1_BIT, 0, NULL, 0), 1091 1082 SND_SOC_DAPM_PGA("BST2", RT5640_PWR_ANLG2, 1092 1083 RT5640_PWR_BST4_BIT, 0, NULL, 0), 1084 + SND_SOC_DAPM_PGA("BST3", RT5640_PWR_ANLG2, 1085 + RT5640_PWR_BST2_BIT, 0, NULL, 0), 1093 1086 /* Input Volume */ 1094 1087 SND_SOC_DAPM_PGA("INL VOL", RT5640_PWR_VOL, 1095 1088 RT5640_PWR_IN_L_BIT, 0, NULL, 0), ··· 1321 1310 static const struct snd_soc_dapm_route rt5640_dapm_routes[] = { 1322 1311 {"IN1P", NULL, "LDO2"}, 1323 1312 {"IN2P", NULL, "LDO2"}, 1313 + {"IN3P", NULL, "LDO2"}, 1324 1314 1325 1315 {"DMIC L1", NULL, "DMIC1"}, 1326 1316 {"DMIC R1", NULL, "DMIC1"}, ··· 1332 1320 {"BST1", NULL, "IN1N"}, 1333 1321 {"BST2", NULL, "IN2P"}, 1334 1322 {"BST2", NULL, "IN2N"}, 1323 + {"BST3", NULL, "IN3P"}, 1324 + {"BST3", NULL, "IN3N"}, 1335 1325 1336 1326 {"INL VOL", NULL, "IN2P"}, 1337 1327 {"INR VOL", NULL, "IN2N"}, 1338 1328 1339 1329 {"RECMIXL", "HPOL Switch", "HPOL"}, 1340 1330 {"RECMIXL", "INL Switch", "INL VOL"}, 1331 + {"RECMIXL", "BST3 Switch", "BST3"}, 1341 1332 {"RECMIXL", "BST2 Switch", "BST2"}, 1342 1333 {"RECMIXL", "BST1 Switch", "BST1"}, 1343 1334 {"RECMIXL", "OUT MIXL Switch", "OUT MIXL"}, 1344 1335 1345 1336 {"RECMIXR", "HPOR Switch", "HPOR"}, 1346 1337 {"RECMIXR", "INR Switch", "INR VOL"}, 1338 + {"RECMIXR", "BST3 Switch", "BST3"}, 1347 1339 {"RECMIXR", "BST2 Switch", "BST2"}, 1348 1340 {"RECMIXR", "BST1 Switch", "BST1"}, 1349 1341 {"RECMIXR", "OUT MIXR Switch", "OUT MIXR"}, ··· 2274 2258 2275 2259 if (rt5640->pdata.in2_diff) 2276 2260 regmap_update_bits(rt5640->regmap, RT5640_IN3_IN4, 2261 + RT5640_IN_DF2, RT5640_IN_DF2); 2262 + 2263 + if (rt5640->pdata.in3_diff) 2264 + regmap_update_bits(rt5640->regmap, RT5640_IN1_IN2, 2277 2265 RT5640_IN_DF2, RT5640_IN_DF2); 2278 2266 2279 2267 rt5640->hp_mute = 1;
+2 -3
sound/soc/samsung/h1940_uda1380.c
··· 26 26 #include <mach/gpio-samsung.h> 27 27 #include "s3c24xx-i2s.h" 28 28 29 - static unsigned int rates[] = { 29 + static const unsigned int rates[] = { 30 30 11025, 31 31 22050, 32 32 44100, 33 33 }; 34 34 35 - static struct snd_pcm_hw_constraint_list hw_rates = { 35 + static const struct snd_pcm_hw_constraint_list hw_rates = { 36 36 .count = ARRAY_SIZE(rates), 37 37 .list = rates, 38 - .mask = 0, 39 38 }; 40 39 41 40 static struct snd_soc_jack hp_jack;
+2 -3
sound/soc/samsung/rx1950_uda1380.c
··· 38 38 static int rx1950_spk_power(struct snd_soc_dapm_widget *w, 39 39 struct snd_kcontrol *kcontrol, int event); 40 40 41 - static unsigned int rates[] = { 41 + static const unsigned int rates[] = { 42 42 16000, 43 43 44100, 44 44 48000, 45 45 }; 46 46 47 - static struct snd_pcm_hw_constraint_list hw_rates = { 47 + static const struct snd_pcm_hw_constraint_list hw_rates = { 48 48 .count = ARRAY_SIZE(rates), 49 49 .list = rates, 50 - .mask = 0, 51 50 }; 52 51 53 52 static struct snd_soc_jack hp_jack;
+1 -1
sound/soc/sh/Kconfig
··· 41 41 select SND_SIMPLE_CARD 42 42 select REGMAP_MMIO 43 43 help 44 - This option enables R-Car SUR/SCU/SSIU/SSI sound support 44 + This option enables R-Car SRU/SCU/SSIU/SSI sound support 45 45 46 46 config SND_SOC_RSRC_CARD 47 47 tristate "Renesas Sampling Rate Convert Sound Card"