D Posted Friday at 04:08 PM Posted Friday at 04:08 PM Hi everyone, I got my OrangePi Zero 2W to work with MAX98357A board, the violet one, but I can only hear one channel. I didn't modify ALSA much, just focused on DTS: ... fragment@1 { target-path = "/soc"; __overlay__ { ahub0_plat: ahub0_plat { #sound-dai-cells = <0>; compatible = "allwinner,sunxi-snd-plat-ahub"; apb_num = <2>; /* for dma port 5 */ dmas = <&dma 5>, <&dma 5>; dma-names = "tx", "rx"; playback_cma = <128>; capture_cma = <128>; tx_fifo_size = <128>; rx_fifo_size = <128>; tdm_num = <0>; tx_pin = <0>; rx_pin = <0>; pinctrl-names = "default", "sleep"; pinctrl_used; pinctrl-0 = <&ahub_daudio0_pins_a>, <&ahub_daudio0_pins_b>, <&ahub_daudio0_pins_c>; pinctrl-1 = <&ahub_daudio0_pins_d>; status = "okay"; }; ahub0_mach: ahub0_mach { compatible = "allwinner,sunxi-snd-mach"; soundcard-mach,name = "ahubi2s0"; soundcard-mach,format = "i2s"; soundcard-mach,frame-master = <&ahub0_cpu>; soundcard-mach,bitclock-master = <&ahub0_cpu>; soundcard-mach,slot-num = <2>; soundcard-mach,slot-width = <32>; status = "okay"; ahub0_cpu: soundcard-mach,cpu { sound-dai = <&ahub0_plat>; soundcard-mach,pll-fs = <4>; soundcard-mach,mclk-fs = <0x100>; }; ahub0_codec: soundcard-mach,codec { }; }; hdmi: hdmi@6000000 { status = "disabled"; }; }; }; ... Did I miss something, and now I'm hearing only the left channel? Has anyone managed to listen to stereo using external DAC? Best! 0 Quote
Werner Posted Friday at 05:19 PM Posted Friday at 05:19 PM 1 hour ago, D said: MAX98357A Looks like that one can take stereo input but it is mostly designed to output one channel only. Did not research on my own but asked LLM. Since you experience one channel output only it might be correct about this behavior and also the overlay seems correct. In case you're interested in the output summary: Spoiler Quote Summary: Your device tree overlay for Orange Pi Zero 2W configures a stereo I2S interface, but the MAX98357A is a mono DAC that outputs audio only on one channel based on the hardware SD_MODE pin level. The missing element is the explicit handling of mono channel selection either by wiring SD_MODE pin or using two MAX98357A chips for stereo sound. Your current single DAC setup can output sound only on the channel corresponding to the SD_MODE pin, which is likely the right channel in your case. Additional possible actions: Check SD_MODE pin wiring on the MAX98357A module (low = left channel output, high = right channel). Adjust the audio driver or overlay to output mono sound on the correct channel. Consider adding a second MAX98357A for stereo outputs or mix the stereo signal to mono before sending to the DAC. This analysis is based on the MAX98357A datasheet, Orange Pi Zero 2W hardware info, and typical device tree configurations for Allwinner SoCs. 0 Quote
D Posted Friday at 09:43 PM Author Posted Friday at 09:43 PM Unfortunately, LLM is wrong here. There are MAX98357A boards, such as the violet one, which support (L+R)/2 and single/selected channel modes. I was able to configure the board using ESP32 and a sinus wave, so I can confirm it is possible and the board is not malfunctioning. For some reason, the sunxi driver (or ALSA) misbehaves, and I can't determine where the problem is. 0 Quote
Werner Posted yesterday at 06:16 AM Posted yesterday at 06:16 AM I see. Well there is a similar topic, maybe this can give some clues: https://forum.armbian.com/topic/50228-i2s-audio-not-working-on-orange-pi-zero-2w-allwinner-h618-with-max98357a/ 0 Quote
going Posted 1 hour ago Posted 1 hour ago 20.09.2025 в 00:43, D сказал: I can't determine where the problem is. Please specify which OS and kernel version. By the way, I recommend building EDGE yourself. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.