Jump to content

joe38

Validating
  • Posts

    1
  • Joined

  • Last visited

  1. Hello, Solution to run a pcm5102a module on a BPi M2 Zero board (Allwinner H2+/H3). Becarfull , the connection is different compared to the GPIO 40 of the Raspberry ! Wiring of the DAC on GPIO40 of the BPi M2 Zero: SCLK (not connected) BCK on CON2-P27 (PA19-EINT19) LCK on CON2-P28 (PA18-EINT18) DIN on CON2-P40 (PA20-EINT20) VIN (5v) on CON2-P02 or CON2-P04 GND on CON2-P06 Image linux Armbian used : Armbian_22.11.0-trunk_Bananapim2zero_bullseye_edge_6.0.9.img Enabled i2s via overlay : Create a file sun8i-h3-I2S-out.dts containing the text of the discussion indicated above /boot/overlay-user The contents of sun8i-h3-I2S-out.dts should look like: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/soc/i2s@1c22000"; __overlay__ { status = "okay"; }; }; fragment@1 { target-path = "/"; __overlay__ { pcm5102a: pcm5102a { #sound-dai-cells = <0>; compatible = "ti,pcm5102a"; pcm510x,format = "i2s"; }; }; }; fragment@2 { target = <&i2s0>; __overlay__ { status = "okay"; pinctrl-0 = <&i2s0_pins>; sound-dai = <&pcm5102a>; pinctrl-names = "default"; }; }; fragment@3 { target-path = "/"; __overlay__ { sound_i2s { compatible = "simple-audio-card"; simple-audio-card,name = "I2S-master"; simple-audio-card,mclk-fs = <256>; simple-audio-card,format = "i2s"; status = "okay"; simple-audio-card,cpu { sound-dai = <&i2s0>; }; simple-audio-card,codec { sound-dai = <&pcm5102a>; }; }; }; }; }; Launch the command : armbian-add-overlay ./sun8i-h3-I2S-out.dts The sun8i-h3-I2S-out.dtbo file is created The /boot/armbianEnv.txt file is modified, now you should find the line "user_overlays=sun8i-h3-I2S-out" reboot BPi M2 Zero The aplay -l command verifies the presence of the pcm5102a DAC. aplay -l **** List of PLAYBACK Hardware Devices **** card 0: I2Smaster [I2S-master], device 0: 1c22000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [1c22000.i2s-pcm5102a-hifi pcm5102a-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sun9ihdmi [sun9i-hdmi], device 0: SUN9I-HDMI PCM i2s-hifi-0 [SUN9I-HDMI PCM i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 Thanks to everyone who writes in the forums otherwise I wouldn't have been able to get the whole thing working. For information, works very well with Logitech Media Server and the Squeezlite player (and certainly others but I haven't tried).
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines