Sound output with Fedore Server 37 Aarch64 on raspberry pi 4

Hi,

I am running Fedora 37 server aarch64 on a raspberry pi 4 (8gb).
I would like to play music using the 3,5mm jack but Alsa will not recognize this as a sound device.

If I am using Fedora 37 workstation aarch64 the sound works fine but I am too much a linux newbie to be able to figure out the difference and how to configure my server install to also be able to play sound.

I should also mention that the sound work out of the box on a Fedora 36 server installation in a VMWare. (I have not tried fedora 37 in VMWare yet)

My guess is that it has something to do with the snd_bcm2835 module.
Alsa does seems to recognize the hdmi devices without further configuration, does the 3.5mm output require special configuration or is it the kernel modules that needs to be setup?

Any help or advice is appreciated!

BR,
Erik Estrada

By default a server does not install the audio & video packages.

Try dnf grouplist and select the necessary group packages from there.

You also can select specific packages and install them to keep things as small as you wish. Possibly install something like pipewire, wireplumber, rhythmbox, gstreamer1, and more. There are a lot of choices available and these are the basic for any audio management. You may also want to enable the rpmfusion repos since there are a lot of codecs not available from the fedora repos so what could be played would be limited.

1 Like

The biggest choice of packages you find in "Audio Production" I would not install the whole group because of space as @computersavvy mentioned.

Helpful tools might be:

pavucontrol, 
pipewire-alsa
pipewire-pulseaudio
pipewire-utils  #write pw and press Tab in bash if you have 
bash-completion #installed

and alsa-firmware if your device not get recognized
aslo alsa-tools alsa-utils to config and debug.

The full list of :

sudo dnf group info "Audio Production"
Last metadata expiration check: 0:05:36 ago on sáb 03 dez 2022 16:24:44.
Group: Audio Production
 Description: Various tools for audio synthesis and music production.
 Default Packages:
   Add64
   Carla
   a2jmidid
   alsa-firmware
   alsa-plugins-samplerate
   alsa-plugins-upmix
   alsa-plugins-usbstream
   alsa-plugins-vdownmix
   alsa-tools
   alsa-utils
   alsamixergui
   ams
   ardour6
   arpage
   audacity
   calf
   drumkv1
   dssi
   ffado
   fluid-soundfont-gm
   fluidsynth
   frescobaldi
   guitarix
   harmonyseq
   hydrogen
   jaaa
   jack-mixer
   jack_capture
   japa
   jmeters
   kernel-tools
   ladspa
   ladspa-amb-plugins
   ladspa-autotalent-plugins
   ladspa-blop-plugins
   ladspa-cmt-plugins
   ladspa-fil-plugins
   ladspa-mcp-plugins
   ladspa-rev-plugins
   ladspa-tap-plugins
   ladspa-vco-plugins
   lash
   lilypond
   lsp-plugins-jack
   lsp-plugins-ladspa
   lsp-plugins-lv2
   lv2
   lv2-abGate
   lv2-c++-tools
   lv2-carla
   lv2-drumkv1
   lv2-fabla
   lv2-invada-plugins
   lv2-ll-plugins
   lv2-newtonator
   lv2-samplv1
   lv2-sorcer
   lv2-swh-plugins
   lv2-synthv1
   lv2-vocoder-plugins
   lv2-x42-plugins
   lv2-zynadd-plugins
   lv2dynparam
   mscore
   mudita24
   multimedia-menus
   mup
   muse
   new-session-manager
   pavucontrol
   pipewire-alsa
   pipewire-jack-audio-connection-kit
   pipewire-pulseaudio
   pipewire-utils
   qastools
   qjackctl
   qmidiarp
   qsynth
   qtractor
   rakarrack
   raysession
   rosegarden4
   rtirq
   samplv1
   sbc
   sooperlooper
   synthv1
   timidity++
   tuxguitar
   vmpk
   wireplumber
   yoshimi
   zita-at1
   zita-rev1
   zynaddsubfx

Hi,

Thanks for your quick reply.
I am sorry if my initial post lacked info. My kids were nagging me to get off the computer and this is my first time posting a question in a forum instead of just googling it so I am a bit unexperienced. (I did try googling it. A lot.)

I have enough storage for a full desktop so I tried the “Audio Production” group just for completeness sake but it did not change the situation.

I have updated my post with more information about what I want and what I have tried.
update: Or rather I post a new description below as I cannot edit my post any longer…

BR,
Erik

Hi,

I am running Fedora 37 Server aarch64 on a raspberry pi 4 (8gb).
I would like to play music using the 3,5mm jack but Alsa will not recognize this as a sound device.
If I use the F37 Workstation on the rpi4 everything works out of the box but I would like to avoid the overhead of a desktop environment.

If I can just ouput any sound to my speakers using the 3.5mm jack I can probably take it from there.

Previous experience and expectation

I have an install of Fedora 36 Server on a VMWare machine.
There all I had to do was to install the alsa-utils (implicitly also installing alsa-lib and alsa-ucm).
Then I can play a sound with aplay.
I can use alsamixer to control volume and output device.
“aplay --list-devices” lists all my devices.
So this was my expectation when installing F37 Server on my rpi4.

Actual experience

After installing alsa-utils I am unable to play sound with aplay.
Alsamixer says that “This sound device does not have any controls”
Alsamixer and “aplay --list-devices” only lists the hdmi ports as possible devices

Investigations

Firmware/software

Ok, maybe the vmware firmware is more readily supported.
I find and install the alsa-firmware package.
No change.
I install pretty much all alsa-related packages.
No change.
After it was suggested here I also installed the “Audio Production” group.
No change.

Try another distro

So, perhaps there is something wrong with my rpi hardware?
I tried to run the Fedora 37 Workstation on the same rpi4.
This time sound worked out of the box as alsa-utils along with everything else comes preinstalled.
aplay --list-devices now correctly list the bcm2835_headpho device.

Investigate differences between Fedora Server and Workstation aarch64.

Ok, it is not the hw, so if I could modify the Server install to act like the Workstation install?
Now I am out of my depth but a bit of googling led me to the lsmod command and there I can see that the in the Workstation install snd_bcm2835 module is loaded.
Me fumbling in the darkness tries to modprobe the module on the server install. It loads but does not change the situation.
I put a script in /etc/modprobe.d to load it at boot.
No change.
Google is failing me at this moment and I am not sure if learning all the kernel ins and outs will help me in the end.

Future investigations

I will try to install Arch Linux and see if I encounter the same problem there. It easier to see why then but I am afraid that the differences between Arch and Fedora are too great to compare them like this.

I will also try to install Fedora 37 Server on a VM and Fedora 36 Server on the rpi4 to see if the problem exists in this version only.

Current state

My guess is that it has something to do with the snd_bcm2835 module.
Alsa does seems to recognize the hdmi devices without further configuration.
Does the 3.5mm output require special alsa configuration or is it the kernel modules that needs to be setup?

Any help or advice is appreciated!

BR,
Erik Estrada

Probably the Games and Entertainment group would be the proper one for all the entertainment tools.
Also, as noted you may want to install the rpmfusion repos as noted here then there are specific packages that you would install from there to enable any codecs not already available.

To name some of the media packages I have installed from there for my desktop;
audacity-freeworld, ffmpeg (and associated), gstreamer1-plugins-ugly, gstreamer1-plugins-bad-freeworld, libaacs, libdvdcss, mplayer-common, vlc, libavdevice

BTW
Fedora 37 is the first to officially support the RPi so it may or may not be possible to use F36.

If you install the workstation instead of the server media support would already be available. I have not yet tested audio from the audio port on mine.

Hello and thank you for your support Jeff,

I do not think the problem lies in the packages (I’ll get to why later) but I did again try to install your suggestion because why not. I did skip the “Games and Entertainment” group as it only contains games.

I will probably not go with the full workstation experience. I have that on my main and would like the rpi to be slimmer. I do not think it is an unreasonable use case to play music from a server and if all else fails I’ll probably move back to use Arch on the pi. I just liked the Workstation on my main and it would be nice to go all-in fedora.

My findings so far

F36 ran fine on the rpi4 but it also did not detect the sound device.

So to get back to why I do not think the problem is in the packages.
I have tried to install and run both F36 and F37 Server in a VM and on the rpi.
I have also installed F36 and F37 Workstation on the rpi.

My expectation is that “aplay --list-devices” should list all sound devices, especially the 3.5mm output on the rpi. (understandably this will not be the case on the VM as it does not have that device)

F36 and F37 Server works as expected in the VM after only installing alsa-utils (and alsa-lib).
F36 and F37 Workstation works fine on the rpi out of the box.
BUT
F36 and F37 Server does not live up to my expectation after installing alsa-utils.

I have diffed the insalled packages on all system and have not found anything standing out.
I have installed everything even remotely related from these diffs and by suggestions in the thread, without success.

Conclusion

  • Fedora Server should be able to detect sound devices and play sound only by installing alsa. As tested on the VM where “sudo dnf install alsa-utils” was the only command needed after clean install to meet my expectations.
  • Fedora Workstation and thus the Fedora ecosystem has all the software needed to detect the 3.5mm device on a rpi 4 as that works out of the box. If I am not mistaken that should indicate that it is not impossible nor too farfetched to configure a working Fedora Server as well.

Going forward

  • I stumbled on some pages where it seems the command flags to the kernel might be the problem. I will try to look into that. But the boot partition of the Server and Workstation seems to be the same so I am not convinced.
  • I will