diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/pcm512x-i2c.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/pcm512x-spi.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/rt5670.c | 38 | ||||
-rw-r--r-- | sound/soc/codecs/rt5677.c | 195 | ||||
-rw-r--r-- | sound/soc/codecs/wm8750.c | 2 |
5 files changed, 225 insertions, 18 deletions
diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c index d0547fa275fc..dcdfac0ffeb1 100644 --- a/sound/soc/codecs/pcm512x-i2c.c +++ b/sound/soc/codecs/pcm512x-i2c.c | |||
@@ -46,6 +46,8 @@ static int pcm512x_i2c_remove(struct i2c_client *i2c) | |||
46 | static const struct i2c_device_id pcm512x_i2c_id[] = { | 46 | static const struct i2c_device_id pcm512x_i2c_id[] = { |
47 | { "pcm5121", }, | 47 | { "pcm5121", }, |
48 | { "pcm5122", }, | 48 | { "pcm5122", }, |
49 | { "pcm5141", }, | ||
50 | { "pcm5142", }, | ||
49 | { } | 51 | { } |
50 | }; | 52 | }; |
51 | MODULE_DEVICE_TABLE(i2c, pcm512x_i2c_id); | 53 | MODULE_DEVICE_TABLE(i2c, pcm512x_i2c_id); |
@@ -53,6 +55,8 @@ MODULE_DEVICE_TABLE(i2c, pcm512x_i2c_id); | |||
53 | static const struct of_device_id pcm512x_of_match[] = { | 55 | static const struct of_device_id pcm512x_of_match[] = { |
54 | { .compatible = "ti,pcm5121", }, | 56 | { .compatible = "ti,pcm5121", }, |
55 | { .compatible = "ti,pcm5122", }, | 57 | { .compatible = "ti,pcm5122", }, |
58 | { .compatible = "ti,pcm5141", }, | ||
59 | { .compatible = "ti,pcm5142", }, | ||
56 | { } | 60 | { } |
57 | }; | 61 | }; |
58 | MODULE_DEVICE_TABLE(of, pcm512x_of_match); | 62 | MODULE_DEVICE_TABLE(of, pcm512x_of_match); |
diff --git a/sound/soc/codecs/pcm512x-spi.c b/sound/soc/codecs/pcm512x-spi.c index f297058c0038..7b64a9cef704 100644 --- a/sound/soc/codecs/pcm512x-spi.c +++ b/sound/soc/codecs/pcm512x-spi.c | |||
@@ -43,6 +43,8 @@ static int pcm512x_spi_remove(struct spi_device *spi) | |||
43 | static const struct spi_device_id pcm512x_spi_id[] = { | 43 | static const struct spi_device_id pcm512x_spi_id[] = { |
44 | { "pcm5121", }, | 44 | { "pcm5121", }, |
45 | { "pcm5122", }, | 45 | { "pcm5122", }, |
46 | { "pcm5141", }, | ||
47 | { "pcm5142", }, | ||
46 | { }, | 48 | { }, |
47 | }; | 49 | }; |
48 | MODULE_DEVICE_TABLE(spi, pcm512x_spi_id); | 50 | MODULE_DEVICE_TABLE(spi, pcm512x_spi_id); |
@@ -50,6 +52,8 @@ MODULE_DEVICE_TABLE(spi, pcm512x_spi_id); | |||
50 | static const struct of_device_id pcm512x_of_match[] = { | 52 | static const struct of_device_id pcm512x_of_match[] = { |
51 | { .compatible = "ti,pcm5121", }, | 53 | { .compatible = "ti,pcm5121", }, |
52 | { .compatible = "ti,pcm5122", }, | 54 | { .compatible = "ti,pcm5122", }, |
55 | { .compatible = "ti,pcm5141", }, | ||
56 | { .compatible = "ti,pcm5142", }, | ||
53 | { } | 57 | { } |
54 | }; | 58 | }; |
55 | MODULE_DEVICE_TABLE(of, pcm512x_of_match); | 59 | MODULE_DEVICE_TABLE(of, pcm512x_of_match); |
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 8a0833de1665..0a027bc94399 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c | |||
@@ -14,10 +14,12 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/pm_runtime.h> | ||
17 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/acpi.h> | 20 | #include <linux/acpi.h> |
20 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/dmi.h> | ||
21 | #include <sound/core.h> | 23 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
@@ -2188,6 +2190,13 @@ static int rt5670_set_dai_sysclk(struct snd_soc_dai *dai, | |||
2188 | if (freq == rt5670->sysclk && clk_id == rt5670->sysclk_src) | 2190 | if (freq == rt5670->sysclk && clk_id == rt5670->sysclk_src) |
2189 | return 0; | 2191 | return 0; |
2190 | 2192 | ||
2193 | if (rt5670->pdata.jd_mode) { | ||
2194 | if (clk_id == RT5670_SCLK_S_PLL1) | ||
2195 | snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1"); | ||
2196 | else | ||
2197 | snd_soc_dapm_disable_pin(&codec->dapm, "PLL1"); | ||
2198 | snd_soc_dapm_sync(&codec->dapm); | ||
2199 | } | ||
2191 | switch (clk_id) { | 2200 | switch (clk_id) { |
2192 | case RT5670_SCLK_S_MCLK: | 2201 | case RT5670_SCLK_S_MCLK: |
2193 | reg_val |= RT5670_SCLK_SRC_MCLK; | 2202 | reg_val |= RT5670_SCLK_SRC_MCLK; |
@@ -2549,6 +2558,17 @@ static struct acpi_device_id rt5670_acpi_match[] = { | |||
2549 | MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match); | 2558 | MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match); |
2550 | #endif | 2559 | #endif |
2551 | 2560 | ||
2561 | static const struct dmi_system_id dmi_platform_intel_braswell[] = { | ||
2562 | { | ||
2563 | .ident = "Intel Braswell", | ||
2564 | .matches = { | ||
2565 | DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), | ||
2566 | DMI_MATCH(DMI_BOARD_NAME, "Braswell CRB"), | ||
2567 | }, | ||
2568 | }, | ||
2569 | {} | ||
2570 | }; | ||
2571 | |||
2552 | static int rt5670_i2c_probe(struct i2c_client *i2c, | 2572 | static int rt5670_i2c_probe(struct i2c_client *i2c, |
2553 | const struct i2c_device_id *id) | 2573 | const struct i2c_device_id *id) |
2554 | { | 2574 | { |
@@ -2568,6 +2588,12 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, | |||
2568 | if (pdata) | 2588 | if (pdata) |
2569 | rt5670->pdata = *pdata; | 2589 | rt5670->pdata = *pdata; |
2570 | 2590 | ||
2591 | if (dmi_check_system(dmi_platform_intel_braswell)) { | ||
2592 | rt5670->pdata.dmic_en = true; | ||
2593 | rt5670->pdata.dmic1_data_pin = RT5670_DMIC_DATA_IN2P; | ||
2594 | rt5670->pdata.jd_mode = 1; | ||
2595 | } | ||
2596 | |||
2571 | rt5670->regmap = devm_regmap_init_i2c(i2c, &rt5670_regmap); | 2597 | rt5670->regmap = devm_regmap_init_i2c(i2c, &rt5670_regmap); |
2572 | if (IS_ERR(rt5670->regmap)) { | 2598 | if (IS_ERR(rt5670->regmap)) { |
2573 | ret = PTR_ERR(rt5670->regmap); | 2599 | ret = PTR_ERR(rt5670->regmap); |
@@ -2609,6 +2635,10 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, | |||
2609 | } | 2635 | } |
2610 | 2636 | ||
2611 | if (rt5670->pdata.jd_mode) { | 2637 | if (rt5670->pdata.jd_mode) { |
2638 | regmap_update_bits(rt5670->regmap, RT5670_GLB_CLK, | ||
2639 | RT5670_SCLK_SRC_MASK, RT5670_SCLK_SRC_RCCLK); | ||
2640 | rt5670->sysclk = 0; | ||
2641 | rt5670->sysclk_src = RT5670_SCLK_S_RCCLK; | ||
2612 | regmap_update_bits(rt5670->regmap, RT5670_PWR_ANLG1, | 2642 | regmap_update_bits(rt5670->regmap, RT5670_PWR_ANLG1, |
2613 | RT5670_PWR_MB, RT5670_PWR_MB); | 2643 | RT5670_PWR_MB, RT5670_PWR_MB); |
2614 | regmap_update_bits(rt5670->regmap, RT5670_PWR_ANLG2, | 2644 | regmap_update_bits(rt5670->regmap, RT5670_PWR_ANLG2, |
@@ -2716,18 +2746,26 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, | |||
2716 | 2746 | ||
2717 | } | 2747 | } |
2718 | 2748 | ||
2749 | pm_runtime_enable(&i2c->dev); | ||
2750 | pm_request_idle(&i2c->dev); | ||
2751 | |||
2719 | ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5670, | 2752 | ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5670, |
2720 | rt5670_dai, ARRAY_SIZE(rt5670_dai)); | 2753 | rt5670_dai, ARRAY_SIZE(rt5670_dai)); |
2721 | if (ret < 0) | 2754 | if (ret < 0) |
2722 | goto err; | 2755 | goto err; |
2723 | 2756 | ||
2757 | pm_runtime_put(&i2c->dev); | ||
2758 | |||
2724 | return 0; | 2759 | return 0; |
2725 | err: | 2760 | err: |
2761 | pm_runtime_disable(&i2c->dev); | ||
2762 | |||
2726 | return ret; | 2763 | return ret; |
2727 | } | 2764 | } |
2728 | 2765 | ||
2729 | static int rt5670_i2c_remove(struct i2c_client *i2c) | 2766 | static int rt5670_i2c_remove(struct i2c_client *i2c) |
2730 | { | 2767 | { |
2768 | pm_runtime_disable(&i2c->dev); | ||
2731 | snd_soc_unregister_codec(&i2c->dev); | 2769 | snd_soc_unregister_codec(&i2c->dev); |
2732 | 2770 | ||
2733 | return 0; | 2771 | return 0; |
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 918ada9738b0..d27630accf03 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c | |||
@@ -922,6 +922,97 @@ static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, | |||
922 | return 0; | 922 | return 0; |
923 | } | 923 | } |
924 | 924 | ||
925 | static int is_using_asrc(struct snd_soc_dapm_widget *source, | ||
926 | struct snd_soc_dapm_widget *sink) | ||
927 | { | ||
928 | unsigned int reg, shift, val; | ||
929 | |||
930 | if (source->reg == RT5677_ASRC_1) { | ||
931 | switch (source->shift) { | ||
932 | case 12: | ||
933 | reg = RT5677_ASRC_4; | ||
934 | shift = 0; | ||
935 | break; | ||
936 | case 13: | ||
937 | reg = RT5677_ASRC_4; | ||
938 | shift = 4; | ||
939 | break; | ||
940 | case 14: | ||
941 | reg = RT5677_ASRC_4; | ||
942 | shift = 8; | ||
943 | break; | ||
944 | case 15: | ||
945 | reg = RT5677_ASRC_4; | ||
946 | shift = 12; | ||
947 | break; | ||
948 | default: | ||
949 | return 0; | ||
950 | } | ||
951 | } else { | ||
952 | switch (source->shift) { | ||
953 | case 0: | ||
954 | reg = RT5677_ASRC_6; | ||
955 | shift = 8; | ||
956 | break; | ||
957 | case 1: | ||
958 | reg = RT5677_ASRC_6; | ||
959 | shift = 12; | ||
960 | break; | ||
961 | case 2: | ||
962 | reg = RT5677_ASRC_5; | ||
963 | shift = 0; | ||
964 | break; | ||
965 | case 3: | ||
966 | reg = RT5677_ASRC_5; | ||
967 | shift = 4; | ||
968 | break; | ||
969 | case 4: | ||
970 | reg = RT5677_ASRC_5; | ||
971 | shift = 8; | ||
972 | break; | ||
973 | case 5: | ||
974 | reg = RT5677_ASRC_5; | ||
975 | shift = 12; | ||
976 | break; | ||
977 | case 12: | ||
978 | reg = RT5677_ASRC_3; | ||
979 | shift = 0; | ||
980 | break; | ||
981 | case 13: | ||
982 | reg = RT5677_ASRC_3; | ||
983 | shift = 4; | ||
984 | break; | ||
985 | case 14: | ||
986 | reg = RT5677_ASRC_3; | ||
987 | shift = 12; | ||
988 | break; | ||
989 | default: | ||
990 | return 0; | ||
991 | } | ||
992 | } | ||
993 | |||
994 | val = (snd_soc_read(source->codec, reg) >> shift) & 0xf; | ||
995 | switch (val) { | ||
996 | case 1 ... 6: | ||
997 | return 1; | ||
998 | default: | ||
999 | return 0; | ||
1000 | } | ||
1001 | |||
1002 | } | ||
1003 | |||
1004 | static int can_use_asrc(struct snd_soc_dapm_widget *source, | ||
1005 | struct snd_soc_dapm_widget *sink) | ||
1006 | { | ||
1007 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); | ||
1008 | struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); | ||
1009 | |||
1010 | if (rt5677->sysclk > rt5677->lrck[RT5677_AIF1] * 384) | ||
1011 | return 1; | ||
1012 | |||
1013 | return 0; | ||
1014 | } | ||
1015 | |||
925 | /* Digital Mixer */ | 1016 | /* Digital Mixer */ |
926 | static const struct snd_kcontrol_new rt5677_sto1_adc_l_mix[] = { | 1017 | static const struct snd_kcontrol_new rt5677_sto1_adc_l_mix[] = { |
927 | SOC_DAPM_SINGLE("ADC1 Switch", RT5677_STO1_ADC_MIXER, | 1018 | SOC_DAPM_SINGLE("ADC1 Switch", RT5677_STO1_ADC_MIXER, |
@@ -2226,6 +2317,45 @@ static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = { | |||
2226 | 0, rt5677_set_pll2_event, SND_SOC_DAPM_PRE_PMU | | 2317 | 0, rt5677_set_pll2_event, SND_SOC_DAPM_PRE_PMU | |
2227 | SND_SOC_DAPM_POST_PMU), | 2318 | SND_SOC_DAPM_POST_PMU), |
2228 | 2319 | ||
2320 | /* ASRC */ | ||
2321 | SND_SOC_DAPM_SUPPLY_S("I2S1 ASRC", 1, RT5677_ASRC_1, 0, 0, NULL, 0), | ||
2322 | SND_SOC_DAPM_SUPPLY_S("I2S2 ASRC", 1, RT5677_ASRC_1, 1, 0, NULL, 0), | ||
2323 | SND_SOC_DAPM_SUPPLY_S("I2S3 ASRC", 1, RT5677_ASRC_1, 2, 0, NULL, 0), | ||
2324 | SND_SOC_DAPM_SUPPLY_S("I2S4 ASRC", 1, RT5677_ASRC_1, 3, 0, NULL, 0), | ||
2325 | SND_SOC_DAPM_SUPPLY_S("DAC STO ASRC", 1, RT5677_ASRC_2, 14, 0, NULL, 0), | ||
2326 | SND_SOC_DAPM_SUPPLY_S("DAC MONO2 L ASRC", 1, RT5677_ASRC_2, 13, 0, NULL, | ||
2327 | 0), | ||
2328 | SND_SOC_DAPM_SUPPLY_S("DAC MONO2 R ASRC", 1, RT5677_ASRC_2, 12, 0, NULL, | ||
2329 | 0), | ||
2330 | SND_SOC_DAPM_SUPPLY_S("DAC MONO3 L ASRC", 1, RT5677_ASRC_1, 15, 0, NULL, | ||
2331 | 0), | ||
2332 | SND_SOC_DAPM_SUPPLY_S("DAC MONO3 R ASRC", 1, RT5677_ASRC_1, 14, 0, NULL, | ||
2333 | 0), | ||
2334 | SND_SOC_DAPM_SUPPLY_S("DAC MONO4 L ASRC", 1, RT5677_ASRC_1, 13, 0, NULL, | ||
2335 | 0), | ||
2336 | SND_SOC_DAPM_SUPPLY_S("DAC MONO4 R ASRC", 1, RT5677_ASRC_1, 12, 0, NULL, | ||
2337 | 0), | ||
2338 | SND_SOC_DAPM_SUPPLY_S("DMIC STO1 ASRC", 1, RT5677_ASRC_2, 11, 0, NULL, | ||
2339 | 0), | ||
2340 | SND_SOC_DAPM_SUPPLY_S("DMIC STO2 ASRC", 1, RT5677_ASRC_2, 10, 0, NULL, | ||
2341 | 0), | ||
2342 | SND_SOC_DAPM_SUPPLY_S("DMIC STO3 ASRC", 1, RT5677_ASRC_2, 9, 0, NULL, | ||
2343 | 0), | ||
2344 | SND_SOC_DAPM_SUPPLY_S("DMIC STO4 ASRC", 1, RT5677_ASRC_2, 8, 0, NULL, | ||
2345 | 0), | ||
2346 | SND_SOC_DAPM_SUPPLY_S("DMIC MONO L ASRC", 1, RT5677_ASRC_2, 7, 0, NULL, | ||
2347 | 0), | ||
2348 | SND_SOC_DAPM_SUPPLY_S("DMIC MONO R ASRC", 1, RT5677_ASRC_2, 6, 0, NULL, | ||
2349 | 0), | ||
2350 | SND_SOC_DAPM_SUPPLY_S("ADC STO1 ASRC", 1, RT5677_ASRC_2, 5, 0, NULL, 0), | ||
2351 | SND_SOC_DAPM_SUPPLY_S("ADC STO2 ASRC", 1, RT5677_ASRC_2, 4, 0, NULL, 0), | ||
2352 | SND_SOC_DAPM_SUPPLY_S("ADC STO3 ASRC", 1, RT5677_ASRC_2, 3, 0, NULL, 0), | ||
2353 | SND_SOC_DAPM_SUPPLY_S("ADC STO4 ASRC", 1, RT5677_ASRC_2, 2, 0, NULL, 0), | ||
2354 | SND_SOC_DAPM_SUPPLY_S("ADC MONO L ASRC", 1, RT5677_ASRC_2, 1, 0, NULL, | ||
2355 | 0), | ||
2356 | SND_SOC_DAPM_SUPPLY_S("ADC MONO R ASRC", 1, RT5677_ASRC_2, 0, 0, NULL, | ||
2357 | 0), | ||
2358 | |||
2229 | /* Input Side */ | 2359 | /* Input Side */ |
2230 | /* micbias */ | 2360 | /* micbias */ |
2231 | SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5677_PWR_ANLG2, RT5677_PWR_MB1_BIT, | 2361 | SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5677_PWR_ANLG2, RT5677_PWR_MB1_BIT, |
@@ -2656,10 +2786,18 @@ static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = { | |||
2656 | /* DAC Mixer */ | 2786 | /* DAC Mixer */ |
2657 | SND_SOC_DAPM_SUPPLY("dac stereo1 filter", RT5677_PWR_DIG2, | 2787 | SND_SOC_DAPM_SUPPLY("dac stereo1 filter", RT5677_PWR_DIG2, |
2658 | RT5677_PWR_DAC_S1F_BIT, 0, NULL, 0), | 2788 | RT5677_PWR_DAC_S1F_BIT, 0, NULL, 0), |
2659 | SND_SOC_DAPM_SUPPLY("dac mono left filter", RT5677_PWR_DIG2, | 2789 | SND_SOC_DAPM_SUPPLY("dac mono2 left filter", RT5677_PWR_DIG2, |
2660 | RT5677_PWR_DAC_M2F_L_BIT, 0, NULL, 0), | 2790 | RT5677_PWR_DAC_M2F_L_BIT, 0, NULL, 0), |
2661 | SND_SOC_DAPM_SUPPLY("dac mono right filter", RT5677_PWR_DIG2, | 2791 | SND_SOC_DAPM_SUPPLY("dac mono2 right filter", RT5677_PWR_DIG2, |
2662 | RT5677_PWR_DAC_M2F_R_BIT, 0, NULL, 0), | 2792 | RT5677_PWR_DAC_M2F_R_BIT, 0, NULL, 0), |
2793 | SND_SOC_DAPM_SUPPLY("dac mono3 left filter", RT5677_PWR_DIG2, | ||
2794 | RT5677_PWR_DAC_M3F_L_BIT, 0, NULL, 0), | ||
2795 | SND_SOC_DAPM_SUPPLY("dac mono3 right filter", RT5677_PWR_DIG2, | ||
2796 | RT5677_PWR_DAC_M3F_R_BIT, 0, NULL, 0), | ||
2797 | SND_SOC_DAPM_SUPPLY("dac mono4 left filter", RT5677_PWR_DIG2, | ||
2798 | RT5677_PWR_DAC_M4F_L_BIT, 0, NULL, 0), | ||
2799 | SND_SOC_DAPM_SUPPLY("dac mono4 right filter", RT5677_PWR_DIG2, | ||
2800 | RT5677_PWR_DAC_M4F_R_BIT, 0, NULL, 0), | ||
2663 | 2801 | ||
2664 | SND_SOC_DAPM_MIXER("Stereo DAC MIXL", SND_SOC_NOPM, 0, 0, | 2802 | SND_SOC_DAPM_MIXER("Stereo DAC MIXL", SND_SOC_NOPM, 0, 0, |
2665 | rt5677_sto1_dac_l_mix, ARRAY_SIZE(rt5677_sto1_dac_l_mix)), | 2803 | rt5677_sto1_dac_l_mix, ARRAY_SIZE(rt5677_sto1_dac_l_mix)), |
@@ -2732,6 +2870,31 @@ static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = { | |||
2732 | }; | 2870 | }; |
2733 | 2871 | ||
2734 | static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | 2872 | static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { |
2873 | { "Stereo1 DMIC Mux", NULL, "DMIC STO1 ASRC", can_use_asrc }, | ||
2874 | { "Stereo2 DMIC Mux", NULL, "DMIC STO2 ASRC", can_use_asrc }, | ||
2875 | { "Stereo3 DMIC Mux", NULL, "DMIC STO3 ASRC", can_use_asrc }, | ||
2876 | { "Stereo4 DMIC Mux", NULL, "DMIC STO4 ASRC", can_use_asrc }, | ||
2877 | { "Mono DMIC L Mux", NULL, "DMIC MONO L ASRC", can_use_asrc }, | ||
2878 | { "Mono DMIC R Mux", NULL, "DMIC MONO R ASRC", can_use_asrc }, | ||
2879 | { "I2S1", NULL, "I2S1 ASRC", can_use_asrc}, | ||
2880 | { "I2S2", NULL, "I2S2 ASRC", can_use_asrc}, | ||
2881 | { "I2S3", NULL, "I2S3 ASRC", can_use_asrc}, | ||
2882 | { "I2S4", NULL, "I2S4 ASRC", can_use_asrc}, | ||
2883 | |||
2884 | { "dac stereo1 filter", NULL, "DAC STO ASRC", is_using_asrc }, | ||
2885 | { "dac mono2 left filter", NULL, "DAC MONO2 L ASRC", is_using_asrc }, | ||
2886 | { "dac mono2 right filter", NULL, "DAC MONO2 R ASRC", is_using_asrc }, | ||
2887 | { "dac mono3 left filter", NULL, "DAC MONO3 L ASRC", is_using_asrc }, | ||
2888 | { "dac mono3 right filter", NULL, "DAC MONO3 R ASRC", is_using_asrc }, | ||
2889 | { "dac mono4 left filter", NULL, "DAC MONO4 L ASRC", is_using_asrc }, | ||
2890 | { "dac mono4 right filter", NULL, "DAC MONO4 R ASRC", is_using_asrc }, | ||
2891 | { "adc stereo1 filter", NULL, "ADC STO1 ASRC", is_using_asrc }, | ||
2892 | { "adc stereo2 filter", NULL, "ADC STO2 ASRC", is_using_asrc }, | ||
2893 | { "adc stereo3 filter", NULL, "ADC STO3 ASRC", is_using_asrc }, | ||
2894 | { "adc stereo4 filter", NULL, "ADC STO4 ASRC", is_using_asrc }, | ||
2895 | { "adc mono left filter", NULL, "ADC MONO L ASRC", is_using_asrc }, | ||
2896 | { "adc mono right filter", NULL, "ADC MONO R ASRC", is_using_asrc }, | ||
2897 | |||
2735 | { "DMIC1", NULL, "DMIC L1" }, | 2898 | { "DMIC1", NULL, "DMIC L1" }, |
2736 | { "DMIC1", NULL, "DMIC R1" }, | 2899 | { "DMIC1", NULL, "DMIC R1" }, |
2737 | { "DMIC2", NULL, "DMIC L2" }, | 2900 | { "DMIC2", NULL, "DMIC L2" }, |
@@ -2862,8 +3025,6 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
2862 | 3025 | ||
2863 | { "Stereo1 ADC MIXL", NULL, "Sto1 ADC MIXL" }, | 3026 | { "Stereo1 ADC MIXL", NULL, "Sto1 ADC MIXL" }, |
2864 | { "Stereo1 ADC MIXL", NULL, "adc stereo1 filter" }, | 3027 | { "Stereo1 ADC MIXL", NULL, "adc stereo1 filter" }, |
2865 | { "adc stereo1 filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
2866 | |||
2867 | { "Stereo1 ADC MIXR", NULL, "Sto1 ADC MIXR" }, | 3028 | { "Stereo1 ADC MIXR", NULL, "Sto1 ADC MIXR" }, |
2868 | { "Stereo1 ADC MIXR", NULL, "adc stereo1 filter" }, | 3029 | { "Stereo1 ADC MIXR", NULL, "adc stereo1 filter" }, |
2869 | { "adc stereo1 filter", NULL, "PLL1", is_sys_clk_from_pll }, | 3030 | { "adc stereo1 filter", NULL, "PLL1", is_sys_clk_from_pll }, |
@@ -2884,8 +3045,6 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
2884 | 3045 | ||
2885 | { "Stereo2 ADC MIXL", NULL, "Stereo2 ADC LR Mux" }, | 3046 | { "Stereo2 ADC MIXL", NULL, "Stereo2 ADC LR Mux" }, |
2886 | { "Stereo2 ADC MIXL", NULL, "adc stereo2 filter" }, | 3047 | { "Stereo2 ADC MIXL", NULL, "adc stereo2 filter" }, |
2887 | { "adc stereo2 filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
2888 | |||
2889 | { "Stereo2 ADC MIXR", NULL, "Sto2 ADC MIXR" }, | 3048 | { "Stereo2 ADC MIXR", NULL, "Sto2 ADC MIXR" }, |
2890 | { "Stereo2 ADC MIXR", NULL, "adc stereo2 filter" }, | 3049 | { "Stereo2 ADC MIXR", NULL, "adc stereo2 filter" }, |
2891 | { "adc stereo2 filter", NULL, "PLL1", is_sys_clk_from_pll }, | 3050 | { "adc stereo2 filter", NULL, "PLL1", is_sys_clk_from_pll }, |
@@ -2900,8 +3059,6 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
2900 | 3059 | ||
2901 | { "Stereo3 ADC MIXL", NULL, "Sto3 ADC MIXL" }, | 3060 | { "Stereo3 ADC MIXL", NULL, "Sto3 ADC MIXL" }, |
2902 | { "Stereo3 ADC MIXL", NULL, "adc stereo3 filter" }, | 3061 | { "Stereo3 ADC MIXL", NULL, "adc stereo3 filter" }, |
2903 | { "adc stereo3 filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
2904 | |||
2905 | { "Stereo3 ADC MIXR", NULL, "Sto3 ADC MIXR" }, | 3062 | { "Stereo3 ADC MIXR", NULL, "Sto3 ADC MIXR" }, |
2906 | { "Stereo3 ADC MIXR", NULL, "adc stereo3 filter" }, | 3063 | { "Stereo3 ADC MIXR", NULL, "adc stereo3 filter" }, |
2907 | { "adc stereo3 filter", NULL, "PLL1", is_sys_clk_from_pll }, | 3064 | { "adc stereo3 filter", NULL, "PLL1", is_sys_clk_from_pll }, |
@@ -2916,8 +3073,6 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
2916 | 3073 | ||
2917 | { "Stereo4 ADC MIXL", NULL, "Sto4 ADC MIXL" }, | 3074 | { "Stereo4 ADC MIXL", NULL, "Sto4 ADC MIXL" }, |
2918 | { "Stereo4 ADC MIXL", NULL, "adc stereo4 filter" }, | 3075 | { "Stereo4 ADC MIXL", NULL, "adc stereo4 filter" }, |
2919 | { "adc stereo4 filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
2920 | |||
2921 | { "Stereo4 ADC MIXR", NULL, "Sto4 ADC MIXR" }, | 3076 | { "Stereo4 ADC MIXR", NULL, "Sto4 ADC MIXR" }, |
2922 | { "Stereo4 ADC MIXR", NULL, "adc stereo4 filter" }, | 3077 | { "Stereo4 ADC MIXR", NULL, "adc stereo4 filter" }, |
2923 | { "adc stereo4 filter", NULL, "PLL1", is_sys_clk_from_pll }, | 3078 | { "adc stereo4 filter", NULL, "PLL1", is_sys_clk_from_pll }, |
@@ -3466,10 +3621,8 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
3466 | 3621 | ||
3467 | { "DAC1 MIXL", "Stereo ADC Switch", "ADDA1 Mux" }, | 3622 | { "DAC1 MIXL", "Stereo ADC Switch", "ADDA1 Mux" }, |
3468 | { "DAC1 MIXL", "DAC1 Switch", "DAC1 Mux" }, | 3623 | { "DAC1 MIXL", "DAC1 Switch", "DAC1 Mux" }, |
3469 | { "DAC1 MIXL", NULL, "dac stereo1 filter" }, | ||
3470 | { "DAC1 MIXR", "Stereo ADC Switch", "ADDA1 Mux" }, | 3624 | { "DAC1 MIXR", "Stereo ADC Switch", "ADDA1 Mux" }, |
3471 | { "DAC1 MIXR", "DAC1 Switch", "DAC1 Mux" }, | 3625 | { "DAC1 MIXR", "DAC1 Switch", "DAC1 Mux" }, |
3472 | { "DAC1 MIXR", NULL, "dac stereo1 filter" }, | ||
3473 | 3626 | ||
3474 | { "DAC1 FS", NULL, "DAC1 MIXL" }, | 3627 | { "DAC1 FS", NULL, "DAC1 MIXL" }, |
3475 | { "DAC1 FS", NULL, "DAC1 MIXR" }, | 3628 | { "DAC1 FS", NULL, "DAC1 MIXR" }, |
@@ -3536,35 +3689,46 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
3536 | { "Stereo DAC MIXR", "DAC2 R Switch", "DAC2 R Mux" }, | 3689 | { "Stereo DAC MIXR", "DAC2 R Switch", "DAC2 R Mux" }, |
3537 | { "Stereo DAC MIXR", "DAC1 L Switch", "DAC1 MIXL" }, | 3690 | { "Stereo DAC MIXR", "DAC1 L Switch", "DAC1 MIXL" }, |
3538 | { "Stereo DAC MIXR", NULL, "dac stereo1 filter" }, | 3691 | { "Stereo DAC MIXR", NULL, "dac stereo1 filter" }, |
3692 | { "dac stereo1 filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3539 | 3693 | ||
3540 | { "Mono DAC MIXL", "ST L Switch", "Sidetone Mux" }, | 3694 | { "Mono DAC MIXL", "ST L Switch", "Sidetone Mux" }, |
3541 | { "Mono DAC MIXL", "DAC1 L Switch", "DAC1 MIXL" }, | 3695 | { "Mono DAC MIXL", "DAC1 L Switch", "DAC1 MIXL" }, |
3542 | { "Mono DAC MIXL", "DAC2 L Switch", "DAC2 L Mux" }, | 3696 | { "Mono DAC MIXL", "DAC2 L Switch", "DAC2 L Mux" }, |
3543 | { "Mono DAC MIXL", "DAC2 R Switch", "DAC2 R Mux" }, | 3697 | { "Mono DAC MIXL", "DAC2 R Switch", "DAC2 R Mux" }, |
3544 | { "Mono DAC MIXL", NULL, "dac mono left filter" }, | 3698 | { "Mono DAC MIXL", NULL, "dac mono2 left filter" }, |
3699 | { "dac mono2 left filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3545 | { "Mono DAC MIXR", "ST R Switch", "Sidetone Mux" }, | 3700 | { "Mono DAC MIXR", "ST R Switch", "Sidetone Mux" }, |
3546 | { "Mono DAC MIXR", "DAC1 R Switch", "DAC1 MIXR" }, | 3701 | { "Mono DAC MIXR", "DAC1 R Switch", "DAC1 MIXR" }, |
3547 | { "Mono DAC MIXR", "DAC2 R Switch", "DAC2 R Mux" }, | 3702 | { "Mono DAC MIXR", "DAC2 R Switch", "DAC2 R Mux" }, |
3548 | { "Mono DAC MIXR", "DAC2 L Switch", "DAC2 L Mux" }, | 3703 | { "Mono DAC MIXR", "DAC2 L Switch", "DAC2 L Mux" }, |
3549 | { "Mono DAC MIXR", NULL, "dac mono right filter" }, | 3704 | { "Mono DAC MIXR", NULL, "dac mono2 right filter" }, |
3705 | { "dac mono2 right filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3550 | 3706 | ||
3551 | { "DD1 MIXL", "Sto DAC Mix L Switch", "Stereo DAC MIXL" }, | 3707 | { "DD1 MIXL", "Sto DAC Mix L Switch", "Stereo DAC MIXL" }, |
3552 | { "DD1 MIXL", "Mono DAC Mix L Switch", "Mono DAC MIXL" }, | 3708 | { "DD1 MIXL", "Mono DAC Mix L Switch", "Mono DAC MIXL" }, |
3553 | { "DD1 MIXL", "DAC3 L Switch", "DAC3 L Mux" }, | 3709 | { "DD1 MIXL", "DAC3 L Switch", "DAC3 L Mux" }, |
3554 | { "DD1 MIXL", "DAC3 R Switch", "DAC3 R Mux" }, | 3710 | { "DD1 MIXL", "DAC3 R Switch", "DAC3 R Mux" }, |
3711 | { "DD1 MIXL", NULL, "dac mono3 left filter" }, | ||
3712 | { "dac mono3 left filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3555 | { "DD1 MIXR", "Sto DAC Mix R Switch", "Stereo DAC MIXR" }, | 3713 | { "DD1 MIXR", "Sto DAC Mix R Switch", "Stereo DAC MIXR" }, |
3556 | { "DD1 MIXR", "Mono DAC Mix R Switch", "Mono DAC MIXR" }, | 3714 | { "DD1 MIXR", "Mono DAC Mix R Switch", "Mono DAC MIXR" }, |
3557 | { "DD1 MIXR", "DAC3 L Switch", "DAC3 L Mux" }, | 3715 | { "DD1 MIXR", "DAC3 L Switch", "DAC3 L Mux" }, |
3558 | { "DD1 MIXR", "DAC3 R Switch", "DAC3 R Mux" }, | 3716 | { "DD1 MIXR", "DAC3 R Switch", "DAC3 R Mux" }, |
3717 | { "DD1 MIXR", NULL, "dac mono3 right filter" }, | ||
3718 | { "dac mono3 right filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3559 | 3719 | ||
3560 | { "DD2 MIXL", "Sto DAC Mix L Switch", "Stereo DAC MIXL" }, | 3720 | { "DD2 MIXL", "Sto DAC Mix L Switch", "Stereo DAC MIXL" }, |
3561 | { "DD2 MIXL", "Mono DAC Mix L Switch", "Mono DAC MIXL" }, | 3721 | { "DD2 MIXL", "Mono DAC Mix L Switch", "Mono DAC MIXL" }, |
3562 | { "DD2 MIXL", "DAC4 L Switch", "DAC4 L Mux" }, | 3722 | { "DD2 MIXL", "DAC4 L Switch", "DAC4 L Mux" }, |
3563 | { "DD2 MIXL", "DAC4 R Switch", "DAC4 R Mux" }, | 3723 | { "DD2 MIXL", "DAC4 R Switch", "DAC4 R Mux" }, |
3724 | { "DD2 MIXL", NULL, "dac mono4 left filter" }, | ||
3725 | { "dac mono4 left filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3564 | { "DD2 MIXR", "Sto DAC Mix R Switch", "Stereo DAC MIXR" }, | 3726 | { "DD2 MIXR", "Sto DAC Mix R Switch", "Stereo DAC MIXR" }, |
3565 | { "DD2 MIXR", "Mono DAC Mix R Switch", "Mono DAC MIXR" }, | 3727 | { "DD2 MIXR", "Mono DAC Mix R Switch", "Mono DAC MIXR" }, |
3566 | { "DD2 MIXR", "DAC4 L Switch", "DAC4 L Mux" }, | 3728 | { "DD2 MIXR", "DAC4 L Switch", "DAC4 L Mux" }, |
3567 | { "DD2 MIXR", "DAC4 R Switch", "DAC4 R Mux" }, | 3729 | { "DD2 MIXR", "DAC4 R Switch", "DAC4 R Mux" }, |
3730 | { "DD2 MIXR", NULL, "dac mono4 right filter" }, | ||
3731 | { "dac mono4 right filter", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3568 | 3732 | ||
3569 | { "Stereo DAC MIX", NULL, "Stereo DAC MIXL" }, | 3733 | { "Stereo DAC MIX", NULL, "Stereo DAC MIXL" }, |
3570 | { "Stereo DAC MIX", NULL, "Stereo DAC MIXR" }, | 3734 | { "Stereo DAC MIX", NULL, "Stereo DAC MIXR" }, |
@@ -3586,11 +3750,8 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = { | |||
3586 | { "DAC3 SRC Mux", "DD MIX2L", "DD2 MIXL" }, | 3750 | { "DAC3 SRC Mux", "DD MIX2L", "DD2 MIXL" }, |
3587 | 3751 | ||
3588 | { "DAC 1", NULL, "DAC12 SRC Mux" }, | 3752 | { "DAC 1", NULL, "DAC12 SRC Mux" }, |
3589 | { "DAC 1", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3590 | { "DAC 2", NULL, "DAC12 SRC Mux" }, | 3753 | { "DAC 2", NULL, "DAC12 SRC Mux" }, |
3591 | { "DAC 2", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3592 | { "DAC 3", NULL, "DAC3 SRC Mux" }, | 3754 | { "DAC 3", NULL, "DAC3 SRC Mux" }, |
3593 | { "DAC 3", NULL, "PLL1", is_sys_clk_from_pll }, | ||
3594 | 3755 | ||
3595 | { "PDM1 L Mux", "STO1 DAC MIX", "Stereo DAC MIXL" }, | 3756 | { "PDM1 L Mux", "STO1 DAC MIX", "Stereo DAC MIXL" }, |
3596 | { "PDM1 L Mux", "MONO DAC MIX", "Mono DAC MIXL" }, | 3757 | { "PDM1 L Mux", "MONO DAC MIX", "Mono DAC MIXL" }, |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index f6847fdd6ddd..eb0a1644ba11 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -323,7 +323,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = { | |||
323 | SND_SOC_DAPM_OUTPUT("ROUT2"), | 323 | SND_SOC_DAPM_OUTPUT("ROUT2"), |
324 | SND_SOC_DAPM_OUTPUT("MONO1"), | 324 | SND_SOC_DAPM_OUTPUT("MONO1"), |
325 | SND_SOC_DAPM_OUTPUT("OUT3"), | 325 | SND_SOC_DAPM_OUTPUT("OUT3"), |
326 | SND_SOC_DAPM_OUTPUT("VREF"), | 326 | SND_SOC_DAPM_VMID("VREF"), |
327 | 327 | ||
328 | SND_SOC_DAPM_INPUT("LINPUT1"), | 328 | SND_SOC_DAPM_INPUT("LINPUT1"), |
329 | SND_SOC_DAPM_INPUT("LINPUT2"), | 329 | SND_SOC_DAPM_INPUT("LINPUT2"), |