You are not logged in.

#1 2019-12-05 17:24:06

ArchLinuxSU
Member
Registered: 2019-10-09
Posts: 13

implementation of --enable-alsa in Firefox

Good evening, I recently compiled firefox-beta from AUR using the --enable-alsa flag, prudently getting rid of everyone else that would mean JACK or PulseAudio support.

Ultimately, I did not get what I wanted - ALSA does not work.

I would like to note that alsa.conf and .asoundrc are configured correctly, which is why they interact correctly with all other applications.

Perhaps I'm wrong that I was going to return ALSA support through PKGBUILD and this method is no longer relevant. If so, please sanctify at least one of the available methods. Of course, resorting to the help of apulse or libpulse is not permissible.

I apologize in advance, if due to the fault of my carelessness, topics with the same topic have not been noticed.

Offline

#2 2019-12-05 17:30:09

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: implementation of --enable-alsa in Firefox

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-12-05 19:24:05

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: implementation of --enable-alsa in Firefox

https://aur.archlinux.org/packages/firefox-beta/ does enable alsa support, did you change the PKGBUILD ?

If so, please post the PKGBUILD you used.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2019-12-05 19:29:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: implementation of --enable-alsa in Firefox

How "correctly" are your ALSA configs configured? Firefox's ALSA support hardcodes on a properly defined ALSA default device, where "properly defined" means that you have to make it listable on PCM listings with a

hint {
   show on
   description "My ALSA default device "
}

Offline

#5 2019-12-06 14:59:54

ArchLinuxSU
Member
Registered: 2019-10-09
Posts: 13

Re: implementation of --enable-alsa in Firefox

V1del wrote:
hint {
   show on
   description "My ALSA default device "
}

I'm sorry, but I do not quite understand why need the syntax printed by you. Be that as it may, I find it necessary to share the configuration.  So my asoundrc:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

Offline

#6 2019-12-06 15:51:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: implementation of --enable-alsa in Firefox

Run

aplay -L

you won't see a default option, add my section to your pcm override rerun that same command, you will see a default option. Retry in firefox, sound should work.

That said, this config as posted breaks dmix and you will only be able to play from a single audio application at a time (unless you have one of the few cards still having multiple hardware mixer pcms)  a better config to the same effect would be

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

even better would be using string identifiers to accurately access the correct card (or ensuring index order with modprobe.d)

Offline

#7 2019-12-08 12:21:53

ArchLinuxSU
Member
Registered: 2019-10-09
Posts: 13

Re: implementation of --enable-alsa in Firefox

V1del wrote:

Run

aplay -L

you won't see a default option, add my section to your pcm override rerun that same command, you will see a default option. Retry in firefox, sound should work.

That said, this config as posted breaks dmix and you will only be able to play from a single audio application at a time (unless you have one of the few cards still having multiple hardware mixer pcms)  a better config to the same effect would be

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

even better would be using string identifiers to accurately access the correct card (or ensuring index order with modprobe.d)

Indicate explicitly where it is appropriate to use your code?  If it was supposed that I should strictly define the default values based on aplay -L at the beginning of the ~/.asoundrc file, I did this.  All the same.  No effect.  I can share the exhaust of Firefox itself when I try to play the audio track, but I think this is pointless.

P.S Now that I have analyzed the corresponding page in ArchWiki, I understand what you mean /etc/asound.conf.  There is no effect... But... This fixed the sound in another application - the second after Firefox, with which I had problems.

Last edited by ArchLinuxSU (2019-12-08 12:42:47)

Offline

#8 2019-12-08 17:35:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: implementation of --enable-alsa in Firefox

If you want to go with the hints method, add it to your !default override so

pcm.!default {
    type hw
    card 1
 hint {
   show on
   description "My ALSA default device "
 }
}

if want to go with the defaults method those two lines are all you should have present. If this still doesn't work I'd suggest you try with the normal firefox package since there we know that there shouldn't be an issue with the build, or indeed post firefoxes output (or at least a dump of about:support and

sudo fuser -v /dev/snd/*

during attempted playback)

Offline

#9 2019-12-08 17:58:32

ArchLinuxSU
Member
Registered: 2019-10-09
Posts: 13

Re: implementation of --enable-alsa in Firefox

V1del wrote:

If you want to go with the hints method, add it to your !default override so

pcm.!default {
    type hw
    card 1
 hint {
   show on
   description "My ALSA default device "
 }
}

if want to go with the defaults method those two lines are all you should have present. If this still doesn't work I'd suggest you try with the normal firefox package since there we know that there shouldn't be an issue with the build, or indeed post firefoxes output (or at least a dump of about:support and

sudo fuser -v /dev/snd/*

during attempted playback)

Tomorrow I will definitely try!  But while you are in touch, I’ll ask a couple of ridiculous questions about the syntax: in your case, “hint” is not in the body of the method or is it a typo?  Does “Description” have to be verbatim as you indicated, or is this a fickle argument?

Offline

#10 2019-12-08 18:04:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: implementation of --enable-alsa in Firefox

hint is the actual option (like type and hw) to tell it that the enclosing PCM (i.e. default) should have a hint , the others are options/parameters to hint; show on tells it to display that hint, description can be whatever.

Last edited by V1del (2019-12-08 18:10:07)

Offline

#11 2019-12-11 16:09:12

ArchLinuxSU
Member
Registered: 2019-10-09
Posts: 13

Re: implementation of --enable-alsa in Firefox

V1del wrote:

hint is the actual option (like type and hw) to tell it that the enclosing PCM (i.e. default) should have a hint , the others are options/parameters to hint; show on tells it to display that hint, description can be whatever.

I would like to apologize for the delay.  I had some business.  + An additional incident that prevented me from leaving tty yesterday.  Perhaps soon I will raise a discussion on this subject, and finally deal with my specific xorg-server.

So, I did everything as you said and it helped in the case of a different application, but not with Firefox.  Perhaps the reason for this is blocking the cache entry in the client settings.  (via about: config) If I share my console output while playing through the audio track, can this help the case?

I feel that it turns out to be extremely unproductive, and that it will end soon.  Nevertheless, I sincerely thank you for your patience.

Offline

#12 2020-05-20 16:17:10

sergeykish
Member
Registered: 2010-07-18
Posts: 15

Re: implementation of --enable-alsa in Firefox

V1del wrote:

a better config to the same effect would be

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

Thank you! I've got sound after this change (Firefox 76)

Offline

Board footer

Powered by FluxBB