Loading Documentation/devicetree/bindings/sound/samsung,tm2-audio.txt 0 → 100644 +38 −0 Original line number Diff line number Diff line Samsung Exynos5433 TM2(E) audio complex with WM5110 codec Required properties: - compatible : "samsung,tm2-audio" - model : the user-visible name of this sound complex - audio-codec : the phandle of the wm5110 audio codec node, as described in ../mfd/arizona.txt - i2s-controller : the phandle of the I2S controller - audio-amplifier : the phandle of the MAX98504 amplifier - samsung,audio-routing : a list of the connections between audio components; each entry is a pair of strings, the first being the connection's sink, the second being the connection's source; valid names for sources and sinks are the WM5110's and MAX98504's pins and the jacks on the board: HP, SPK, Main Mic, Sub Mic, Third Mic, Headset Mic - mic-bias-gpios : GPIO pin that enables the Main Mic bias regulator Example: sound { compatible = "samsung,tm2-audio"; audio-codec = <&wm5110>; i2s-controller = <&i2s0>; audio-amplifier = <&max98504>; mic-bias-gpios = <&gpr3 2 0>; model = "wm5110"; samsung,audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R", "SPK", "SPKOUT", "SPKOUT", "HPOUT2L", "SPKOUT", "HPOUT2R", "Main Mic", "MICBIAS2", "IN1R", "Main Mic"; }; include/sound/simple_card_utils.h +4 −4 Original line number Diff line number Diff line /* * simple_card_core.h * simple_card_utils.h * * Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> * Loading @@ -7,8 +7,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef __SIMPLE_CARD_CORE_H #define __SIMPLE_CARD_CORE_H #ifndef __SIMPLE_CARD_UTILS_H #define __SIMPLE_CARD_UTILS_H #include <sound/soc.h> Loading Loading @@ -68,4 +68,4 @@ void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link, int asoc_simple_card_clean_reference(struct snd_soc_card *card); #endif /* __SIMPLE_CARD_CORE_H */ #endif /* __SIMPLE_CARD_UTILS_H */ sound/soc/codecs/rt5665.c +5 −6 Original line number Diff line number Diff line Loading @@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("HP Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); return; goto out_unlock; } count++; Loading @@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("MONO Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); return; goto out_unlock; } count++; Loading @@ -4621,6 +4621,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); out_unlock: mutex_unlock(&rt5665->calibrate_mutex); } Loading Loading @@ -4676,11 +4677,9 @@ static int rt5665_i2c_probe(struct i2c_client *i2c, } if (gpio_is_valid(rt5665->pdata.ldo1_en)) { if (devm_gpio_request(&i2c->dev, rt5665->pdata.ldo1_en, "rt5665")) if (devm_gpio_request_one(&i2c->dev, rt5665->pdata.ldo1_en, GPIOF_OUT_INIT_HIGH, "rt5665")) dev_err(&i2c->dev, "Fail gpio_request gpio_ldo\n"); else if (gpio_direction_output(rt5665->pdata.ldo1_en, 1)) dev_err(&i2c->dev, "Fail gpio_direction gpio_ldo\n"); } /* Sleep for 300 ms miniumum */ Loading sound/soc/codecs/rt5670.c +13 −3 Original line number Diff line number Diff line Loading @@ -2618,7 +2618,7 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec, RT5670_OSW_L_DIS | RT5670_OSW_R_DIS); snd_soc_update_bits(codec, RT5670_DIG_MISC, 0x1, 0x1); snd_soc_update_bits(codec, RT5670_PWR_ANLG1, RT5670_LDO_SEL_MASK, 0x3); RT5670_LDO_SEL_MASK, 0x5); } break; case SND_SOC_BIAS_STANDBY: Loading @@ -2626,7 +2626,7 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec, RT5670_PWR_VREF1 | RT5670_PWR_VREF2 | RT5670_PWR_FV1 | RT5670_PWR_FV2, 0); snd_soc_update_bits(codec, RT5670_PWR_ANLG1, RT5670_LDO_SEL_MASK, 0x1); RT5670_LDO_SEL_MASK, 0x3); break; case SND_SOC_BIAS_OFF: if (rt5670->pdata.jd_mode) Loading Loading @@ -2813,6 +2813,7 @@ MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id); #ifdef CONFIG_ACPI static const struct acpi_device_id rt5670_acpi_match[] = { { "10EC5670", 0}, { "10EC5672", 0}, { }, }; MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match); Loading @@ -2826,6 +2827,13 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = { DMI_MATCH(DMI_BOARD_NAME, "Braswell CRB"), }, }, { .ident = "Dell Wyse 3040", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Wyse 3040"), }, }, {} }; Loading Loading @@ -2889,6 +2897,9 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, if (ret != 0) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, RT5670_MCLK_DET, RT5670_MCLK_DET); if (rt5670->pdata.in2_diff) regmap_update_bits(rt5670->regmap, RT5670_IN2, RT5670_IN_DF2, RT5670_IN_DF2); Loading @@ -2903,7 +2914,6 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, RT5670_GP1_PIN_MASK, RT5670_GP1_PIN_IRQ); regmap_update_bits(rt5670->regmap, RT5670_GPIO_CTRL2, RT5670_GP1_PF_MASK, RT5670_GP1_PF_OUT); regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, 0x8, 0x8); } if (rt5670->pdata.jd_mode) { Loading sound/soc/codecs/rt5670.h +1 −0 Original line number Diff line number Diff line Loading @@ -1914,6 +1914,7 @@ enum { #define RT5670_IF1_ADC1_IN2_SFT 11 #define RT5670_IF1_ADC2_IN1_SEL (0x1 << 10) #define RT5670_IF1_ADC2_IN1_SFT 10 #define RT5670_MCLK_DET (0x1 << 3) /* General Control2 (0xfb) */ #define RT5670_RXDC_SRC_MASK (0x1 << 7) Loading Loading
Documentation/devicetree/bindings/sound/samsung,tm2-audio.txt 0 → 100644 +38 −0 Original line number Diff line number Diff line Samsung Exynos5433 TM2(E) audio complex with WM5110 codec Required properties: - compatible : "samsung,tm2-audio" - model : the user-visible name of this sound complex - audio-codec : the phandle of the wm5110 audio codec node, as described in ../mfd/arizona.txt - i2s-controller : the phandle of the I2S controller - audio-amplifier : the phandle of the MAX98504 amplifier - samsung,audio-routing : a list of the connections between audio components; each entry is a pair of strings, the first being the connection's sink, the second being the connection's source; valid names for sources and sinks are the WM5110's and MAX98504's pins and the jacks on the board: HP, SPK, Main Mic, Sub Mic, Third Mic, Headset Mic - mic-bias-gpios : GPIO pin that enables the Main Mic bias regulator Example: sound { compatible = "samsung,tm2-audio"; audio-codec = <&wm5110>; i2s-controller = <&i2s0>; audio-amplifier = <&max98504>; mic-bias-gpios = <&gpr3 2 0>; model = "wm5110"; samsung,audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R", "SPK", "SPKOUT", "SPKOUT", "HPOUT2L", "SPKOUT", "HPOUT2R", "Main Mic", "MICBIAS2", "IN1R", "Main Mic"; };
include/sound/simple_card_utils.h +4 −4 Original line number Diff line number Diff line /* * simple_card_core.h * simple_card_utils.h * * Copyright (c) 2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> * Loading @@ -7,8 +7,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef __SIMPLE_CARD_CORE_H #define __SIMPLE_CARD_CORE_H #ifndef __SIMPLE_CARD_UTILS_H #define __SIMPLE_CARD_UTILS_H #include <sound/soc.h> Loading Loading @@ -68,4 +68,4 @@ void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link, int asoc_simple_card_clean_reference(struct snd_soc_card *card); #endif /* __SIMPLE_CARD_CORE_H */ #endif /* __SIMPLE_CARD_UTILS_H */
sound/soc/codecs/rt5665.c +5 −6 Original line number Diff line number Diff line Loading @@ -4587,7 +4587,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("HP Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); return; goto out_unlock; } count++; Loading @@ -4606,7 +4606,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) pr_err("MONO Calibration Failure\n"); regmap_write(rt5665->regmap, RT5665_RESET, 0); regcache_cache_bypass(rt5665->regmap, false); return; goto out_unlock; } count++; Loading @@ -4621,6 +4621,7 @@ static void rt5665_calibrate(struct rt5665_priv *rt5665) regmap_write(rt5665->regmap, RT5665_BIAS_CUR_CTRL_8, 0xa602); regmap_write(rt5665->regmap, RT5665_ASRC_8, 0x0120); out_unlock: mutex_unlock(&rt5665->calibrate_mutex); } Loading Loading @@ -4676,11 +4677,9 @@ static int rt5665_i2c_probe(struct i2c_client *i2c, } if (gpio_is_valid(rt5665->pdata.ldo1_en)) { if (devm_gpio_request(&i2c->dev, rt5665->pdata.ldo1_en, "rt5665")) if (devm_gpio_request_one(&i2c->dev, rt5665->pdata.ldo1_en, GPIOF_OUT_INIT_HIGH, "rt5665")) dev_err(&i2c->dev, "Fail gpio_request gpio_ldo\n"); else if (gpio_direction_output(rt5665->pdata.ldo1_en, 1)) dev_err(&i2c->dev, "Fail gpio_direction gpio_ldo\n"); } /* Sleep for 300 ms miniumum */ Loading
sound/soc/codecs/rt5670.c +13 −3 Original line number Diff line number Diff line Loading @@ -2618,7 +2618,7 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec, RT5670_OSW_L_DIS | RT5670_OSW_R_DIS); snd_soc_update_bits(codec, RT5670_DIG_MISC, 0x1, 0x1); snd_soc_update_bits(codec, RT5670_PWR_ANLG1, RT5670_LDO_SEL_MASK, 0x3); RT5670_LDO_SEL_MASK, 0x5); } break; case SND_SOC_BIAS_STANDBY: Loading @@ -2626,7 +2626,7 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec, RT5670_PWR_VREF1 | RT5670_PWR_VREF2 | RT5670_PWR_FV1 | RT5670_PWR_FV2, 0); snd_soc_update_bits(codec, RT5670_PWR_ANLG1, RT5670_LDO_SEL_MASK, 0x1); RT5670_LDO_SEL_MASK, 0x3); break; case SND_SOC_BIAS_OFF: if (rt5670->pdata.jd_mode) Loading Loading @@ -2813,6 +2813,7 @@ MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id); #ifdef CONFIG_ACPI static const struct acpi_device_id rt5670_acpi_match[] = { { "10EC5670", 0}, { "10EC5672", 0}, { }, }; MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match); Loading @@ -2826,6 +2827,13 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = { DMI_MATCH(DMI_BOARD_NAME, "Braswell CRB"), }, }, { .ident = "Dell Wyse 3040", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Wyse 3040"), }, }, {} }; Loading Loading @@ -2889,6 +2897,9 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, if (ret != 0) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, RT5670_MCLK_DET, RT5670_MCLK_DET); if (rt5670->pdata.in2_diff) regmap_update_bits(rt5670->regmap, RT5670_IN2, RT5670_IN_DF2, RT5670_IN_DF2); Loading @@ -2903,7 +2914,6 @@ static int rt5670_i2c_probe(struct i2c_client *i2c, RT5670_GP1_PIN_MASK, RT5670_GP1_PIN_IRQ); regmap_update_bits(rt5670->regmap, RT5670_GPIO_CTRL2, RT5670_GP1_PF_MASK, RT5670_GP1_PF_OUT); regmap_update_bits(rt5670->regmap, RT5670_DIG_MISC, 0x8, 0x8); } if (rt5670->pdata.jd_mode) { Loading
sound/soc/codecs/rt5670.h +1 −0 Original line number Diff line number Diff line Loading @@ -1914,6 +1914,7 @@ enum { #define RT5670_IF1_ADC1_IN2_SFT 11 #define RT5670_IF1_ADC2_IN1_SEL (0x1 << 10) #define RT5670_IF1_ADC2_IN1_SFT 10 #define RT5670_MCLK_DET (0x1 << 3) /* General Control2 (0xfb) */ #define RT5670_RXDC_SRC_MASK (0x1 << 7) Loading