Skip to content

Instantly share code, notes, and snippets.

@MCMrARM
Created August 30, 2019 19:22
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MCMrARM/c357291e4e5c18894bea10665dcebffb to your computer and use it in GitHub Desktop.
Save MCMrARM/c357291e4e5c18894bea10665dcebffb to your computer and use it in GitHub Desktop.
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
}
@ExperiBass
Copy link

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

@nikodunk
Copy link

nikodunk commented Nov 26, 2021

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

Thank you! Nothing was working for me until I did this. Now works swimmingly on Fedora 35 (even with Pipewire!)

@nikodunk
Copy link

@MCMrARM the updated location for
/usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf
is now
/usr/share/alsa-card-profile/mixer/profile-sets/apple-t2.conf

as @Redecorating mentioned above. Thank you so much everyone for the excellent profiles otherwise.

@tpchuckles
Copy link

If your mic crashes your OS, try adding "intel_iommu=on iommu=pt" to the "GRUB_CMDLINE_LINUX=" line in /etc/default/grub (then "sudo update-grub" for ubuntu, or "grub-mkconfig -o /boot/grub/grub.cfg"). Shoutout to @Redecorating for sharing this fix to us in the discord! I didn't see it documented anywhere else, so figured i'd throw it down as a comment here (since this is the first gist the wiki's audio section links to)

@Redecorating
Copy link

@MCMrARM Do you know what license these files would be under?

@StudioCrash
Copy link

Are there any updates that might work with Pop!_OS since it now uses pipewire instead of pulseaudio?

@Redecorating
Copy link

Are there any updates that might work with Pop!_OS since it now uses pipewire instead of pulseaudio?

https://wiki.t2linux.org/guides/audio-config/#using-pipewire-instead-of-pulseaudio the change here to 91-pulseaudio-custom.rules should work.

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