diff options
author | Icenowy Zheng <icenowy@aosc.xyz> | 2017-06-05 09:27:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-06-06 14:29:54 -0400 |
commit | 2cfeaec0ec896bc0b8aad2de28a3de4572c7e4a1 (patch) | |
tree | e87b50712ce4c95e23ca7cd46dbfe87062bad5b7 | |
parent | 50aadc14cee74009c72e7d66954b15f27d45c02f (diff) |
ASoC: sun8i-codec-analog: add support for V3s SoC
The V3s SoC features an analog codec with headphone support but without
mic2 and linein.
Add support for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt | 1 | ||||
-rw-r--r-- | sound/soc/sunxi/sun8i-codec-analog.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt b/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt index 779b735781ba..1b6e7c4e50ab 100644 --- a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt +++ b/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt | |||
@@ -4,6 +4,7 @@ Required properties: | |||
4 | - compatible: must be one of the following compatibles: | 4 | - compatible: must be one of the following compatibles: |
5 | - "allwinner,sun8i-a23-codec-analog" | 5 | - "allwinner,sun8i-a23-codec-analog" |
6 | - "allwinner,sun8i-h3-codec-analog" | 6 | - "allwinner,sun8i-h3-codec-analog" |
7 | - "allwinner,sun8i-v3s-codec-analog" | ||
7 | 8 | ||
8 | Required properties if not a sub-node of the PRCM node: | 9 | Required properties if not a sub-node of the PRCM node: |
9 | - reg: must contain the registers location and length | 10 | - reg: must contain the registers location and length |
diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c index 29c446068151..485e79f292c4 100644 --- a/sound/soc/sunxi/sun8i-codec-analog.c +++ b/sound/soc/sunxi/sun8i-codec-analog.c | |||
@@ -810,6 +810,11 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt, | |||
810 | return 0; | 810 | return 0; |
811 | } | 811 | } |
812 | 812 | ||
813 | static const struct sun8i_codec_analog_quirks sun8i_v3s_quirks = { | ||
814 | .has_headphone = true, | ||
815 | .has_hmic = true, | ||
816 | }; | ||
817 | |||
813 | static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt) | 818 | static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt) |
814 | { | 819 | { |
815 | struct device *dev = cmpnt->dev; | 820 | struct device *dev = cmpnt->dev; |
@@ -886,6 +891,10 @@ static const struct of_device_id sun8i_codec_analog_of_match[] = { | |||
886 | .compatible = "allwinner,sun8i-h3-codec-analog", | 891 | .compatible = "allwinner,sun8i-h3-codec-analog", |
887 | .data = &sun8i_h3_quirks, | 892 | .data = &sun8i_h3_quirks, |
888 | }, | 893 | }, |
894 | { | ||
895 | .compatible = "allwinner,sun8i-v3s-codec-analog", | ||
896 | .data = &sun8i_v3s_quirks, | ||
897 | }, | ||
889 | {} | 898 | {} |
890 | }; | 899 | }; |
891 | MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match); | 900 | MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match); |