Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

Alsa configuration on new AMD system [SOLVED]

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
62 posts
  • Previous
  • 1
  • 2
  • 3
Author
Message
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sat Feb 27, 2021 4:26 pm

figueroa wrote:I have neither .asoundrc or /etc/asound.conf and firefox and firefox-bin work just fine with sound ALL of the time. Do you have a link to a site with sound that won't play wihtout .asoundrc?

FYI: https://alsa.opensrc.org/Asoundrc
Sure it works, like I said ... if you want rate higher than 48000 and you specify in your alsa config file 'rate 96000' , the sound will not work.
Firefox-bin will still work, because that one is using apulse and not alsa.

Link doesn't matter, it's not partial, there's just no sound anywhere.
I don't know why is it so hard to grasp that, again, if you don't configure anything then it's gonna work, but if you specify rate higher than 48000 firefox (source based) will have no sound.

Here's my .asoundrc, you can see I've commented out rate 96000, firefox is the only app I'm having issues with that rate, otherwise I would use it.
48k is fine that said.

Code: Select all

#------------------------------------------------------------------------------------
# Cards
#------------------------------------------------------------------------------------
pcm.onboard_card {
   type hw
   card 2

   format S32_LE
   #rate 96000
   rate 48000
}

#------------------------------------------------------------------------------------
# LADSPA plugin
#------------------------------------------------------------------------------------
pcm.ladspa {
    type ladspa
       slave.pcm "upmixplug";
       #path "/usr/lib64/ladspa:/usr/lib/ladspa";
	   path "/usr/lib64/ladspa";
       plugins [{
           label sc4m
	   #label dysonCompress
           input {
               #         RMS/peak   attac time (ms)   release time (ms)   threshold (dB)   ratio   knee radius   Makeup gain
               #controls  [1         1.5               401                 -10              20      5             	 12]
	       controls  [0         10                 175                 -22       	   3       3.5                    9] 
	       #controls  [0         5                 401                 -22       	   10      3.5                   12]
	       #controls  [0         1               0.5                 0.99] #dyson

        }
    }]
}

#------------------------------------------------------------------------------------
# 6ch alsa configuration
#------------------------------------------------------------------------------------
pcm.setup_6ch {
   type plug # format conversion
   slave.pcm "ladspa"
}

pcm.upmixplug {
  type plug
  slave.pcm "upmixer"
}

pcm.upmixer {
   type upmix # on-demand upmixing
   slave.pcm "dmixplug"
   channels 6
}

pcm.dmixplug {
   type plug
   slave.pcm "dmixer"
}

pcm.dmixer {
   type dmix # multi-stream mixing
   ipc_key 4897
   
   slave {
      pcm "onboard_card"
      channels 6 # adjust as necessary (e.g. 8 for 7.1 audio)
      format S32_LE
      #rate 96000
      rate 48000
   
      #period_time 21333
      period_time 0
      period_size 1024 # double if you notice increased CPU load or crackling
      # halve if you like lower latency
      # (e.g. when adjusting volume with softvol enabled)
      #buffer_time 170666
      buffer_time 0
      buffer_size 8192 # some applications do not like smaller buffers
   }
}

#------------------------------------------------------------------------------------
# Global configurations
#------------------------------------------------------------------------------------
# for better quality convertion
defaults.pcm.rate_converter "speexrate_medium"

#------------------------------------------------------------------------------------
# My defaults
#------------------------------------------------------------------------------------
pcm.!default pcm.setup_6ch 
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sat Feb 27, 2021 6:41 pm

Interestingly enough I just got alsa sound working in palemoon (ff derivative) and it turned out to be alsa config related.

Videos would play but no sound.

.asounrc originally looked like this

Code: Select all

pcm.!default {
    type hw
    card 1
    device 0
}

ctl.!default {
    type hw
    card 1
    device 0
}
Which worked for everything except ff/pm

Found a thread, don't remember where and they had the person modify his .asoundrc to this

Code: Select all

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
Which works in ff/pm and the other things.

They person in the thread (I'll have to re-find it) said that the difference is that with {} brackets, it removes everything set (behind the scenes) for that device.

I'm guessing it has to do with dmix or something like that, because the reason I went with {} is that I didn't want dmix (modifies the sound, resample, etc) to mess with the sound quality.

I'm going to play some more and see if I can set something up just for ff/pm and leave other apps alone.
Note: My card is card 1 (not 0) device 0, so modify accordingly


Edit to add: Played with it some more and got the result I wanted (I can only play one device at a time which is what I want and the sample rate is left alone.

So, ff/pm play sound with videos now, and deadbeef, mpv, etc still continue playing the way they did with this .asounrc.

Code: Select all

pcm.!default {
type plug
 slave {
  pcm "hw:1,0"
  rate "unchanged"
 }
}

defaults.ctl.card 1
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sat Feb 27, 2021 8:38 pm

Configuration matter :)

didn't know about "rate unchanged", interesting, that means don't convert the source rate ?
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sat Feb 27, 2021 8:58 pm

Yes, unchanged says leave it alone, don't try and resample (at least that's my understanding at the moment)

Yeah, I was checking with a 44,100 and a 48,000 file, it reports as I expected.

Streaming radio

Code: Select all

$ cat  /proc/asound/card1/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192
Firefox/youtube

Code: Select all

access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 1200
buffer_size: 4800
Note: I'm using card1 (2nd snd card) so change according to your setup

Edit to add: tests on a couple of flacs I had laying around

Code: Select all

access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 2400
buffer_size: 9600

access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 4800
buffer_size: 19200
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun Feb 28, 2021 10:46 am

FWIW I switched from firefox to librewolf last night, sound works the same way as in firefox, which is expected.
The bin version however is different than firefox-bin, I didn't emerge it but out of curiosity just wanted to see if apulse is going to be used, for some reason it wants wayland
For firefox-bin only apulse is needed (in my case when I want to emerge it), librewolf-bin is different for some reason
librewolf (source version) didn't need any deps, I just emerged librewolf

Code: Select all

# emerge librewolf-bin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-util/patchelf-0.10::gentoo  155 KiB
[ebuild  N     ] dev-libs/wayland-1.18.0::gentoo  USE="-doc" 444 KiB
[ebuild  N     ] dev-libs/wayland-protocols-1.20::gentoo  110 KiB
[ebuild   R   ~] media-libs/mesa-21.0.0_rc5::gentoo  USE="X classic dri3 egl gallium gbm gles2 llvm lm-sensors vdpau vulkan vulkan-overlay wayland* zstd -d3d9 -debug -gles1 -opencl -osmesa (-selinux) -test -unwind -vaapi -valgrind -xa -xvmc -zink" VIDEO_CARDS="radeonsi (-freedreno) -i915 -i965 -intel -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon (-v3d) (-vc4) -virgl (-vivante) -vmware" 0 KiB
[ebuild   R    ] x11-libs/gtk+-3.24.24-r1:3::gentoo  USE="X introspection vim-syntax wayland* (-aqua) -broadway -cloudprint -colord -cups -examples -gtk-doc -sysprof -test -xinerama" 0 KiB
[ebuild  N     ] media-sound/apulse-0.1.13::gentoo  USE="-debug -sdk -test" 115 KiB
[ebuild  N     ] www-client/librewolf-bin-85.0.1::librewolf  USE="alsa ffmpeg startup-notification -pulseaudio (-selinux) -wayland" 77,842 KiB

Total: 7 packages (5 new, 2 reinstalls), Size of downloads: 78,664 KiB

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by www-client/librewolf-bin-85.0.1::librewolf
# required by librewolf-bin (argument)
>=x11-libs/gtk+-3.24.24-r1 wayland
# required by x11-libs/gtk+-3.24.24-r1::gentoo[wayland]
# required by www-client/librewolf-bin-85.0.1::librewolf
# required by librewolf-bin (argument)
>=media-libs/mesa-21.0.0_rc5 wayland

Would you like to add these changes to your config files? [Yes/No]
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sun Feb 28, 2021 2:52 pm

Who is behind Librewolf and why should it be trusted? I downloaded the AppImage and it won't run because it requires Wayland. Pthft!
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun Feb 28, 2021 4:00 pm

Why should you trust anyone?
It's just a patch on top of latest firefox, nothing spectacular, all of that could be done manually
Wayland req for binary packages is weird though, source version doesn't need it, bizarre.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sun Feb 28, 2021 4:21 pm

The Wayland dependency of the binary, and only having a Debian unstable repository gives the project the feel of a very busy one-man (or very few men) project. Not having very many eyes on a project tend to lead to unintended consequences.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sun Feb 28, 2021 4:26 pm

Wayland is required (at least the libs because that's the way they built the binary) but you don't have to run librewolf under wayland, it will also run under X11.
The wayland stuff is (dev-libs/wayland), they create libwayland, that wayland aware apps need to run, no different than creating libX11.
Eta: The wayland-protocols stuff goes with wayland, it's kind of like xorg-proto to X11. It's all dev libs/include stuff.

I've just started looking at wayland lately, simply because I'm interested in where it is at the moment.

I'm not running librewolf at the moment, because I'm not running gtk3 yet.
And I'd have to compile it with the wayland flag.
But the upside would be that I can then run either X11 stuff or wayland stuff with gtk3.

As for whether it is more secure or less than FF, like everyone else I'd have dig through the source code to find the answer. ;)


ETA2: I just looked at the latest firefox-bin (78.8 and 86.0) and guess what they also have wayland built in (gtk by way of gtk3), and thus a ebuild dependency.
So librewolf is really following what ff does (minus the telemetry, etc)
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun Feb 28, 2021 8:48 pm

About trust, everything is open sourced so that's good enough for me.
I like the privacy settings it provides, without me having to worry about many hidden settings, various patches, special profiles etc.
That's tedious to setup and configure.
It's little behind, couple of days I would say, I compiled v85 yesterday and I saw update today to v86, I'm emerging it right now as I type this :)
I like firefox, works very well for me, working with pure alsa is very nice, privacy settings out of box are good but there's still telemetry going on, google ties etc.
So, this LibreWolf project is adding even more, getting rid of all the noise that's in the stock firefox, using it for 24hrs and I like it, and will use it, firefox is depcleaned
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sun Feb 28, 2021 8:52 pm

kajzer wrote: ...
firefox is depcleaned
That's a giant step. Please keep us advised.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun Feb 28, 2021 9:26 pm

Sure will bud, glad you found that amusing!
Top
Post Reply

62 posts
  • Previous
  • 1
  • 2
  • 3

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic