Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
System configuration files for the T2 audio driver (https://github.com/MCMrARM/mbp2018-bridge-drv/)
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
ACTION!="change", GOTO="pulseaudio_end"
KERNEL!="card*", GOTO="pulseaudio_end"
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x106b", ATTRS{device}=="0x1803", ENV{PULSE_PROFILE_SET}="apple-t2.conf"
LABEL="pulseaudio_end"

The files go to:

  • /usr/share/alsa/cards/AppleT2.conf
  • /usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf
  • /usr/lib/udev/rules.d/91-pulseaudio-custom.rules
[General]
auto-profiles = no
[Mapping builtin-speaker]
description = Built-in Speaker
device-strings = front:%f
paths-output = builtin-speaker-output
channel-map = front-left,front-right,rear-left,rear-right
priority = 100
direction = output
[Mapping builtin-mic]
description = Built-in Mic
device-strings = front:%f
paths-output = builtin-mic-input
channel-map = left,center,right
priority = 100
direction = input
[Mapping codec-output]
description = Headphone
device-strings = front:%f,1
paths-output = codec-output
channel-map = left,right
priority = 100
direction = output
[Mapping codec-input]
description = Headphone Mic
device-strings = front:%f,1
paths-output = codec-input
channel-map = mono
priority = 100
direction = input
[Profile output:builtin-speaker+input:builtin-mic]
description = Built-in Speaker + Built-in Mic
output-mappings = builtin-speaker
input-mappings = builtin-mic
skip-probe = yes
[Profile output:codec-output+input:builtin-mic]
description = Headphones + Built-in Mic
output-mappings = codec-output
input-mappings = builtin-mic
[Profile output:codec-output+input:codec-input]
description = Headphones + External Mic
output-mappings = codec-output
input-mappings = codec-input
[Profile output:builtin-speaker+input:codec-input]
description = Built-in Speaker + External Mic
output-mappings = builtin-speaker
input-mappings = codec-input
<confdir:pcm/front.conf>
<confdir:pcm/surround40.conf>
AppleT2.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
type hw
card $CARD
device 0
}
}
capture.pcm {
type plug
slave.pcm {
type hw
card $CARD
device 1
}
}
hint.device_output 0
hint.device_input 1
}
AppleT2.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type hw
card $CARD
device 0
}
capture.pcm {
type hw
card $CARD
device 1
}
hint.device_output 0
hint.device_input 1
}
AppleT2.pcm.front.1 {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type hw
card $CARD
device 2
}
capture.pcm {
type hw
card $CARD
device 3
}
hint.device_output 2
hint.device_input 3
}
AppleT2.pcm.front.2 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
device 4
}
@kevineinarsson

This comment has been minimized.

Copy link

@kevineinarsson kevineinarsson commented Mar 10, 2020

I got the speakers working on a MBP 16,1 by doing some small changes. I also included a sample config to make LFE remixing work so the woofer plays.

https://gist.github.com/kevineinarsson/8e5e92664f97508277fefef1b8015fba

@stefanpartheym

This comment has been minimized.

Copy link

@stefanpartheym stefanpartheym commented May 20, 2020

@kevineinarsson Nice work! I wonder if it would be possible to enable the woofer for the mbp15,2 too?
The point is, I have no clue about how to properly configure pulseaudio to enable LFE remixing. I tried to add

enable-lfe-remixing = yes

to my /etc/pulse/daemon.conf, however nothing changed. I suspect I need to modify my AppleT2.conf to look more like yours, but my last attempt wasn't a success 😄

@jbg

This comment has been minimized.

Copy link

@jbg jbg commented Aug 30, 2020

Anyone got mic working on MBP 15,2? With this config it appears in pulsemixer but always records silence.

@Redecorating

This comment has been minimized.

Copy link

@Redecorating Redecorating commented Oct 25, 2020

Some recent updates to ALSA seem to have changed where it looks for apple-t2.conf, I resolved that by copying it to the new directory:

sudo cp '/usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf' '/usr/share/alsa-card-profile/mixer/profile-sets/apple-t2.conf'

Here's a reddit post I found about this change
And here's the errors pulseaudio was giving before I moved apple-t2.conf:

E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_04_00.3" card_name="alsa_card.pci-0000_04_00.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
E: [pulseaudio] socket-server.c: bind(): Address already in use
E: [pulseaudio] module.c: Failed to load module "module-native-protocol-unix" (argument: ""): initialization failed.
@bigbadmonster17

This comment has been minimized.

Copy link

@bigbadmonster17 bigbadmonster17 commented Oct 4, 2021

I've used your profile and tweaked it to have it working on my 9,1 (Macbook Air 2020)
https://gist.github.com/bigbadmonster17/8b670ae29e0b7be2b73887f3f37a057b

Hope this helps someone out there

@ExperiBass

This comment has been minimized.

Copy link

@ExperiBass ExperiBass commented Oct 16, 2021

Doesn’t allow for headphone usage on the Pro16,2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment