Skip to content

Instantly share code, notes, and snippets.

@audioplastic
Created January 3, 2018 21:42
Show Gist options
  • Save audioplastic/cc6a7d9ff42c706f8aecd7dc4bcc4e8a to your computer and use it in GitHub Desktop.
Save audioplastic/cc6a7d9ff42c706f8aecd7dc4bcc4e8a to your computer and use it in GitHub Desktop.
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&sound>;
__overlay__ {
compatible = "simple-audio-card";
simple-audio-card,name = "Dual";
status="okay";
capture_link: simple-audio-card,dai-link@0 {
format = "i2s";
r_cpu_dai: cpu {
sound-dai = <&i2s>;
/* example TDM slot configuration
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
*/
};
r_codec_dai: codec {
sound-dai = <&codec_in>;
};
};
playback_link: simple-audio-card,dai-link@1 {
format = "i2s";
p_cpu_dai: cpu {
sound-dai = <&i2s>;
/* example TDM slot configuration
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
*/
};
p_codec_dai: codec {
sound-dai = <&codec_out>;
};
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
codec_out: spdif-transmitter {
#address-cells = <0>;
#size-cells = <0>;
#sound-dai-cells = <0>;
compatible = "linux,spdif-dit";
status = "okay";
};
codec_in: spdif-receiver {
#address-cells = <0>;
#size-cells = <0>;
#sound-dai-cells = <0>;
compatible = "linux,spdif-dir";
status = "okay";
};
};
};
fragment@2 {
target = <&i2s>;
__overlay__ {
#sound-dai-cells = <0>;
status = "okay";
};
};
};
/* compile with:
dtc -@ -H epapr -O dtb -o dual.dtbo -Wno-unit_address_vs_reg dual.dts
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment