No sound retroflag gpi case with pi zero w 2 (Solved)
-
@mitu This is after adding the config.txt and overlays that the retroflag gpi. I can test it with the stock config.txt and original dpi24 overlay if that helps?
-
After further testing, I can't get either
alsa
norpulse
to work as sound drivers.
alsa
doesn't find any sound card, thus is not able to play.
pulse
can find the virtual sound card, but cannot output sound for some reason.@mitu you are right, sound plays just fine with
omxplayer
.I don't think it's the GPi cases' fault, but rather the drivers not able to play over GPIOs?
-
@retropieuser555 said in No sound retroflag gpi case with pi zero w 2:
I can test it with the stock config.txt and original dpi24 overlay if that helps?
You can do that, but - at best - you'll get sound only on the HDMI port, which is not what you want. But this configuration should get rid of the ALSA error and you'd have at least one card listed by
aplay
. -
@mitu you think it's worth a shot trying to manually create the
asound.conf
file? -
@retropieuser555 said in No sound retroflag gpi case with pi zero w 2:
@philcomm okay that's interesting, I didn't notice that. I just tested a splashscreen with audio and it did play the sound for me too, no errors.
I tested out the beta of the recalbox image they have and it played audio as well, so it does seem workable somehow, there config file is quite different though, I always thought the config.txt is universal to the raspberry pi itself, rather than the OS etc?
Do you still have that image? My download is super slow, it takes another two hours to finish (around 60kb/s)
-
@philcomm the recalbox beta? Yeah I've got it here, should I post their config or something from it?
-
@retropieuser555 I wonder if there is any difference in the
/boot/config.txt
file compared to RetroPie. Also, is the md5 hash of/boot/overlays/pwm-audio-pi-zero.dtbo
the same? -
@philcomm Here's there config file:-
############################################################################ # Boot loader configuration # # Warning: do not edit this file as it will be overwritten when upgrading! # ############################################################################ # Using /etc/modules is deprecated and no longer supported on 4.4 kernel # So manually enable audio dtparam=audio=on # if you plug your tv at the same time as your rpi and that the rpi switches from the hdmi or # give a low resolution because tv had no enough time to initialize it boot_delay=3 # disable boot rainbow disable_splash=1 # default CEC name cec_osd_name=recalbox avoid_safe_mode=1 kernel=boot/linux initramfs boot/initrd.gz # force hdmi while the tv can take time before sending the signal on the hdmi output hdmi_force_hotplug=1 # total amount of GPU memory gpu_mem_256=128 gpu_mem_512=128 gpu_mem_1024=448 # your settings can be set in /boot/recalbox-user-config.txt include recalbox-user-config.txt # overclocking settings are automatically managed in this file # do not remove this line, nor edit the file include recalbox-oc-config.txt # Raise the first security limit up to 70° instead of 60° for pi3 and pi4 [pi3] temp_soft_limit=70 dtoverlay=vc4-kms-v3d include recalbox-crt-config.txt [pi4] temp_soft_limit=70 dtoverlay=vc4-kms-v3d include recalbox-crt-config.txt # disable 4k resolution hdmi_pixel_freq_limit:0=200000000 hdmi_pixel_freq_limit:1=200000000 [board-type=0x12] dtoverlay=vc4-kms-v3d # custom config [all]
They don't seem to be using the pwm-audio-pi-zero.dtbo overlay in the config and it isn't in the overlay folders at all. Any ideas how they got this working? Guess can go onto their forum and ask them
-
@retropieuser555 Does the
/etc/asound.conf
file exists? If yes, what's the content? -
pcm.monocard{ slave.pcm "hw:0" slave.channels 2 type route ttable { # Copy both input channels to output channel 1 (Right). 0.1 1 1.1 1 # Copy both input channels to output channel 0 (Left). 0.0 1 1.0 1 } } pcm.!default monocard
Thing is though, I don't know a great deal about recalbox, but it's not built on raspbian? Think if I used this in the retropie build it'll work?
-
@retropieuser555 said in No sound retroflag gpi case with pi zero w 2:
pcm.monocard{ slave.pcm "hw:0" slave.channels 2 type route ttable { # Copy both input channels to output channel 1 (Right). 0.1 1 1.1 1 # Copy both input channels to output channel 0 (Left). 0.0 1 1.0 1 } } pcm.!default monocard
Thing is though, I don't know a great deal about recalbox, but it's not built on raspbian? Think if I used this in the retropie build it'll work?
I will have to try later if that works
-
Hi, I have been struggling with the same issue, and have managed to solve it.
The issue is that by default the latest version of Raspbian disables the audio if nothing is connected to HDMI.
Use this one line entry in config.txt to fix it:
dtoverlay=audremap,pins_18_19,enable_jack=on
You don't need the pwm-audio-pi-zero.dtbo file and you can remove all the custom audio entries from Retroflag's config.txt and use this one line instead. (leave all the entries for the LCD in obviously).
The custom asound.conf file in recalbox is used to downmix stereo audio to mono, as the built in speaker on the GPi only outputs the right channel.
-
@slime1982 Hey that's great news can you post your config.txt file please? I think I'm deleting the wrong lines out
-
Start with the stock config.txt and add this at the end:
#Pi Zero 2 W GPi Config dtoverlay=audremap,pins_18_19,enable_jack=on display_rotate=1 dtoverlay=dpi24 overscan_left=0 overscan_right=0 overscan_top=0 overscan_bottom=0 framebuffer_width=320 framebuffer_height=240 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 dpi_output_format=0x6016 #hdmi_timings=320 0 28 18 28 480 0 2 2 4 0 0 0 60 0 32000000 6 hdmi_timings=240 1 38 10 20 320 1 20 4 4 0 0 0 60 0 6400000 1
you still need Retroflag's dpi24.dtbo, but you don't need to copy the pwm audio overlay file.
The custom asound.conf file doesn't work, I suspect because the sound device is now referred to as headphones instead of pcm, but I'm working on it now.
Also, go into raspi-config, system options and in audio select 'headphones'. it should be the only option, but select it to ensure it is the default device.
-
@slime1982 Are you an angel? insert Anakin Star Wars GIF
-
Ha! no, just very determined!
However, it's not quite right yet. On testing with headphones, the L and R channels are swapped, so I've changed the line to
dtoverlay=audremap,pins_18_19,swap_lr
note that enable_jack=on does not appear to be necessary .
Still working on fixing asound.conf so both channels play through the GPi's speaker. I'll reply with an update when I figure it out.
-
@slime1982 Almost there!
You're using their dpi25 overlay right? I'm getting some lines across the screen (but audio does work!)
MD5 (/Volumes/boot/overlays/dpi24.dtbo) = 55906663a9752f0588b74c407437dc16
Is that your md5 hash for your dpi24?
-
I'll try to make a PR to RetroFlag for these changes. I hope they have a repo for their GPi Patch
-
Hi, sorry, had to pop out.
Yes, that's the same file I'm using, the md5 matches :)
Lines on the screen might be a poor contact issue with the pogo pins.
-
Hi, sorry, I was testing with a stock Raspbian lite image earlier, I've moved to Retropie now. Do you mean you can see some of the boot text behind the splashscreen?
Comment out the line overscan_scale=1 in config.txt and also add these lines, which i neglected to include earlier:
avoid_safe_mode=1 disable_pvt=1 disable_audio_dither=1
That seems to fix it for me :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.