I’m managed to play some audio using i2s and max98357a (violet board), but then I realized … I’m only playing the left channel.
With SD hanging (disconnected), I should be able to hear both channels, right? Eventually, I want to support 2 boards, one channel each, but I got stuck at the first step.
It’s a mono amplifier, so with one board you will never get stereo. But you could play the same signal (if you have a stereo source: left, right or a mix of it) through two speakers, which is still mono because it’s exact the same signal without any stereo info.
So I assume you wanna play the mono signal through 2 speakers, not just one.
SD hanging/floating defaults to left channel
To get a signal through both channels the SD mode needs to be between ~0.16–0.77 V.
I’ve read about 0.5 V to get an even mix between left and right.
Sure, with two boards you can get true stereo, setting one to floating and the other to a voltage between 0.8 and 1.4 V
I know it is mono, but it should be able to play (L + R) / 2.
I checked my boards with ESP32, and I’m able to select channels easily, so this must be a kernel/DTS or alsa issue. Considering I’m operating on hw devices, skipping the whole alsa setup, my wild guess is DTS?
After some test with my PCM5102A this morning
This is good for separate left and right channels
as well as stereo effects with test tracks under LMS and Squeezelight.
I see that your config does not define tdm_num and tx/rx pins, so probably you have warnings in dmesg. Considering your dts works well, it gives me more confidence that this must be a kernel issue, unless PCM5102A acts differently. I suspect that max98357a may accidentally get into TDM mode, which is useless in this case - we have just 2 channels.
Hello mtojek
Good point, I corrected the three lines
tdm_num = <0>;
tx_pin = <0>;
rx_pin = <0>;
and no more messages in dmesg, thanks a lot
Otherwise, it doesn’t change anything for my PCM5102A and the stereo test sounds;
it still works with your fix.