Hacker News new | past | comments | ask | show | jobs | submit login
[flagged] Asahi dev found off-by-one bug in M2 MacBook Air bass enhancer (treehouse.systems)
92 points by mesebrec on Oct 1, 2023 | hide | past | favorite | 54 comments



This seems like a needlessly aggressive and poor take. Its a cool bug that they discovered; but going into "Apple's audio engineering team is, at least on some level, incompetent (or incompetently run; I'm not blaming the employees here, but rather the organization)" is just unproductively mean.

"and obvious in a sine sweep frequency response test, which is the most basic test you can run end-to-end on a completed audio system to ensure it is performing properly. So they didn't even run that." The one conclusion you can draw, outside looking in, is: whatever tests they ran resulted in the creation of the best sounding speakers on any device in its class. That doesn't scream incompetence to me; it screams "We tested this against songs people will actually listen to, not 300hz sine waves."

This post is a bad look for Asahi.


> Because we don't have blatant, in your face off-by-one bugs in our DSP and we actually check the output to make sure it's good

This makes me cringe. I consider myself an experienced software engineer, but I don't think I'll ever criticize other's code like that.


Apple is nearing 3 billion dollar valuation. This is an inexcusable bug since the most banale Q&A testing would have caught.


Given the bug went unnoticed for a year by millions of customers, I doubt 'the most banale Q&A testing' would have caught it.


> Apple is nearing 3 billion dollar valuation.

I think you mean "trillion" there?


It's just that marcan is a pretty mean person in general. He is technically very capably but always hating on everyone that is not in his in group of friends.


It's not an official Asahi communication.

It's a dev enjoying some hyperbole for something cool they fixed on a chat platform.


They're being an unprofessional asshole. That they enjoy doing so hardly does them any credit.


A post on a public forum by the leader of Asahi does reflect on Asahi, whether the post is "official" or not.


It is the project lead for Asahi however. As such it’s indistinguishable behaviour


Hector Martin is the project leader, and regardless of wherever they comment, people will read into disparaging comments such as the one in this post (as opposed to expressing respectful disagreement).


I agree that this is not a charitable view on this bug

> "and obvious in a sine sweep frequency response test, which is the most basic test you can run end-to-end on a completed audio system to ensure it is performing properly. So they didn't even run that."

Do they want a list of all the stupid bugs there are in Linux/Desktop Managers/common apps?

Yeah an off-by-one error happens.

Funnily enough, I recently tried a PC laptop, and it had a non-obvious audio (possible hw-defect) bug as well. But the UEFI self test worked almost perfectly. Because of the frequency ranges it would use for the test


but ironically this communication style would make steve jobs look tame


Not really if his biography is remotely accurate.


I said the inverse of what I meant to write! oops

*Steve Jobs would make this look tame


> They have a stupid off-by-one bug in the middle of their bass enhancer AND NOBODY NOTICED NOR FIXED IT IN OVER A YEAR.

The mocking tone of this post is really not necessary. An engineer made probably one of the most common coding errors that nobody noticed because real world impact is minor to non existent. The devs should be trying to build a relationship with Apple, not mocking then each time they find a minor bug.


These devs didn't even notice it until they tried to rip into the inner workings.


> These devs didn't even notice it until they tried to rip into the inner workings.

I mean, considering the source isn't open. Yeah, you need to do that.


Well, for audio bugs that actually matter, you can just listen to it, or if you want to get all sciencey, throw the output and input onto a scope and compare them, or send the input and output sample values into the analysis software of your choice.

Code isn't necessary to judge the quality of an audio system. You can pretty much treat it as a black box if you want.

The fact that no one has apparently even noticed this bug before says a lot.


He posted a video in the thread comparing an M1 machine (they don’t have the bug) with an M2. It’s rather obvious in that simple sine-wave test.

This isn’t one of those things like the difference between 128 Kbps MP3 and FLAC, where there is a difference but it can be kind of subtle depending on the listening equipment.

It’s clear in that demo.


That's as may be, but the person I was responding to was claiming that you needed the source code to detect it.

Clearly you don't.


The point is more that, yes, it’s technically incorrect. But if literally no human noticed or was affected in any way, who cares? That’s the only reason bugs matter anyway.


It's a bug that shouldn't have happened though. One hopes that they have a well verified reference implementation for all their signal processing pipeline (and ideally both a high level and a bit accurate model) and they're testing the output of any optimised implementation against that, with random input data. This is Apple, one of the most "valuable" companies in the world. They should do their job.


> They should do their job.

They did their job. They delivered a sound system that has been called the best available in any laptop. Nobody, and I mean nobody, noticed this bug in the last three years.

Apple is doing just fine without your couch coaching about what they should have done. I might as well harass Apple for having 99% P3 color certification but not 100% accuracy certification.


Nobody noticed the bug in the last three years because it’s more recent. You can hear it clearly in real world usage compared to the M1. Harassing Apple over 99% P3 certification is not remotely comparable because that’s neither perceivable, nor incorrect behavior. It’s clearly a bug, an egregious one at that and it will be fixed no matter what you think about Marcans choice of words.


This is an egregious deployment of the word "egregious". In a world where security catastrophes are de rigueur (all of them driven by oversights), this level of drama over an audio bug is so unjustified that it reads like trolling.


You're completely wrong. Signal processing is regularly used to make life and death decisions in medical technology, including audio techniques which are particularly useful in say, heart beat analysis. Your perspective appears rather narrow. In any case, I said egregious "signal processing cock up", which from a purely signal processing perspective, it absolutely is (as in, it has a big impact).

It might well be the case that a bug in a bass audio driver is not that big a deal, but these sorts of bugs are easy to avoid and shouldn't happen. It does indicate something about the quality of the engineering.


I'm sorry, dropping samples is a pretty egregious signal processing cock up and one I'd be ashamed to have made. I think the market assessment is pretty meaningless in the face of objective evidence like this. By all means, you can keep buying Apple, but I'd have no trust they're doing things properly under the hood.


Well then I sure hate to tell you the major “cock ups” that have happened on Windows or Android or Linux or iOS or OS/2 or BSD…

But seriously, shit happens no matter where you look. At least this bug affected nobody. Windows has a bug that causes agony on a weekly basis.


Unfortunately, it appears that the Asahi Linux team carries this holier-than-thou attitude everywhere. Their GPU driver reversing had similar snipes at Apple; and we also have the whole HN/asahilinux.org referrer debacle.


> Their GPU driver reversing had similar snipes at Apple; and we also have the whole HN/asahilinux.org referrer debacle.

Yeah I didn’t like the way the GPU stuff was presented. It was purposefully antagonistic despite absolutely no need for it.

That said, they’re 100% right on the HN issue. That’s not them overreacting or being mean. That’s avoiding abuse that HN refuses to do anything about.


It has been my experience that dang doesn’t respond to feedback emails of the kind Hector claims to have sent (and I’ve sent a few of them); and I kinda see why: because any disagreement on said feedback leads to more arguments, which is terribly draining for the recipient.

That being said, if the feedback provided had the same quality as the post linked above, one can justifiably see why not engaging with it at all is the best option.


The tone and attitude of this post is basically the epitome of Jr/beginner dev. If your audience is non-programmers and one wants to be the “big shot”, ply this tact, but tech readers will overwhelmingly find this attitude cringeworthy.


Yup. This has big-time "junior engineer wanting to make a splash on a mailing list" energy.


At Apple we would see this tone all the time from people on the VLC project. It got so bad that the senior people would refer to them as DCS, Drunken College Student.

It got so bad that we mostly ignored them. It wasn't good for either VLC or QuickTime.


Honestly, there’s the ego if “we did this when the paid elites didn’t” in a lot of open source communities. I contribute to many projects and it always rubs me the wrong way because they don’t consider how many other variables the team has to juggle, and what priorities are like. To be clear, I’m not saying this is everyone, and it’s often the vast minority but it also often goes unchecked and unchallenged when it does come up.

Of course part of that is because corporate development is a black box from the outside , but even if it weren’t, there’s no way people would keep up with it anyway.


If people are still finding bugs in Donald Knuth’s code, then surely any one of us will fare worse when under the microscope.


Hilariously, this isn’t Apple’s first time with funny acronyms. The “Sagan” project got sued, so it was internally renamed to the “BHA” project. Sagan then sued Apple again once he figured out that meant “Butt-Head Astronomer.” He lost because it wasn’t even a publicly facing name, and even if it was, that’s hardly defamation.


You made my day with this comment.


That's just what all French people are like.


It's hard for me to understand how noticeable this actually is. In the video where he plays samples from an affected and unaffected machine, I can hear there's a difference, but I couldn't tell you which one is correct. It sounds like it could just be normal differences in speakers between the two models.

If that's the best example of the bug, then probably no one has caught it because it doesn't really matter.

Also, the tone of the post comes off as petty and immature, regardless.


The video isn’t great, but the issue should be fairly clear if you can set the volume high enough (and then hopefully manage to lower it before Hector cuts in).

The incorrect tone sounds like a train horn. There’s more than a single pure note being produced.


Interesting how rebuilding the support from the ground up allowed them to find a bug in the existing implementation. It really speaks to the quality of Asahi's work, imo.


yup -- they continue to do amazing work and if i had more money i'd give it all to them for this effort. what a team of legends


That's trivially true for audio. You can just subtract one from the other to find differences.


I know this will probably get downvoted but Asahi devs have for a very long time been very antagonizing towards multiple communities. They have the classic nose-turn-up attitude towards anyone that doesn't agree with them

It's a shame because the work they have done is great, but humility is a virtue many have lost.


If I were the engineer who wrote this bug, this post would not motivate me to fix it. In fact it would do the opposite.


So you'd respond by ego alone, just as the author/engineer did? Why?


The hilarious part for me is when the author admits it's not something you would really hear in regular music listening except that it's really obvious in bassoon solos.


Consider that Apple is pushing Apple Classical. Presumably more people are now listening to those bassoon solos.


after creating the world's best/most power-efficient mobile DAC and DSPs, one of the world's most popular music streaming platforms, one of the most power-efficient lossy and lossless codecs and the best truly wireless earbuds, I think Apple deserves to let a small bug that affects almost no-one live in production :D


I have great respect for Apple's audio team but this isn't a small bug by any stretch.


There's doing each other (& ourselves) credit, and then there's taking the score.

Sometimes it's good to be strategic, but sometimes we also need real accounts of things.

Personally an overboiling sadness & frustration that the world is captured inside closed priorietary & ultimately horrendously compromising mediocre application-centric versions of computing is a lamentation I am deeply familiar with.

The message isn't happy or here to win popularity contests. It's earnest & frank & hard, reflects on the feeling that the world is trapped & kept away from understanding.

This is one manifestion of a long running gnostic battle, one humanity has been losing for a while now, and I see no obligation or cause to pretend like earning popularity-credits helps anyone. Earnesty & catharsis on the other hand reflect the real. They portray the struggle as it is.


I guess no one who is paying attention to aliasing uses built-in speakers, how else this could have gone unnoticed




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: