-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSPi6 with RPi CM4 - Only left channel audio is output from both speakers #30
Comments
Hey @Skylark13, sorry for the late reply. The issue is due to the fact that the CM4 carrier only uses mono audio. The LCD takes up all the other pins, so I had to design it that way. The left and right channels are supposed to combine so that nothing is lost, but I assume that isn't working in some things. |
Hmm, ok that's unfortunate... Is this mentioned somewhere in the documentation I would have missed? It seems like some info that would be important to know when deciding what type of Raspberry Pi to choose. I have 2 options from here:
Just want to make sure I understand the tradeoffs well enough. Thanks! |
It the same for any Pi currently. All only route a mono channel. The choice was between video quality and stereo, and the general consensus was that video quality took priority. I'm working on a different carrier board (that I plan to also work with other CM4-style boards), and I expect will have high quality video and stereo audio. Will be a while though, as I'm waiting for the CM5 to be released or at least sampled to people. To clarify, I built the PSPi 6 to be ready for stereo audio. It does have independent audio channels that are filtered and amplified. The limitation is with the Pi boards. |
To answer the other part of the question, the audio channels should be combined in software and sent through the mono channel. That appears to not be working correctly. My board will take that merged mono channel and send it to both speakers. When two independent audio channels are available, my board will output the independent audio channels. They just arent available on the Pi when using DPI video |
Where does this happen in the software? Is it done in a modification of the OS that you do specifically for the PSPi6? Because I am hearing the same audio coming out of both speakers, so the board side seems to work, but the audio that comes out is only the left channel, so it's the combining in software that doesn't work. The OSes I tried were from the Community OS Images section (I tried RetroPie 4.8 and Batocera 39, perhaps those don't have the required modification and I would need to use one of those you did? |
I set mono audio using an overlay in config.txt. It's possible that some programs don't adhere to it, and Linux may need some additional configuration to force it. I'm pretty good with hardware design and c coding, but not quite as knowledgeable about Linux structure and configuration |
I tested in both Kodi and the Amiga emulator (I think both Batocera and RetroPie use fsuae by default) and reproduced the issue in both. I don't know much about this either but I can probably try to troubleshoot it. Thanks! I'll let you know if I find something, but for now I'll close this issue since it's as intended. |
I'll create a bug list and add this to it. Maybe can get some more assistance on it. |
Sorry to still post to this closed issue, but I think there's really something that doesn't work as you intended. Here is a video in which I'm running alsamixer from ssh, while the batocera menu music is playing. You can see that when I lower just the left channel volume, all audio goes away. When I lower just the right channel volume, nothing changes. https://drive.google.com/file/d/1HfaDSr8wGxI0eRXY8Q_zO98Go8Fk_4pc/view I checked and the configuration seems to be correct (according to what you mentioned earlier in this thread):
So I should be hearing both left and right channels from both speakers, and lowering only one side in alsamixer should not change anything to the audio I hear unless I lower both... I read somewhere that what we want could also be accomplished by using directives in asound.conf to have alsa mirror the channels like this:
But I don't know how to make this change, if I add /etc/asound.conf the file just disappears the next time I restart the PSPi6. |
Hi @othermod , happy new year! I've been fiddling with this a bit more. I had it working at one point but I can't remember what I changed, and a reboot brought me back to non-working again :( From what I've read, .asoundrc in the home directory should be the last alsa config file applied. I tried using this config in that file, editing "hw:N" for "hw:0" of course, and doing And again for some reason the .asoundrc file disappeared after a reboot. It looks like I wonder, what is the source for https://github.com/othermod/PSPi-Version-6/blob/main/rpi/overlays/audiocm4.dtbo ? There is no corresponding .dts file in the repo, only "oldaudiocm4.dts". I'd like to see how that's configured. I also saw another user had a "mono.dtbo" file for a pi zero (see #7) but I don't know if that's a fix for a related problem, or if it's related. I asked to see the source for that too in the issue. Thanks again. |
@Skylark13 I've tried so many things to make it merge the 2 channels into a single one in the driver, but had no luck. The best I can do is force it to be either just left or just right that is piped in. The merging still has to be done in the OS. I think the hardware is capable of it, but can't find any use of it in the Raspberry Pi Linux GitHub. |
Thanks for the pointer. I think the right way would be to make the alsa config have the desired effect, and have it stick, somehow. I'll continue to look in that direction. |
Yep I agree that alsa is probably the way to go, but that only works in retropie and raspberry pi os. Ones like Lakka and Batocera have their own way to do it, and don't allow you to easily modify the filesystem. I'm going to reach out to the raspberry pi developers and ask whether they have a way to implement this at a lower level |
I like Batocera so that's a shame doing it through alsa won't work for that. OK, let me know (and if there's a thread I can follow please post the link here). I'd love to keep abreast of any progress (I can even help testing if it can help). |
Hello, thanks a lot for this great project! I had fun building it, and it works really well for a lot of different emulators. I have a problem with mine though, and I could use some help identifying the exact cause.
Both speakers, and both sides of headphones if those are connected, output the left channel audio only. The right channel audio is not being output at all.
This was apparent when I ran some Amiga demos (since the Amiga has 100% stereo separation) and some instruments in the music were just not audible at all. But I also found an MP3 to test stereo, which plays a voice first in the center (both channels), then left only, then right only. When played on my PSPi6 it sounds the same when playing center and left (the sound would come out of both speakers in both cases), then would just be totally silent when playing the right side audio.
http://www.aoakley.com/articles/stereo-test.mp3
I think this is not a software issue with the OS being used, because I tested this in two different ones (Batocera using the menu music, and RetroPie using Kodi) and it did the same thing in both.
Just to let you know, I found this issue on the Batocera github: batocera-linux/batocera.linux#7447 . It describes the same issue happening on a Steam Deck and says it was fixed, then another issue was opened for a later version saying it came back. But I don't think this is the same issue because it would happen only in Batocera, not RetroPie as well, I think. Surely both OSes, which are pretty different at their core, wouldn't have exactly the same bug? (I got the link to the stereo testing MP3 file from that issue)
So I'm thinking this could be a hardware issue, perhaps a solder bridge somewhere. I have some soldering and basic electronics knowledge (can check continuity and voltages for example) but what makes this harder to diagnose is that it's pretty hard to run the PSPi when it's disassembled so the board is accessible. But it could be done if needed.
What do you think? Is there any guidance you could give to help me figure out what is wrong? Or even better, have you ever seen this issue and know of a fix already?
Thanks in advance.
The text was updated successfully, but these errors were encountered: