4/26/2026 at 1:14:38 PM
>.. macOS only ever programs CS42L84 to operate at either 48 or 96 kHz, we could only add support for those two sample rates to the Linux driver ..> However, CS42L42 supports all the other common sample rates, and while the register layout and programming sequence is different, the actual values programmed in for 48 and 96 kHz are the same across both chips. What would happen if we simply took the values for all other sample rates from the CS42L42 datasheet and added those to the CS42L84 driver? As it turns out, you get support for those sample rates!
> The patch to enable hardware support for 44.1, 88.2, 176.4 and 192 kHz sample rates on both the input and output of the headphone jack was submitted directly upstream, and has been merged for 7.1. We also backported this to Asahi kernel 6.19.9, allowing users to take advantage of this immediately.
Nice bit of chip sleuthing and reverse engineering from the Asahi team!
by brynet
4/26/2026 at 4:01:22 PM
The following is actually the most surprising part to me.> This is quite limiting, as it forces PipeWire to waste CPU cycles (and therefore battery life) on resampling audio streams that are not either 48 or 96 kHz.
So the Asahi team thinks that only supporting 48 or 96 kHz wastes battery life by forcing the software to resample audio streams. But why does Apple still do this? Presumably Apple has a very high commitment to save power and increase battery life.
by kccqzy
4/26/2026 at 4:16:03 PM
Always possible that it's the standard commercial software company reason: They do know about it and have a P2 bug tracking it, but the team that maintains that code has 5000 other things to do, and it never gets fixed.by ryandrake
4/26/2026 at 5:24:34 PM
More likely it’s that 48 kHz is a more sensible default, since the majority of non-music digital audio is sampled at 48 kHz, almost anyone who cares about potential audio artifacts introduced by resampling is going to be using an external DAC, and (from an Apple-centric viewpoint) almost anyone concerned about the energy consumption of music playback on their MacBook is going to listen to music on their iPhone instead.by jasomill
4/26/2026 at 6:48:22 PM
Maybe this is a little pedantic, but we're not talking about a default among the many other available options supported by the chip. We're talking about 48 or 96 kHz being intentionally (or unintentionally) made the only allowed options.So either someone said "we must disallow the other options" or they didn't and it's a bug.
by ryandrake
4/26/2026 at 9:12:47 PM
do we ever get apple engineers rolling thru here or on mastodon? wish stuff like this wasn't such a black box behind the scenes.i think the only time ive ever run into an apple engineer was on mastodon related to gptk it was interesting to see they actually are quite tuned into what is possible on these devices and what that could mean for gaming. despite being a developer toolkit to help studios get a read on the work needed to optimize a game for a metal port, they were expressing that they were well aware such tools showed a lot of promise for getting games going on mac. not much of a gamer myself, but thought it was interesting to see a slice into engineering there & that they weren't as hostile as HN would believe them to be and broadly aligned with many of us. id be mega curious what apple engineers think about asahi.
by trueno
4/27/2026 at 12:47:54 AM
We’ve had a few over the years but it’s usually after they’ve left.E.g, an AppKit engineer or two, or the primary dev behind Rosetta 2. Not so sure of any hardware-engineers tho.
by Klonoar
4/26/2026 at 9:32:13 PM
> do we ever get apple engineers rolling thru here or on mastodon? wish stuff like this wasn't such a black box behind the scenes.Very rarely. I believe because Apple has a culture of secrecy and contractually forbids employees from sharing details about their work in most circumstances (and actually enforces this).
by nicoburns
4/27/2026 at 12:38:43 AM
I used to work there and can confirm this. They beat it into you during training when you’re first hired that anything you say can become viral news or be attributed as an official statement from Apple and they are strict about enforcement.There’s also extreme secrecy both between teams on different projects and even between teams within the same project just working on different parts of it. At least that was my experience.
I did enjoy my time there, but it was a very unique/strange development culture.
by einsteinx2
4/26/2026 at 9:49:57 PM
damn. that sucks.by trueno
4/26/2026 at 11:15:11 PM
[dead]by HDBaseT
4/26/2026 at 7:38:51 PM
Imagine LCD screen capable of emitting from IR to UV and people up in arms because laptop vendor software limits output to visible spectrum.by rasz
4/27/2026 at 3:19:26 PM
I would not agree with your analogy. [0] Turns out the movie industry actually uses infrasound in horror movies. [1] It might also explain why people think old buildings are haunted. [2]If Apple only focuses on audible sounds, their devices lack the ability to maximize the thrill of horror movies.
[0] https://en.wikipedia.org/wiki/Infrasound
[1] https://nightscapestories.com/the-art-of-sound-design-horror...
[2] https://www.theguardian.com/science/2026/apr/27/spooky-feeli...
by yndoendo
4/27/2026 at 7:53:21 PM
Tell me more about laptops and phones sporting 12 inch speakers, not that low frequencies are the problem here.by rasz
4/26/2026 at 8:01:55 PM
Come on, don't do that here. You can see in the thread I replied to there are practical benefits for supporting additional sampling rates.by ryandrake
4/26/2026 at 10:41:42 PM
Practical reasons vanished ~20 years ago, about the time Microsoft dropped hardware audio acceleration and switched to software audio mixing. Resampling is ear transparent and eats less than 1% of one slowest possible CPU core.by rasz
4/26/2026 at 10:38:58 PM
Likely because the only speakers Apple cares about are Airpods/Airpod max so they are free to only pick the 2 most common sample rates.by adgjlsfhk1
4/26/2026 at 8:48:03 PM
Presumably Apple can resample audio streams extremely cheaply.by LoganDark
4/26/2026 at 9:34:11 PM
I mean the algorithms for that are known, and PipeWire/PulseAudio implements them competently. But it still has to be done.by mort96
4/27/2026 at 9:22:34 AM
Just like the mouse that has to be polled 100 times per second or display that is composited from all window buffers at least 60 times per second. It might really be negligible in the grand scheme of things and not worth optimizing for.by bzzzt
4/27/2026 at 2:08:32 PM
You cant imagine how much strain fast-moving mouse cursor put on display server of almost any OS if there a lot of windows open simultaneously. Also non-standard cursor sizes / formats are still such a mess everywhere since even in 2026 there are semi-hardware and software cursors...by big-and-small
4/26/2026 at 1:16:31 PM
whoa, bit perfect CD/flac playback in 44.1, that's a killer feature.by functionmouse
4/26/2026 at 2:16:38 PM
There are many audio resampling libraries available that can convert from 44.1 to 48 kHz with no perceptible quality loss. E.g. seehttps://github.com/hasenbanck/resampler#quality-analysis
This is presumably what Apple does. You kind of have to anyway or you have the stupid situation Linux used to have where only one app could play audio at a time.
by IshKebab
4/26/2026 at 2:22:00 PM
Hardware often reports supporting 44.1kHz but internally resamples it to 48kHz so you're better off properly resampling it yourself.by chronogram
4/26/2026 at 4:01:12 PM
> you have the stupid situation Linux used to have where only one app could play audio at a timeWhen was that? I think my first Linux distribution was Ubuntu 8.04 and fairly sure it shipped with PulseAudio which in mind always been able to play audio from multiple sources at the same time, maybe I misremember?
by embedding-shape
4/26/2026 at 4:57:49 PM
Pure ALSA would behave like that because the currently playing process would take exclusive control of the hardware.Upsite: Highest quality playback.
Downside: Only one process could play audio at a time.
by Matl
4/26/2026 at 5:41:33 PM
Only if you had no hardware nor software mixing configured, which probably should be considered a misconfiguration of your system.by seba_dos1
4/26/2026 at 6:22:29 PM
ALSA had dmix for some time already, but the default configuration of your distro may not have enabled it.by BoingBoomTschak
4/26/2026 at 8:29:49 PM
As I recall it was rarely enabled by default and was a pain to set up so in practice not really used.The most common solution at the time was PulseAudio, which was so bad it usually was better to just use direct ALSA and live with the idiotic one-at-a-time limitation.
Thankfully Pipewire seems to actually work reliably so I guess that's at least one thing ticked off the Year of the Linux Desktop checklist.
by IshKebab
4/29/2026 at 11:03:40 AM
It was the default on Gentoo long before Pulseaudio was the default anywhere. If other distros messed up their config I cannot say but the fixing that would have been a lot easier than moving to an entirely different system with an incompatible application interface.by account42
4/26/2026 at 6:13:15 PM
Most distributions shipped ALSA preconfigured with dmix, which means multiple applications could play sound at the same time just fine.Which is why the whole "we must use pulseaudio even if it's terrible and has awful standards that blast volume or multiple streams won't work!" was so weird… everybody who tried knew that just removing pulseaudio the multiple streams kept working :)
So only those who never applied the scientific method kept insisting that without PA it was not possible to do that.
by LtWorf
4/26/2026 at 6:58:22 PM
I think PA allows for setting applications volumes and have a modular design. But it's kinda the poster child of overengineering (challenged by systemd now). Something like sndiod is more sensible for most desktop distro. People that need a more complex setup can bring in the big gun like pipewire.by skydhash
4/26/2026 at 7:18:44 PM
I don't think the problem was over-engineering. I think the problem was that if you plugged in headphones it would instantly set the volume to 100% from whatever value it was before.Plus of course, initially you had to regularly run killall -9 pulseaudio to fix the sound. All in a moment when ALSA with dmix worked just fine.
Sometimes I think fedora and ubuntu are trying to hinder linux as mainstream desktop.
by LtWorf
4/27/2026 at 6:56:03 AM
There was a time when OSS was the only option and ALSA was rarely supported by software. ALSA's dmix also didn't exist from the start.Around 2000 I was only able to play sound from different apps because my soundcard exposed two sound devices /dev/dsp0 and /dev/dsp1
by AnonymousPlanet
4/26/2026 at 6:58:51 PM
In the time before PulseAudio, when it was ALSA (and OSS).by loeg
4/26/2026 at 8:27:50 PM
Even back then, it could play more than one stream. You had to have a sound card or kernel drivers that supported it (and all non-obsolete ones did by the time pulse audio came out).I still don’t know what purpose pulseaudio serves, other than adding latency and making stuff less reliable.
PipeWire is better, but it turns out you can just use OSS under freebsd these days, and everything just works, but with lower latency.
If you have some sort of potato sound card that can’t mix output channels in hardware, note that OSS added sw mixing by 2007 (with support for 16 channels by default).
by hedora
4/26/2026 at 11:01:35 PM
Sure, sure. I remember a time when I didn't have a sound card that supported it and couldn't play multiple streams at a time; this is a thing that really happened. I did eventually go out and buy a soundcard to enable multiple streams.by loeg
4/26/2026 at 8:38:48 PM
Nonsense - HDA systems were overwhelmingly the majority of Linux systems at that point, and didn't have any hardware support for multiple streams. OSS with software mixing was a commercial product that wasn't upstream. ALSA had userspace mixing but it was very much not an out of the box experience, and didn't take advantage of hardware capabilities in the way Pulseaudio did to reduce wakeups and power consumption.by mjg59
4/26/2026 at 9:51:05 PM
ALSA had DMIX by default, all that before Pulseaudio. I remember Knoppix and a few more doing that.by anthk
4/27/2026 at 12:29:09 AM
DMIX was typically not an out of the box default, and had multiple shortcomings.by mjg59
4/27/2026 at 2:02:17 AM
Even so, surely it would have been easier and better to just fix or replace dmix (in kernel, in the existing data path) than introduce a userspace daemon, break API compatibility, and so on.It’s been 20 years and pulseaudio is still flaky / high latency / incomprehensible. Professional flows that care use stuff like jack.
by hedora
4/27/2026 at 6:04:06 AM
TBH pipewire works much better than pulse, up to the point to replacing jack itself. But DMIX worked fine for non-professional user needs and with very low CPU usage. Yes, it was Jackd for the professional but Windows had ASIO drivers too.by anthk
4/29/2026 at 11:08:09 AM
Pipe might work better than pulse but it's still an overcomplicated mess compared to ALSA, which is itself an overcomplicated mess compared to OSS, which could have been easily made to support concurrent clients to /dev/dsp without all the API breakages and flaky deamons we had to suffer through.by account42
4/27/2026 at 3:46:11 AM
Doing audio mixing well is something that is, for a number of reasons, hard to do in kernel. And if you're still using pulseaudio, why? The rest of the world's moved to pipewire, which also provides a jack-compatible interface.by mjg59
4/27/2026 at 4:28:08 PM
> It’s been 20 years and pulseaudioPipeWire replaced Pulse like five years ago; who is using Pulse at this point to make statements like "20 years" meaningful? It isn't really an ongoing concern.
by loeg
4/27/2026 at 9:26:04 AM
Pulseaudio came with an ALSA plugin which meant applications written for the ALSA API could output to PA so it was compatible.by bzzzt
4/27/2026 at 6:02:40 AM
It was on tons user oriented distros.by anthk
4/27/2026 at 6:16:54 AM
This is the era where I was the lead on Ubuntu laptop support, and I promise you that dmix was not a trivial option to make things work out of the box.by mjg59
4/27/2026 at 6:42:35 AM
I always had some Knoppix live CD/DVD which had better defaults than Ubuntu itself on hardware autodetection and setup. I think they used kudzu from RH for a good while plus custom patches.Bear in mind the Knoppix creator had a blind wife, up to the point to creating A.R.I.A.N.E, one of the best distros for the blind (and it was merged with main KNOPPIX, making the distro one of the best accesible ones out there). Thus, proper audio mixing was mandatory.
With the bundled installer you could install it to as a Debian Testing install in the spot. As I didn't have internet at home, I remember using Knoppix before Debian Sarge because it had a huge amount of things to play and test without worrying about odd hardware setups.
by anthk
4/27/2026 at 7:26:47 AM
Some of the context here is that that at the time, Ubuntu was aiming to work on as close to 100% of existing PCs as possible to make it available to the largest number of users. Knoppix had a lot of great features and also was very opinionated, and that had an influence on the set of hardware it worked well on by default. I evaluated basically every decision made there in terms of whether Ubuntu should adopt the same ones, and there were several that were just not good choices in terms of supporting the widest set of hardware possible.by mjg59
4/29/2026 at 11:05:55 AM
Bullshit.by account42
4/26/2026 at 9:59:24 PM
Do you think starting with "Nonsense" makes your argument better heard?by iknowstuff
4/26/2026 at 4:37:07 PM
If you have two audio streams, you can't play them as is on the audio device, you have to mix them together. The same happens with analog speakers as you can't just add two signals together. I believe at one point with Alsa, when an application takes control of the audio device, no one else could play with it. Now Alsa comes with dmix (a digital mixer feature) enabled in its default configuration, so two applications may play how they want. And we have PulseAudio, Jack, and Pipewire on top of Alsa to add more features.OpenBSD still present raw audio devices, but they have sndio which provides a more helpful interface for applications including resampling (not the best algorithms there, according to them).
by skydhash
4/27/2026 at 7:16:46 AM
Well, good enough it you read the OpenBSD FAQ section on Multimeda for RT throughput and the like.by anthk
4/26/2026 at 4:28:26 PM
Came later I believe. They had esd and other sound “servers” back then however. Might have had to install it yourself.by mixmastamyk
4/26/2026 at 7:36:14 PM
No its not. You wont be able to hear the difference between 44.1 vs 48.by rasz