mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 05:41:43 +00:00
Enable es8316 on RockPi4 (#1885)
This commit is contained in:
parent
cd28280466
commit
454038a50d
7 changed files with 102 additions and 5 deletions
|
@ -4760,12 +4760,12 @@ CONFIG_SND_SEQ_MIDI=y
|
|||
CONFIG_SND_SEQ_VIRMIDI=m
|
||||
CONFIG_SND_MPU401_UART=y
|
||||
CONFIG_SND_DRIVERS=y
|
||||
CONFIG_SND_DUMMY=y
|
||||
CONFIG_SND_ALOOP=y
|
||||
CONFIG_SND_DUMMY=m
|
||||
CONFIG_SND_ALOOP=m
|
||||
CONFIG_SND_VIRMIDI=m
|
||||
CONFIG_SND_MTPAV=y
|
||||
CONFIG_SND_MTPAV=m
|
||||
CONFIG_SND_SERIAL_U16550=y
|
||||
CONFIG_SND_MPU401=y
|
||||
CONFIG_SND_MPU401=m
|
||||
CONFIG_SND_PCI=y
|
||||
# CONFIG_SND_AD1889 is not set
|
||||
# CONFIG_SND_ALS300 is not set
|
||||
|
@ -5057,7 +5057,7 @@ CONFIG_SND_SOC_MT6660=m
|
|||
|
||||
CONFIG_SND_SIMPLE_CARD_UTILS=y
|
||||
CONFIG_SND_SIMPLE_CARD=y
|
||||
# CONFIG_SND_AUDIO_GRAPH_CARD is not set
|
||||
CONFIG_SND_AUDIO_GRAPH_CARD=y
|
||||
CONFIG_SND_XEN_FRONTEND=m
|
||||
|
||||
#
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- a/sound/soc/codecs/es8316.c 2020-04-09 19:13:08.268473737 +0000
|
||||
+++ b/sound/soc/codecs/es8316.c 2020-04-09 19:14:00.535995842 +0000
|
||||
@@ -687,7 +687,7 @@
|
||||
snd_soc_component_update_bits(component, ES8316_GPIO_DEBOUNCE,
|
||||
ES8316_GPIO_ENABLE_INTERRUPT, 0);
|
||||
|
||||
- if (es8316->jack->status & SND_JACK_MICROPHONE) {
|
||||
+ if (es8316->jack && (es8316->jack->status & SND_JACK_MICROPHONE)) {
|
||||
es8316_disable_micbias_for_mic_gnd_short_detect(component);
|
||||
snd_soc_jack_report(es8316->jack, 0, SND_JACK_BTN_0);
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts 2020-04-08 11:27:04.486670792 +0000
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts 2020-04-10 19:59:01.945704455 +0000
|
||||
@@ -34,6 +34,12 @@
|
||||
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
+ sound {
|
||||
+ compatible = "audio-graph-card";
|
||||
+ label = "rockchip,rk3399";
|
||||
+ dais = <&i2s0_p0>;
|
||||
+ };
|
||||
+
|
||||
vcc12v_dcin: dc-12v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
@@ -132,6 +138,7 @@
|
||||
regulator-max-microvolt = <1400000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
+
|
||||
};
|
||||
|
||||
&cpu_l0 {
|
||||
@@ -434,6 +441,23 @@
|
||||
i2c-scl-rising-time-ns = <300>;
|
||||
i2c-scl-falling-time-ns = <15>;
|
||||
status = "okay";
|
||||
+
|
||||
+ es8316: codec@11 {
|
||||
+ compatible = "everest,es8316";
|
||||
+ reg = <0x11>;
|
||||
+ clocks = <&cru SCLK_I2S_8CH_OUT>;
|
||||
+ clock-names = "mclk";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2s_8ch_mclk>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+
|
||||
+ port {
|
||||
+ es8316_p0_0: endpoint {
|
||||
+ remote-endpoint = <&i2s0_p0_0>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
@@ -452,6 +476,15 @@
|
||||
rockchip,playback-channels = <8>;
|
||||
rockchip,capture-channels = <8>;
|
||||
status = "okay";
|
||||
+
|
||||
+ i2s0_p0: port {
|
||||
+ i2s0_p0_0: endpoint {
|
||||
+ dai-format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ remote-endpoint = <&es8316_p0_0>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&i2s1 {
|
||||
@@ -583,6 +616,22 @@
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ i2s0 {
|
||||
+ i2s0_8ch_bus: i2s0-8ch-bus {
|
||||
+ rockchip,pins =
|
||||
+ <3 24 RK_FUNC_1 &pcfg_pull_none>,
|
||||
+ <3 25 RK_FUNC_1 &pcfg_pull_none>,
|
||||
+ <3 26 RK_FUNC_1 &pcfg_pull_none>,
|
||||
+ <3 27 RK_FUNC_1 &pcfg_pull_none>,
|
||||
+ <3 30 RK_FUNC_1 &pcfg_pull_none>,
|
||||
+ <3 31 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ i2s_8ch_mclk: i2s-8ch-mclk {
|
||||
+ rockchip,pins = <4 0 RK_FUNC_1 &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pwm2 {
|
Loading…
Add table
Reference in a new issue