tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
748 stars 74 forks source link

Module option to enable speakers experimentally #100

Closed diamondburned closed 8 months ago

diamondburned commented 10 months ago

Hi! First off, this project has been working awesome for me on my Macbook Air M1. However, I'm just dying to get the awesome speakers going, so this issue will be about potentially adding an option that enables the speakers.

Proposal

Add a module option of the format

hardware.asahi.pleaseBlowUpMySpeakers = true;

which will:

  1. Add the snd-soc-macaudio.please_blow_up_my_speakers=1 option into modprobe options,
  2. Install alsa-ucm-conf-asahi into the system, and
  3. Install asahi-audio into the system.

Problems

This may actually blow up a lot of people's speakers

Not much needs to be said about this. It's why the feature is gated behind an option that is aptly named.

It is worth noting that efforts in adding this option right now will likely make it far easier to support speakers once they are actually stable in Asahi, since it seems like some userspace solution is very likely going to be needed.

Installing alsa-ucm-conf-asahi

See https://github.com/tpwrules/nixos-apple-silicon/issues/54#issuecomment-1445332438.

Macbook Air M1 is actually not supported

Currently, asahi-audio doesn't yet support J313. Some attempt was made to get it to work (https://github.com/chadmed/asahi-audio/issues/6), but it is unclear whether this is the recommended method.

tpwrules commented 8 months ago

Sorry, but I don't want to make blowing up speakers as easy as setting an option, nor do I want to blow up mine testing it.

We'll wait until support is officially available.

sequencer commented 7 months ago

This is officially supported here: https://social.treehouse.systems/@janne

diamondburned commented 7 months ago

Let's go!!!! I will be adding these configurations into my dotfiles and see how things go. I thankfully have a Macbook Air M1, so I can test this out on NixOS!

Permalink to relevant wiki: https://github.com/AsahiLinux/docs/wiki/SW:Speakers

Implementation: diamondburned/dotfiles/Scripts/nix/machines/lilyhoshii/cfg/speakers/default.nix

Progress:

Despite missing some features (and breaking EasyEffects), this works really well now!