-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
No audio when using vc4-kms-v3d on rpi4 #4543
Comments
You need to have a alsa card driver for vc4. See here. |
Hi, thank you for your reply! Indeed, there was a
I have tried changing the contents to the version of the link, but I still don't have audio playback from the TV and the same error messages are still present in the |
I'm experiencing the same error:
On
with the same in /boot/config.txt
|
These messages are expected:
in a working system. See here for some discussion. |
This is probably the same problem as I've reported here: raspberrypi/Raspberry-Pi-OS-64bit#157 Try installing pulseaudio, see if that works. |
I am also experiencing the same issue with kms. It appears quite randomly, sometime just pausing a working video with audio and trying to play again fails.
|
Same problem here in a clean install of raspios_arm64-2021-11-08 on a rpi4 4gb. I have not HDMI sound
|
commenting the analog audio output in /boot/config.txt solved the problem for me.
https://forums.raspberrypi.com/viewtopic.php?t=322751&start=25 |
The solution to remove
|
Yes, you've just disabled it.
Pulse audio is installed by default on RPiOS and can handle the mixing. |
Thanks for the quick reply!
|
dtparam=audio=on is explicitly there to enable the alsa driver for the headphone jack. You can't have that output without it.
You can't do it through alsa. You need a sound server, of which pulse audio is recommended. |
Whoa, OK. Is this the intended way forward for the Raspberry Pi?
Or is all this just a temporary situation until this is "fixed"? |
Using If having an additional alsa device breaks hdmi output, then it suggests a configuration issue. Yes, I'm afraid an audio server is required when using the vc4 hdmi audio device if you require mixing of multiple channels. |
It doesn't break HDMI output, but it does break audio-over-hdmi, which is what this Github issue is all about. I would like to have audio output via the headphone jack and audio output over HDMI work at the same time. Currently my users can select where they want their audio to go "on the fly". It would be sad if switching between the headphone jack or HDMI audio output would require a reboot.
If true, then that would be a loss over the situation with the previous For now I am forced to keep using the |
I'm saying it doesn't inherently break audio over hdmi. On RPiOS you can switch between HDMI audio and desktop "on the fly" using the audio widgets. No reboot needed. We need to work out why this doesn't work for you.
Alsa didn't mix the audio with fkms. The firmware did (by reporting multiple output channels, and then mixing them itself). |
For reference - https://patchwork.kernel.org/project/alsa-devel/patch/1488451773-22010-1-git-send-email-boris.brezillon@free-electrons.com/#20340067
Takashi Iwai is one of the main ALSA developers. |
To be clear, my issue is the exact same as all the other people in this thread.
I see the value in that.
Here's hoping that will come to pass. |
Would it really be that much more memory? I'd recommend trying Pipewire rather than PulseAudio. But the runtime memory and CPU overhead is pretty much negligible given the RPi's available resources in either case. |
@giddie I'm more worried about the work. I made everything "pure alsa" because I thought that would make it simpler and more future proof, and because I read so many complaints about Pulse Audio. Now it turns out Pulse Audio (et al) is the future :-D |
Yeah, I understand the frustration. But to be fair, PulseAudio (and now Pipewire, really) has been the unambiguous future of audio in the Linux ecosystem for the last decade or so 😆 |
Oh, by the way, if you're not aware - ALSA can work just fine on top of PulseAudio. So you can probably continue to work with ALSA, and with PulseAudio installed ALSA will simply forward audio for your app to PA, which will handle the mixing. This configuration is usually automatic when PA is installed. |
Hi all, On my Raspberry 4 I had the same issue of no audio over HDMI port but only when using shairport-sync, other sounds (i.e. youtube videos) were working fine. I had jack and HDMI working fine togheter till RP4 OS was Buster, then Bullsey broke something. I verified that audio via shairport-sync is not working only if running the program as a service using sudo service shairport-sync start while executing a simple shairport-sync from the command line HDMI audio was working. Commenting dtparam=audio=on on /boot/config.txt solved the issue as suggested on #4543 (comment) but still I'm wondering about the cause of the issue and if there's a way to have HDMI and jack-audio being able to work togheter. Any idea? |
did you mean spi or audio here? I don't see how spi is related. |
oh, sorry, late night... you are right it is #dtparam=audio=on, I'll fix my previous comment |
The solution #dtparam=audio=on |
Do you have one or two displays connected? |
I have one display only and i have the hdmi0 connected the one next to the power connector |
show output of |
Okay, you have hdmi0 and hdmi1 devices. If so, you should be able to change default audio device by right-clicking the volume control on taskbar. |
No im using raspbian lite |
It will be in one of the alsa config files, depending on how you selected it. |
Any progress?? |
On bullseye that file shouldn't exist. Try renaming it. |
Sorry rename what exactly?? |
|
Ok,so i rename it to anything? |
Yes. Anything other than it's current name, so it doesn't get used. e.g. |
Facing exactly the same issue here.
@popcornmix With FKMS, audio works. alsactl_fkms.txt I'm running a custom setup without PulseAudio (but the software I'm running (RetroArch) outputs directly to ALSA; it also runs over (F)KMS just fine without X). Kernel and firmware are up to date:
That's one reason why RPi is great -- the firmware fills the gaps where Linux actually sucks.
That's a good approach, but please, please, hear my plea below:
Can we at least hope that FKMS and all the excellent "old" firmware support will be at least kept in the future? With the old ways of doing things (that is, FKMS, "deprecated" config.txt things such as With the deprecation of old userland it is hard to keep things working. For example, I had a tvservice-based service that adjusted the correct HDMI mode in certain situations where the software I was running did not set it correctly*; without tvservice I cannot do this any longer (and I am not even sure it would work with KMS, I'm not versed in the details of KMS vs. FKMS). I need to try Another example: using PulseAudio introduces cracks/buffer underruns and I need to increase audio latency in my setup for it to work more or less OK. With firmware-based mixing it works wonders with minimal latency and I don't need an additional sound server sticking around. Again, the best thing about RPi is indeed the firmware support -- it fills the gap where Linux sucks and RPi userland tools work and have always worked very well. Deprecating these feels like a huge loss to me. *: I agree the piece of code in question should be fixed; but for reasons too long to enumerate it can't/won't be done, and the value of "the workaround works very well" cannot be overstated here. EDIT: Added config.txt. |
Be aware that Pi5 (and any future Pi models) have no "start.elf" firmware, so running audio on the firmware is just not possible. Relying on that functionality is limiting you to older Pi models. fkms gets no new features or bug fixes. We have no plans to remove it imminently, but also make no promises to maintain it forever. Obviously as you are already restricting yourself to older models of Pi, you can continue using older software and use fkms features for as long as you want. But I would suggest moving forward. |
I appreciate the response. (BTW, can the Pi4 and older boot without
start.elf as well?)
To clarify, I'm not resisting change -- on the contrary, I appreciate the
move towards being more compatible with kernel interfaces. I merely pointed
out some challenges in upgrading from a user perspective, and that perhaps
keeping some of the things that work well could be an approach to this. If
upgrading breaks a setup unpredictably, users will resist doing so, which
backfires against deploying new features and bugfixes in the first place.
This is more a compliment than a complaint -- Pi's firmware is very
dependable and is one thing that makes the platform great.
Regarding audio, the bug mentioned above still exists. I have moved to KMS
and removed `dtparam=audio=on`. I'll test the setup and see if I notice
anything impactful.
Let me know if I can provide more info or test anything further.
…On Mon, May 6, 2024 at 4:26 PM popcornmix ***@***.***> wrote:
Be aware that Pi5 (and any future Pi models) have no "start.elf" firmware,
so running audio on the firmware is just not possible.
Relying on that functionality is limiting you to older Pi models.
fkms gets no new features or bug fixes. We have no plans to remove it
imminently, but also make no promises to maintain it forever.
Obviously as you are already restricting yourself to older models of Pi,
you can continue using older software and use fkms features for as long as
you want.
But I would suggest moving forward.
—
Reply to this email directly, view it on GitHub
<#4543 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE5R4ZE7UI547CLEGZESSO3ZA7KNZAVCNFSM5CS7DS6KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZGY3TIOBTGY2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Describe the bug
I'm using a raspberry pi 4 B with 4GB RAM (rev 1.2) (
uname -a
=Linux rpi4-ha 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux
) with a HDMI connection (from port HDMI0) to a Samsung TV. When using thevc4-fkms-v3d
option, everything works as expected (audio is played from the TV). However, when switching over to thevc4-kms-v3d
, audio doesn't work anymore and I get multiple errors indmesg
(excerpt, you can see the fulldmesg
log below):When using
alsamixer
i can see both vc4-hdmi-0 and vc4-hdmi-1, butalsamixer
reports thatThis sound device does not have any controls.
To reproduce
Using a raspberry pi 4 with 4GB RAM (rev 1.2) (
uname -a
=Linux rpi4-ha 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux
) with a HDMI connection (from port HDMI0) to a Samsung TV.Contents of
/boot/config.txt
Expected behaviour
Hear audio from the TV
Actual behaviour
No audio is played from the TV.
System
raspinfo
output:The text was updated successfully, but these errors were encountered: