Skip to content

Instantly share code, notes, and snippets.

View khalilst's full-sized avatar

Khalil Laleh khalilst

  • Studocu
  • Amsterdam, Netherlands
View GitHub Profile
@khalilst
khalilst / WRITEUP.md
Created February 15, 2026 13:13
Fix: CS35L56 second amplifier not working on Intel Lunar Lake SPI

Fix: CS35L56 second amplifier not working on Intel Lunar Lake SPI

Problem

On HP laptops (and potentially ASUS) with Intel Lunar Lake processors using dual Cirrus Logic CS35L56 amplifiers over SPI, only the first amplifier (CS0) works. The second amplifier (CS1) fails with HALO_STATE=0x0 (firmware boot timeout). Speakers work correctly in Windows.

Affected bugs:

@khalilst
khalilst / repetitive_remover.js
Created August 21, 2020 19:24
How to remove repetitive items from an array
var x = new Array(1000000).fill(0).map(item => Math.floor(Math.random()*10));
console.time('1.Set');
var setResult = Array.from(new Set(x));
console.timeLog('1.Set');
console.log(setResult);
console.time('2.Reduce');
var reduceResult = x.reduce((acc, item) => {
if (acc.indexOf(item) === -1) {