Code Monkey home page Code Monkey logo

snd_hda_macbookpro's Introduction

snd_hda_macbookpro

This is a kernel driver for sound on Macs with Cirrus 8409 HDA chips. Sound output is now reasonably complete and integrated with Linux. Sound input still needs work.

It will play audio through Internal speakers or headphones.

The primary audio should be set to Analogue Stereo Output in the Settings Audio dialog.

Sound recording from internal mike and headset mike is not yet fully interfaced with Linux user side.

The recorded sound level is very low but this is the sound level as returned in OSX. Amplification will be required eg using something like PulseEffects.

The hardware device sound format is limited to 2/4 channel 44.1 kHz S24_LE S32_LE. As long as use the default device volume control, other formats, frequencies work.

NOTA BENE: The direct hardware device (hw:0,0) and plughw:0,0 device have NO volume control so will be VERY loud!

Currently this works with MAX98706, SSM3515 and TAS5764L amplifiers. It will NOT work with other amplifiers as each amplifier requires specific programming.

Power down/sleep completely unknown and untested. At the moment everything is permanently powered on.

The Apple speaker setup is 4 speakers as a left tweeter, left woofer, right tweeter and right woofer so this is actually a classic HiFi stereo (ie 2 channel) speaker system. (These names are listed in the layout files under AppleHDA.kext/Contents/Resources).

The channel order for Linux has been modified to left tweeter, right tweeter and left woofer, right woofer as this fits in with the Linux way much better.

The driver also has been modified to duplicate a stereo sound source onto the second stereo channel so all speakers are driven (this essentially replicates the snd_hda_multi_out_analog_prepare function).

This will not sound the same as Apple (which is known to be using specific digital filter effects in CoreAudio).

To create a more Apple-like sound requires creating eg an Alsa pseudo device to channel duplicate a stereo sound and apply different digital filters to the tweeter and woofer channels.

NOTE. My primary testing kernel is now Ubuntu LTS 22.04 5.15.

The following installation setup provided by leifliddy.

Compiling and installing driver:

fedora package install

dnf install wget make gcc kernel-devel

ubuntu package install

apt install wget make gcc linux-headers-generic

arch package install

pacman -S wget make gcc linux-headers

void package install

xbps-install -S wget make gcc linux-headers

build driver

git clone https://github.com/davidjo/snd_hda_macbookpro.git
cd snd_hda_macbookpro/
#run the following command as root or with sudo
./install.cirrus.driver.sh
reboot

snd_hda_macbookpro's People

Contributors

curioustommy avatar davidjo avatar leifliddy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.