WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Firefox no sound (but Chromium has)  (Read 506 times)

Offline euless

  • Newbie
  • *
  • Posts: 27
Firefox no sound (but Chromium has)
« on: November 17, 2024, 06:22:15 AM »
Hi

On my 64bit TC, Ungoogled-chromium has sound working good.  But it is only version 115.  My bank requires version 116 or higher.  So I cannot do online banking with Chromium.  And I worry it is too outdated.

So I installed firefox-ESR.tcz, which is version 128-ESR.  This version is supported by my bank.  But sound does not work in firefox-ESR.tcz.  How do I get sound working?

I have alsa-config.tcz and alsa.tcz loaded.

And here is my .asoundrc.  I set card #1 as default.

Code: [Select]
tc@box:~$ cat .asoundrc
pcm.!default {
type hw
card 1
device 0
}

ctl.!card1 {
type hw
card 1
device 0
}

defaults.pcm.card 1
defaults.ctl.card 1



Btw, sound also works good when I play MP4 in Mplayer.

Any idea how to get sound working on Firefox?
« Last Edit: November 17, 2024, 06:52:49 AM by euless »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Firefox no sound (but Chromium has)
« Reply #1 on: November 17, 2024, 09:05:33 AM »

Offline euless

  • Newbie
  • *
  • Posts: 27
Re: Firefox no sound (but Chromium has)
« Reply #2 on: November 17, 2024, 10:34:00 AM »
I couldn't get any Firefox sound after trying pulseaudio and apulse.

When I try to get "apulse firefox" to play a MP4 file, the console shows the following error...
Code: [Select]
[Child 6151, MediaDecoderStateMachine #2] WARNING: 7f2bd522a5e0 OpenCubeb() failed to init cubeb: file /usr/src/firefox-128.2.0/dom/media/AudioStream.cpp:285
[Child 6151, MediaDecoderStateMachine #2] WARNING: Decoder=7f2bd109bc00 [OnMediaSinkAudioError]: file /usr/src/firefox-128.2.0/dom/media/MediaDecoderStateMachine.cpp:4654
« Last Edit: November 17, 2024, 10:51:42 AM by euless »

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 291
Re: Firefox no sound (but Chromium has)
« Reply #3 on: November 17, 2024, 04:30:47 PM »
@Rich: Firefox installed with firefox_getLatest.sh requires PulseAudio, but firefox-ESR.tcz is compiled with ALSA support enabled so it should work without that.

It sounds like it might need libavcodec5.tcz loaded, although it used to show a clear error when that was missing. I actually don't want my Web browser to ever play audio so I haven't tried making this work myself.

Offline euless

  • Newbie
  • *
  • Posts: 27
Re: Firefox no sound (but Chromium has)
« Reply #4 on: November 18, 2024, 05:38:13 AM »
@Rich: Firefox installed with firefox_getLatest.sh requires PulseAudio, but firefox-ESR.tcz is compiled with ALSA support enabled so it should work without that.

It sounds like it might need libavcodec5.tcz loaded, although it used to show a clear error when that was missing. I actually don't want my Web browser to ever play audio so I haven't tried making this work myself.

Ok, I tried libavcodec5.tcz (and also libavcodec4.tcz), but firefox still gives same error.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: Firefox no sound (but Chromium has)
« Reply #5 on: November 18, 2024, 06:43:29 AM »
I just tested firefox-ESR (in x86_64) and sound works with alsa - did you remember to un-mute the sound with alsamixer before you tested (note libavcodec is not required)?

Offline euless

  • Newbie
  • *
  • Posts: 27
Re: Firefox no sound (but Chromium has)
« Reply #6 on: November 18, 2024, 10:42:09 AM »
I just tested firefox-ESR (in x86_64) and sound works with alsa - did you remember to un-mute the sound with alsamixer before you tested (note libavcodec is not required)?

Yes, I used alsamixer to unmute and increase volume to max, but no sound with Firefox.

And like I said before, I get sound on Chromium (Ungoogled) and Mplayer.  And I can hear static sound when I do speaker-test.

Code: [Select]
speaker-test -Dsysdefault:CARD=PCH -c 6
« Last Edit: November 18, 2024, 10:48:08 AM by euless »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: Firefox no sound (but Chromium has)
« Reply #7 on: November 18, 2024, 11:27:44 AM »
I believe (I could be wrong) firefox will only use the default card 0

I have to get round this by using the following before loading alsa:
Code: [Select]
cat /etc/modprobe.conf
# /etc/modprobe.conf: Modprobe config file.
options snd_hda_intel index=1

..but maybe you're lucky and the default device is the one you want to use.
« Last Edit: November 18, 2024, 11:29:43 AM by Juanito »