If you're too lazy to click:
More details here.
Backup /etc/pulse/default.pa
Open /etc/pulse/default.pa
and find the line load-module module-role-cork
change it to #load-module module-role-cork
This will stop apps from muting other apps
Then find load-module module-bluetooth-policy
and change it to load-module module-bluetooth-policy auto_switch=0
According to https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-bluetooth-policy auto_switch=0 should disable switching between HFP and A2DP modes based on active streams.
Save the file, and reload pulseaudio - pulseaudio -k
> Can't find any documentation on avoid-resampling
I can't imagine why, considering how complete and comprehensive PA's documentation is.
--
avoid-resampling With avoid-resampling = yes, PulseAudio automatically configures the hardware to the sample rate which the application uses, if the hardware supports this sample rate (needs PA 11 or higher)
... says ArchWiki.
That's often the problem. For many things in Linux, the "Advanced Settings" dialog is missing in GUI. Same goes for power settings and touchpad settings. What could be solved with a couple of mouse clicks, needs spending a hour or two reading documentation and dicking around in command line.
Here's an example. I recently noticed that there is some A/V sync discrepancy which could be solved by adding some latency to audio. I found out that the PulseAudio loopback module can be used to add delay. The documentation for that module has been sitting in a browser tab waiting for some free time for me to figure out how everything works. I have no idea how PulseAudio modules are loaded or how and where their parameter syntax is defined, and it all just feels like a chore. There could have just been a simple GUI slider to add some delay.
Once again: the GUI is much more discoverable and much faster way to change settings if you only need to do some one-time thing. The CLI is often praised by nerds, but is faster only if you already know specifically what to type and you have to do it often.
By default the pulseaudio socket is not mounted, you have to request that, and that choice is overridable by the user. Although the permission request and overriding is very poorly exposed in the UI/CLI atm, clearly there is work to do there.
We're working on updating pulseaudio to have more finegrained permissions. See https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/AccessControl/
Pulseaudio has a Acoustic Echo Cancelling module, called module-echo-cancel. The algorithm cancels echo and also, in effect, filters noise. I use it myself, and it's not perfect but it is an improvement.
In default.pa
load-module module-echo-cancel source_name=<filter out> source_master=<filter in> aec_method=webrtc
Further, you can use an equalizer to emphasize your voice. The difficulty is there is no equalizer module for pulseaudio sources (microphones). There is likely a way to connect source to sink, filter and then go back from sink to source with module-loopback. Or you might be able to use module-jack-source and apply an equalizer to the source with JACK. I've never done these so I can't help on this end.
you can use the ladspa module to load whatever fun plugin you want.
there is also an aur package called pulseaudio-equalizer-ladspa which will setup a ladspa equilizer for you, with a gtk gui.
You can definitely do this with PulseAudio. Here's how I would do it:
pavucontrol
or pavucontrol-qt
-- at least in my case the KDE audio applet and the Discord input device selection do not display PulseAudio monitor sources.Example commands (fill in the correct names for your interfaces):
pacmd load-module module-null-sink sink_name=Virtual
pacmd load-module module-loopback source=MICROPHONE_SOURCE sink=Virtual
pacmd load-module module-combine-sink slaves=Virtual,SOUNDCARD_SINK
To make these stick, put them in ~/.config/pulse/default.pa
and then restart Pulse with systemctl --user restart pulseaudio
. You can figure your sink and source names with pacmd list-sinks
and pacmd list-sources
respectively. You can change the name the null sink and combine sink show up in your system audio control interfaces with pacmd update-sink-proplist SINK_NAME device.description="Human readable name here"
(if you're invoking this from a shell prompt, you may have to escape the quotes somehow, but how exactly that's done is escaping me right now. In default.pa this will work as is)
No need to listen to your own voice or anything like that, and it won't create an echo for people listening in on the stream because you can do per-application routing in Pulse.
Further reading: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/
> Audacity for example doesn't work at all with PA.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/ :
> Audacity as packaged in Fedora 11 and 12 works with PulseAudio.
>Audacity has now been packaged with a proper "alsa: pulse" device listed, in a ppa for ubuntu intrepid. See https://launchpad.net/~diwic/+archive
If someone actually has it working I would like to hear about it. It was planned for PulseAudio 13 but then for some reason was not. If you look here it is crossed out in the release notes: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/13.0/ No newer versions since 13 has mentioned it again.
That doesn't look like sandboxing.
> How to pass the sound in my regular system?
> How to access files located in my regular system?
Bind mounts.
> Where would I place a config file?
The usual location.
When I had a related issue I was able to fix it by adjusting /etc/pulse/default.pa
based on what I read from the PulseAudio modules page. Check out the sections for module-switch-on-port-available
and module-switch-on-connect
. Hope that helps!
edit: I just checked my /etc/pulse/default.pa
and see that there is a pacnew file alongside it which removes load-module module-rescue-streams
so might be worth checking if that is related.
https://wiki.ubuntu.com/FocalFossa/ReleaseNotes
If you are using a Ubuntu 20.04 based distro, pulse 14 is standard. You do not need to do anything.
​
PulseAudio 14.0 (prerelease)
I'm going to screw something up so someone smarter will correct me, but PulseAudio is "a sound system for POSIX OSes, meaning that it is a proxy for your sound applications" ^[0] . So if something is wrong, you get no sound and since there is no text in the comic it's implied there's an issue and I'm just kind of rambling at this point, did that help?
I was interested so I looked it up...
From: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/11.0/
"Now it's possible to set "avoid-resampling = yes" in daemon.conf, which will make PulseAudio configure the hardware to whatever rate the application uses (if the hardware doesn't support the application's rate, resampling is of course still done)."
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/
> And yet pulse pops and alsa doesn't. I guess it's my fault for not knowing enough about sound drivers to google "timer-based scheduling" beforehand.
.....
By default Pulseaudio is a per-user thing that is invoked upon login, so it's the sound of it starting up and grabbing an audio output. You can change your PA config to be systemwide, but there are considerations (linked in article).
How do you start qutebrowser? As a gui applications I assume not through your init system ;). DE autostart? display manager startup files? WM config files?
What if you manually start pulseaudo before your start qutebrowser with pulseaudio --daemonize
? (More details here)
I used to use a Windows build of pulseaudio for this like a decade ago for a similar situation (streaming from mpd, although I didn’t use zeroconf). There is a build available here but as you can see it’s just a bit out of date :p
Since these kind of things are normally done in driver/software not inherently no.
You can however apply your own software equalizers/surround emulations. See pulseeffects/easyeffects for an extensive catch-all soution or e.g. on pulseaudio there's the virtual surround module
>Creative Sound Blaster X4
Yea... creative are jerks to Linux... Do not expect drivers on Linux.
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/
> Regarding snd-emu*: Creative doesn't like Open Source -- there are no docs available. If you buy Creative it is hence a bit your own fault.
Check ArchWiki's PulseAudio entry, look at the related pages, if there is nothing in the main article.
$ less /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
Read through the top and bottom comment sections, it should give you an idea what the configuration options are. Create a new file in that directory with a new profile definition that includes channel mapping as desired. Not sure if using the environment variable is the only way to load the profile as per documentation.
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/
Iit's technically possible using pulseaudio however the configuration isn't trivial (on the cleint side any player that can connect to a multicast RTP stream will work). I'm not even sure if it's actually possible in newer libreelec as I'm not sure if they still use pulseaudio or have all the modules available.
It's likely much easier to use the pi's line-out and either an analog mixer or input that in to your computer and mix it digitally. If that's too low quality you could also split out the hdmi digital audio in to the computer, though digital-in audio isn't too common on computers.
Download, compile and install latest Pulseaudio (pulseaudio 15.0-25-g19ad).
Version 15 includes support for Bluetooth A2DP AVRCP Absolute Volume.
I hope it solves your issues.
I don't do much with audio and multimedia but I can't use Pipewire until the echo-cancellation-module is available. My mic sounds awful without it.
On the other end I look forward to manage my audio streams with carla :D
I'm not versed with pulseaudios modules, but there seems to be a module that should fit your needs exactly https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-switch-on-port-available
You'd usually do that with module-switch-on-connect but that only works for new sinks by default, a headphone into existing card doesn't constitute a new sink afaik. But I might remember wrong and don't have a testable setup, so the easiest this would work is if you add load-module module-switch-on-connect
before the if udev-detect
line in your /etc/pulse/default.pa and restart pulse with systemctl --user restart pulseaudio
if that doesn't work, you probably want to listen to the jack event yourself with acpid as well and then mute/unmute the USB speakers: https://wiki.archlinux.org/title/Acpid see this post from a while ago that has a working example script https://bbs.archlinux.org/viewtopic.php?pid=1646244#p1646244
But you'd need to move all active sink-inputs between the two distinct devices.
Here's a script with some pointers, shouldn't be too hard to adapt. https://www.freedesktop.org/wiki/Software/PulseAudio/FAQ/#howdoiswitchthedefaultsoundcardmovingallapplications
Instead of making a shell script and autostarting it, you can put the commands in ~/.config/pulse/default.pa
. Just remove the "pactl" from the beginning of the commands.
Here's what I have in mine (my concern is keeping voip out of recordings/streams rather than music, which is why I call one of these "VoIP Output", but the principle is the same):
load-module module-remap-sink sink_name=default_output master=alsa_output.usb-BEHRINGER_UMC204HD_192k-00.analog-surround-40 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right remix=no update-sink-proplist default_output device.description="Default Output" load-module module-remap-sink sink_name=voip_output master=alsa_output.usb-BEHRINGER_UMC204HD_192k-00.analog-surround-40 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right remix=no update-sink-proplist voip_output device.description="VoIP Output"
I use remap sinks instead of loopbacked null sinks, which lets me do the same thing with fewer modules. I also use update-sink-proplist
to give the sinks a nice human-readable name in pavucontrol
and the KDE audio switcher applet.
EDIT: and you can indeed set these sinks as the default "device" using audio switcher applets, but failing that I believe pactl set-default-sink
can do the same thing.
I have a scarlett solo and am on Arch, but I'm still using pulseaudio and pavucontrol so I wouldn't imagine it's too different. On pavucontrol make sure the 2i2 is set to the fallback device on the "Output Devices" tab, and on the "Configuration" tab I have every other device turned off, and the scarlett solo set to the "Analog Stereo Duplex" profile (I imagine due to the 2i2 having 4 channels it might have a different option, but look for the Analog ... Duplex option). You can read more about pulseaudio default/fallback devices here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/DefaultDevice/
pulseaudio has a module for that - module-null-sink
use this command to add the module to pulseaudio
pactl load-module module-null-sink
and to make it the default sink
pactl set-default-sink null
to listen to an audio stream, go to pavucontrol --tab=1 and click on the drop-down menu to re-direct audio stream in from null to the audible output sink
I do believe you CAN run Pulseaudio on Windows. It's a pretty old version, but it should work. With that you could create a bridged network (so you can see both the host and the guest on the network) and use Pulseaudios ability to send audio over a network to send it to your host.
Here is Pulseaudio on Windows https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/
As I understand it no its not possible. Here is some documentation about the problem and designs to solve it: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/AccessControl/
It seems this will never be solved and we'll have to wait for Pipewire
For those that don't know, you can also change pulseaudio's resampling method to be lighter on cpu, or higher, if you need. https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Audiophile/
My default.pa
is default one provided by distribution. However, thank you very much, once I knew that this is intented behaviour and not my mistake, I was able to find https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index28h3
, so changing load-module module-stream-restore
to load-module module-stream-restore restore_device=false
did the trick.
I really don't understand why restore_device
defaults to true. I mean, restoring volume and mute state can be useful, but don't tell me this is something majority of users find useful.
So, thanks again :)
Iirc, PulseAudio itself still has a ducking module built in, but the VOIP audio stream has to report itself as a different role from your music: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index61h3
I've had issues along these lines in the past. On most Linux distributions, we use PulseAudio as an audio manager. Pulse cones with a collection of loadable modules, and if I remember correctly there is a module that measures and significantly reduces background noise. I don't have a precise solution, but you can find documentation for PulseAudio at https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/
I hope this helps you find a solution.
There's a PulseAudio server (i.e. the part that ouputs audio) for Windows here.
You should be able to do this entirely with Pulseaudio with a setup like the following. This assumes that both guest and host have their own physical audio output devices and you're simply switching outputs on your receiver/amplifier If this isn't the case for you, let me know how your audio devices are connected and I can provide alternate instructions.
It can be easily done by adding a Pulse sink.
Documentation here. You need a HRIR filter specifically calibrated for your head for best results. But a bunch are linked there.
I don't know exactly what AudioFX sounds like but you will probably not replicate it. Professionally made virtual surround typically also has some layers of equalization and matrix decoding filters.
> planning to do initial boots on linux with a later install of windows (potentially dual booting).
well, you build will be a nightmare on linux. Creative and a Nvidia card. ouch.
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/
> Regarding snd-emu*: Creative doesn't like Open Source -- there are no docs available. If you buy Creative it is hence a bit your own fault.
This sounds like something that could be implemented in the pulseaudio config without the need to look at MPRIS or writing an extension. The role ducking module should offer everything you need:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index66h3
Here is a list of the possible roles:
All of your use cases can be done in Pulse?
> routing audio between clients
Pulse Audio has pipes and sinks so it could be done to reroute the audio? - https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index2h3
> realtime DSP (Here is instructions on using compression with Pulseaudio
https://www.bfccomputing.com/dynamic-range-compression-for-pulseaudio/
In the Linux world, pulseaudio supports network audio sinks. Combine that with pulseaudio's ability to combine multiple sinks into a virtual combined sink, you can play audio across multiple speaker nodes within a home. https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/
You can even combine it with a bluetooth audio input running on one or multiple nodes (also done my pulseaudio), to connect a windows PC to the wireless speaker setup.
UPDATE: I worked around the issue by creating a script which reloads pulseaudio, unloads the steelseries 9 module, then reloads it explicitly with a certain profile for the steelseries 9 headset. I think this profile file came with the pulseaudio install so it should work out of the box. The only problem with the script is I had to run it manually when the headset is plugged in. I used to run it at boot but if the headset dongle wasn't plugged in it wouldn't work.
#!/bin/bash
# Links:
# * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-alsa-card
# * https://askubuntu.com/a/524942
# To fix an issue on which I've spent way too much time where a default profile set is loaded for my Steelseries Arctis 9 Headset instead of a gaming/chat profile which has way crisper sound.
systemctl restart --user pulseaudio.service
# If headset is plugged in.
if [[ $(pactl list modules short | grep 'SteelSeries_Arctis_9') ]]; then
# Grab the parent module id
MODULE_ID=$(pactl list modules short | grep 'SteelSeries_Arctis_9' | awk '{print $1}')
# Unload the headset parent module
pacmd unload-module $MODULE_ID || true
# Fetch the correct device_id (https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-alsa-card)
DEVICE_ID=$(cat /proc/asound/cards | grep "SteelSeries Arctis 9" | head -n 1 | cut -d' ' -f2)
# Load it with extra module params (profiles)
pacmd load-module module-alsa-card device_id="$DEVICE_ID" name="usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00" card_name="alsa_card.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1" profile_set="/usr/share/pulseaudio/alsa-mixer/profile-sets/usb-gaming-headset.conf" profile="output:stereo-game+output:stereo-chat+input:mono-chat"
fi
Nope, creative is hostile to Linux.
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/BrokenDrivers/
> Regarding snd-emu*: Creative doesn't like Open Source -- there are no docs available. If you buy Creative it is hence a bit your own fault.
Typically these devices (3,7,8, etc.) correspond to different speaker configurations (stereo, 7.1, etc.). At least that is my impression for dealing with other users' issues. One would have to go through the source code to be sure.
Broken pipe error might correspond to the parameters used. I suggest these, because the defaults take a very long time to switch channels and loop. Also shell environment might affect it. I wouldn't worry about that.
> And I can see the same kernel error happen without pipewire/pulseaudio, even only with one monitor plug in.
It looks like a driver issue either way, so ALSA would be closest relation from the audio group, but this is likely a GPU driver issue.
Back to the issue at hand. So if each of these HDMI devices outputs to a different monitor, we can assume this works as intended. The next step would be to either create a configuration that outputs to both. On ALSA there is plugin copy
, on PA/PW it would mean creating a new profile. I think it would be necessary to create a new file in /usr/share/pulseaudio/alsa-mixer/profile-sets/
with new channels mapping and addressing both devices.
https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/
Could the crashing be triggered by high cpu usage or memory usage?
Which versions of ALSA and PulseAudio?
It might be possible and informative to see what PulseAudio logs when the crash happens, more info here:
https://www.freedesktop.org/wiki/Software/PulseAudio/BugReports/
I'm over my head with PulseAudio, but the "index" is usually 0 or 1. I think your DAC would be 1. When I got it working on my laptop, I made use of these commands:
pactl list short sinks
and
pactl set-default-sink 1
And this page helped: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/DefaultDevice/
1. Show it, post a screenshot. With all selection options visible.
2a/3a. That's the "monitor" so playback stream looped back to act as input source. Once you play audio on it, it will provide input.
You've confused a loopback device for a hardware one.
From PA documentation: > module-null-sink > > Provides a simple null sink. All data written to this sink is silently dropped. This sink is clocked using the system time. All sinks have a corresponding "monitor" source which makes the null sink a practical way to plumb output to input.
Well if the game straight up has no audio, then -> no sink-input -> no way to move it to another sink, and there you are.
But if it does have audio but the sink-input is muted, then you should know that pulseaudio remembers the sink used for each sink-input and tries to restore it if the sink is found, if not restores it to the default sink. The module for this functionality is called <code>module-stream-restore</code>.
You don't need to do anything to load this module, just move the sink-input to your desired sink with the command pactl move-sink-input $your-sink-input
$your-sink
.
Maybe the release notes has the answer?
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/#supportforhfpbluetoothprofiles
It says HFP mode in PA15 is the default but lacks HFP HS role, and you need to change the backend parameter from 'auto' to 'ophono' to use the old backend. I'm not sure if this is your issue, but maybe worth to try.
Try capturing a verbose log from pulseaudio
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Community/
It should give more info not found in syslogs.
In wine you can use winetricks
to disable pulse and use alsa
in the GUI or with
winetricks sound=alsa
or back with winetricks sound=pulse
I don't know how HGL works.
If you only want to hear audio locally from Nintendo device (to headphones or speakers)
there are usually audio playback controls in alsamixer
for zero-latency monitoring of audio capture inputs from microphone and line-in jacks
But if you want to mix the line-in audio to VOIP callers or a livestream that would require a loopback in PulseAudio (or JACK for lower latency)
PulseAudio documentation for module-loopback option latency_msec has this note:
>module-loopback | PulseAudio Documentation
>
>this is only a friendly request, the actual latency might be higher or lower than this value
If you request a value for latency_msec that PulseAudio cannot deliver it will ignore the request
You may also need to use the channels and channel_map options for the loopback to make sure the mono microphone stream is remapped to stereo for the sink output
I currently use the Sony MX4s and they worked right out of the box with Pop. I also use PulseAudio which is great.
Crappy deal your setup didn't work. A reinstall and revisit is always encouraged.
I use the Sony WH1000XM4s and like /u/Eorika said with the 3's, they are amazing.
With Pop-OS, I found when using a BT headset that installing PulseAudio and selecting A2DP Sink codec, the audio is flawless. Just don't use the HSP/HFP codec and you'll be golden.
The only downside to this is, yes the audio sounds amazing, but you will need an external mic. I currently use the AT2020 USB version and everything is wonderful.
Edit: Corrected link.
If you run man pulse-cli-syntax
you will find an explanation of the syntax of default.pa
. All of those commands can be also run from a shell by prepending pacmd
to them.
What you will most probably want to do with default.pa
is load and configure modules. You can find a list of the modules and their configuration options at https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/.
The two modules used in my answer are module-null-sink
and module-loopback
.
More links:
module-null-sink: Create a virtual sink to play your audio to. You can use a "Monitor of ..." device to capture from it.
module-loopback Route audio from a source (microphone) to a sink.
module-combine-sink Combine two sinks into one.
You can now route your microphone from your microphone to a sink using loopback, combine that sink with a null sink and then capture from the monitor of the combined sink.
This is a known problem and should be fixed in recently released PA14, see release notes
The new release comes with a blacklist for auto switching. You may add your usb hub to it: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/#automaticswitchingtohdmiisnowdisabledbydefault
If you don't have use for the auto switching feature, you may also disable the module altogether.
I've never tried anything like that, but I would assume if you can get them all connected and listening, creating a virtual device, then setting loopbacks for all of your microphones to go to the loopback device would work. You could then output to a different null sink, and loop it's output to the speakers so they both take input, and play output.
PulseAudio also has built-in Echo Cancellation that might be useful for a project like that. An example using echo cancellation can be found here on the Arch Wiki.
Instead of editing pulseaudio files, long time ago I created a profile with these instructions: https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/
It looks like nowadays I don't need that anymore. So, always check first if you need to apply these kind of workarounds.
>Multi-user is having seperate user accounts for different people, not using the PC at the same time. This is somewhat common, and used to be very common a few years ago when PC's were expensive enough to not have more then one per household.
I'm aware of that, but in this setup you wouldn't have the mentioned problem, right? Why would PulseAudio fail?
I'm only using my system alone, so I have never had issues that come with multi-user systems. But what would be a situation in which PulseAudio is causing problems?
>I think nobody does this.
Only experimental, I think so too.
>Here's the reasons why PulseAudio developers think running it system-wide is a bad idea.
About that I know already, I'm having more issues to understand in which setup PulseAudio would give you troubles.
You shouldn't ever need/want to use the pulseaudio system daemon, heres why:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/
In addition, you shouldn't need the alsa service if you're using pulseaudio.
Your issue with tor likely likes elsewhere.
If I understand it correctly, then module-loopback is exactly what you want.
pactl load-module module-loopback source=<name_of_source_of_nintendo_audio>
You can use pactl list sources
to find out the name of the source.
suggest checking if the systemd service and socket is ok (assuming it exists on the OS)
systemctl --user --full --no-pager status pulseaudio.{socket,service}
'pulseaudio -k' can cause pulseaudio.service to fail. suggest use this command instead
systemctl --user restart pulseaudio
It can also suspend audio sink outputs and fail to reload some pulseaudio modules. Both of these can be checked using
pacmd dump
KDE requires a specific module module-device-manager that may be absent from list of modules. I am not a KDE user so I have no knowledge beyond that, but I suspect that it affects function of KDE audio controls
Installing pavucontrol-qt
might help to work around any problem with DE controls
and maybe pasystray
to monitor pulseaudio internals
I don't have any tutorial. I've used documentation pages of PulseAudio: on wiki.archlinux.org , PulseAudio modules and this tutorial when I've been searching for the easiest (GUI) way to combine sinks (of course it ended at manual configuration...). After a few test configurations, it started working. Quite big lag is noticeable, especially between local and network outputs, but sometimes it's bearly audible. As it's not extremely annoying in my case, I didn't look for the reason nor any solution. It can be connected with client, server and network load. If you want to try this configuration, I have to mention that I recently noticed that on my RPi it's as reliable as any other service on it. My point is that sometimes it stops working without any reason and needs be restarted a few times, especially after a long time idle.
It is still possible to do the mixing in software, even though that may not be as convenient to control as a simple knob.
It may even be possible to write a custom profile, but what you want 1) may not be feasible because of the architecture of PulseAudio (unlikely, but not impossible); 2) it is probably very time consuming to dig up documentation and do the trial-and-error.
Update:
(thank you u/balsoft u/rainformpurple u/power_of_booze u/dr_jekell for your help)
I got a new dongle (Amazon link) which seems to work better. Pairing is no problem and auto connect works fine. My experiences so far:
When using the A2DP profile, playback works fine and sound quality is great (man, those little shits of earbuds are impressive). However:
I tried to switch to HFP to get the mic working. I had to install ofono/phonesim and tweak some configs (helpful link, for those interested) to get it working, and got it eventually after fiddling around for half an hour. However:
I don't know what to blame here. The dongle, the earbuds, Linux? I guess I'm just running into limitations of the Bluetooth protocol here. If that's the case, I must come to the conclusion that Bluetooth is just garbage.
I'm also seeing this issue.
I did a bit of research and as far as I can tell there's been some historic change-up with what packages support the HSP/HFP with bluetooth. (For example BlueZ v5 no longer supports it.)
I got to this PulseAudio page and started following it. It seemed promising but, once it got into ofono configuration it was beyond my level of effort. lol
​
I ended up just using the 2.4GHz usb dongle my headset came with rather than the bluetooth.
​
Edit: Not saying that it won't work, It just looks like you need to configure PulseAudio + Ofono
I'm using this. Any ideas for making the LADSPA module ignore redirection from changing the default sink? I like to use that to globally change audio outputs from headphone to speakers and vice versa but when I do it, the output from the module changes to that output from the null sink I created. I fixed this on the loopback module with "sink_dont_move=true" but that doesn't seem to exist for LADSPA sink modules.
Yep that could be it, also this if you have it. you could look into configuring it /etc/pulse/default.pa
but make sure to back it up
if you want to avoid persistent changes this can probably be done during runtime using pactl/pacmd too.
pulsaudio always have a dummy output available, it is called module-null-sink
. To test it in the current session:
pacmd load-module module-null-sink
and choose Null Output with your preferred tool, e.g. pavucontrol
EDIT: forgot the link https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-null-sink
Yes. I just picked a picture from google (apparently from mint, but looks the same anyway). The name as "fallback" (=default) is a bit confusing but how pulseaudio calls things:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/DefaultDevice/
New apps use the default output, but you can manually override it on a per app basis if you want. The linked text says it remembers overrides and what to do if you don't want that.
Did you try loading the network modules in your .conf files?
Here's the set page I found that discusses oFono:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/
What is your physical setup? Are there any possibilities for the error occuring? Did the same setup work on a different OS?
There is a module called module-loopback which is designed to route audio back to an output sink. To see if this module is currently loaded simply type pacmd list-modules | grep "loopback" if the module is loaded I would try to disable it by using pacmd unload-module module-loopback and see if that helps.
It's software mixing/volume attenuation in PulseAudio, so there is no perceived limit. ALSA also has a softvol
plugin. PA has the volume_limit
common parameter for volume control modules: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-mmkbd-evdev but usually DE or volume control applications allow to set a maximum value.
AFAIK my ports are mapped correctly, when I check using hdajackretask, I can see that the default option for "Line Out, Rear Side" is "Line Out (Front)" and "Headphone, Front side" is "Headphone", but when I apply the override, with jack detection "Present", I can switch to headphones and it will only output through my headphones, but switching to speaker, there's no sound from the speakers.
>So switching profile or port doesn't work? You could create a custom profiles: https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/
Well, I have to select Stereo output duplex, or else my mic won't work.
I mean, I can select the port using pavucontrol or sound switcher indicator as I mentioned above, but is there not a module or something, that I can add to default.pa, to make it switch properly?
I haven't messed, or fully understood alsa profiles, but I think that script that I mentioned edits the path files, which are used by the profiles, so the correct output gets muted. Also, aren't the profiles also in /usr/share/pulseaudio/? I though they shouldn't be changed.
I will try disabling these modules, to see if it works.
Thanks!
>This is expected behavior. Check https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/ in particular module-switch-on-connect and module-switch-on-port-available. If any of these modules is loaded, you can unload it via pactl or pacmd and replug your device to test.
I know that this is expected, but I want to change the behaviour. Will it work, if I just disable these modules?
>You shouldn't be doing this in the first place. Changes to the system outside of the package manager eventually break it. That's the whole point of having a package manager
I know, I was supposed to be a temporary solution until I find a real one. I though, there must me a "normal" way to do this.
> On Windows this issue doesn't exist.
It's not an issue, it's a feature. Disable Auto-Mute
or similar in alsamixer
for the sound card you're using (F6 to select). PA also has modules that redirect audio on connection, check these as well (module-switch-on-connect
, module-switch-on-port-available
).
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/
GNU/Linux is not Windows.
It's not ALSA, it's PA's feature. There is no module-role-cork
listed in https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/. There is module-role-ducking
however. Try unloading that.
They work out of the box as headphones. To get them to work as a headset requires HFP support, which pulseaudio only supports via another daemon called ofono, and you have to run phonesim as well, to simulate a mobile phone, to get it to work! Details here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index3h2
> For some reason when I plug in my mic, DEFAULT_SINK changes to the microphone. I can check it with pacmd info |grep Default which gives me:
It's probably either that one or the next one that causes this behavior. And you're not connecting just a microphone, but a USB device, hence the module gets triggered. It doesn't matter if it only has capture capabilities or not. So the terminology is bit misleading. If you connect a microphone to your internal sound card, it won't behave the same way.
How is @DEFAULT_SINK@
defined? You could using bindings to call a script instead that handles all of this for you.
Hi, I can't say that I have the same problem, but I'm having issues with a Bluetooth headset (phone+mic).
So far i've found these documentations:
https://wiki.debian.org/BluetoothUser https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index5h2
to check what's wrong on my hw. I still haven't solved my problem, but found a lot of commands to check which part is failing. It isn't much, I hope this help your case.
I'd like to try one last thing. I've found this : https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index3h2
> I's possible to force PulseAudio to only enable HSP or HFP with the "headset" option of module-bluetooth-discover (configured in /etc/pulse/default.pa). By default the option is set to "auto", but if it's set to "native", then only HSP is enabled, and if the option is set to "ofono", then only HFP is enabled."
I'm not sure how to "set options". Do you think this could be a solution?
I don't hear a problem. You want to say the constant switching on the Line out device is the issue?
That's not an audio per se related issue. Either way check the documentation for default values for fragment number and size and revert to them.
Check for the same behavior using pavucontrol
. What is your physical setup? Was there damage to any of the sockets?
If you can spare it, unload both module-switch-on-connect
and module-switch-on-port-available
.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-switch-on-connect
module-switch-on-connect
has a blacklist
option, so if unloading it works, maybe you could blacklist the appearing device/port.
As a side note, I don't see the point of making a video, unless you extract the only relevant part and also provide screenshots. To which value or form is it jumping/switching?
You might be required to create a custom profile that incorporates both, otherwise I would try creating a dsnoop
device under ALSA for the two capture sources and try using that in PA. Haven't looked into it though, so it's an educated guess.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/ https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
Local configuration should take precedence. You should include the global configuration and then introduce your changes, unless there are conflicts, then only use a local version.
> module-switch-on-connect
You can read the documentation about differences. Choose whichever one suits your need best.
I can see the error log, but not the contents of default.pa
. The link, if you intended to create one, is linking to the filename.
> I read here on the Arch Wiki about profile problems, and it says there that I should add this line to fix it.
How about you read the previous comment I wrote to get you exactly that setting?!
Edit: Format, attention note.
Yes, look at module-loopback and module-null-sink
You can create them via:
pactl load-module module-loopback latency_msec=1 pactl load-module module-null-sink sink_name=my_null_sink sink_properties=device.description="My Null Sink"
Then mess around with them using pavucontrol
The actual documentation for that module is here. As usual for Pulseaudio documentation, it isn't complete.
The WebRTC audio processing code is a cut down version of web browser WebRTC dealing with audio processing only, so it's possible some of the undocumented settings do literally nothing, but have been left in.
Even if VAD is working, all it does is label a section of the audio as (probably) voice vs. not voice. It's up to the end application to do something with that information.
But wouldn't the resample be done anyway if the card does not support a specific rate?
According to this...
>if the hardware doesn't support the application's rate, resampling is of course still done
Should users be in the "audio" group?
There are three kind of distributions: 1) those who control access to the sound card by adding users to the "audio" group, 2) those who use udev (or HAL) and ConsoleKit to dynamically give access to the currently "active" user, but allow overriding that using the "audio" group and 3) those who don't use the "audio" group at all, but rely solely on HAL+ConsoleKit to grant access to the sound card.
From FreeDesktop: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/
This is possible and I remember having had this configuration accidentally a few years ago. I think I didn't use pulseaudio back then but if you can configure an alsa device, you can manually add it to pulseaudio by loading the <code>module-alsa-sink</code> with the correct alsa device.
Configuring an alsa device shouldn't be too difficult; Use the route plugin to send the front L/R signal to rear L/R output, slave it to the real device and that should be it.
I'm not sure if there is additional configuration regarding mixing required if pulseaudio itself tries to access the device as well. Maybe you have to play around with dmix or manually remove the card from pulseaudio by unloading the module-alsa-card and stick to your manually configured sinks.
Here is a great page regarding alsa configuration. Especially the part about swapping channels for a surround device is similar to your use case.
There is a pulse plugin for saving previous setting.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index28h3
It's called module-stream-restore. See if it's installed and working.
Otherwise it could be "flat volume" which I personally think sucks. It causes your master slider to be equal to the current highest other slider. And new streams start equal to master. So that could also be the issue. I disable flat volume because I dislike it.
J'avais un Nokia N900 qui prenait la poussière et après avoir récupéré une chaîne Hi-Fi, j'ai décidé de les faire collaborer : )
Pour ceux qui ne le savent pas, l'OS derrière le N900 est basé sur Debian. Alors certes il est vieux, mais ça fait l'affaire. Après, je regarde avec enthousiasme l'arrivée de Maemo Leste.
Profitant de l'émetteur FM et infrarouge du N900, j'ai réussi après de longues soirées à configurer module-native-protocol-tcp en me basant sur ce tutoriel. Bon, c'est Pulseaudio et au début j'avais des coupures et ça devenait parfois presque inutilisable. Pile au moment où j'ai commencé à chercher des alternatives, les soucis de latences au disparus !
Ensuite, j'active l'émetteur FM sur une fréquence inutilisée et ma chaîne Hi-Fi réceptionne le tout.
J'ai récemment joué avec LIRC et la commande irsend et après avoir dû bidouiller pour trouver les bons codes hexadécimaux acceptés par ma chaîne Hi-Fi, j'arrive à l'allumer, l'éteindre, augmenter et diminuer le volume tout ça depuis mon laptop.
La prochaine étape, si je suis motivé, sera de compiler le module Pulseaudio zeroconf pour le N900 pour m'éviter de stopper et redémarrer Pulseaudio sur mon laptop. Même si j'utilise un alias pour cette dernière action lorsque je démarre l'émetteur FM et la chaîne Hi-Fi, je pense que c'est un peu plus propre.
Un autre truc que je pourrais faire, serait un script qui s'exécute uniquement si je suis chez moi et si le N900 est joignable, mais je me dis qu'un simple alias fait largement l'affaire.
Yes, I think it had something to do with the user. I discovered this while surfing for answers: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/ -- specifically the section 'Should users be in the "audio" group?' My user was in the audio group, so I removed "mark" from that group. Now, with timidity-daemon purged, audio does work when I reboot into the system. So, my sound issue is solve. Again, thanks so much.
Regarding timidity-daemon, it does seem that they experienced this during the testing stage, yet ignored it and proceeded anyway.