Skip to content
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

nixos/modules/config/pulseaudio: add support for custom ALSA paths and profiles #102691

Draft
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

dmanam
Copy link
Contributor

@dmanam dmanam commented Nov 4, 2020

Motivation for this change

This is adapted from Jookia's patch here.

The purpose of these changes is to allow users to change PulseAudio configuration files related to ALSA sound card profiles, which would be stored under /usr/share in a FHS distro. This is necessary to, e.g., enable multiple outputs on a sound card at once, and may also be necessary for certain sound cards which are not supported upstream.

It seems plausible that this patch for PulseAudio could be merged upstream, to decrease the maintenance burden eventually.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

adapted from https://releases.nixos.org/nix-dev/2015-November/018625.html

This allows overriding of the default PulseAudio ALSA configuration,
which is potentially necessary for sound cards with poor upstream
support, as well as for custom profiles.
…d profiles

adapted from https://releases.nixos.org/nix-dev/2015-November/018625.html

This allows packages to provide custom profiles, which is potentially
necessary for sound cards with poor upstream support. It also adds a
configuration option for users to define extra profiles in the default
profile set.
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 4, 2020

Maybe this should go through staging first but I am not sure.

@dmanam
Copy link
Contributor Author

dmanam commented Nov 4, 2020

I can rebase it to staging if that would be preferable.

By the way, I submitted the patch upstream, though who knows when or if it'll be reviewed...

@jtojnar
Copy link
Contributor

jtojnar commented Nov 5, 2020

Yeah, this being mass rebuild means it should be targetted to staging.

It might also make sense to find the profiles under XDG_DATA_DIRS instead of introducing new variables.

@dmanam dmanam changed the base branch from master to staging November 5, 2020 19:59
@dmanam
Copy link
Contributor Author

dmanam commented Nov 5, 2020

Although using XDG_DATA_DIRS would make more sense, it would also involve more substantial changes to the upstream code, as it currently expects to find everything in one directory. Since the environment variables are likely mostly only going to be used within the systemd service anyways, it seems to me like it would be preferable to go with the low-maintenance option.

@dmanam
Copy link
Contributor Author

dmanam commented Nov 11, 2020

Is there some chance of this getting merged? If modifying the pulseaudio package globally is undesirable, it can be changed to just use the patched version in the service, since the changed code is only called in the server itself anyways.

@hlolli
Copy link
Member

hlolli commented Feb 12, 2021

+1 would be nice to be have the ability to add profile-sets, which I'm struggling to do atm. But I guess I can ride with PA_ALSA_PATHS_DIR until this is merged.

@stale
Copy link

stale bot commented Aug 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 13, 2021
@wegank wegank marked this pull request as draft March 20, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants