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

I tweaked the settings to get it working for my MacbookAir9,1 (2020) I'm on Fedora 34 with custom ISO linked here https://github.com/mikeeq/mbp-fedora Have a read on https://t2linux.org and their wiki before changing anything.

[General]
auto-profiles = no
[Mapping builtin-speaker]
description = Built-in Speaker
device-strings = front:%f
paths-output = builtin-speaker-output
channel-map = left,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
}
@nikodunk
Copy link

nikodunk commented Nov 26, 2021

Hi @bigbadmonster17 - thanks for the guide. You said you're on Fedora 34, which already includes Pipewire I believe.

May I ask where you saved apple-t2.conf?

/usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf doesn't exist on Fedora 34, as that's in the pulseaudio directory... did you save it to /usr/share/pipewire?

Thank you! Working great on Fedora otherwise :)

@nikodunk
Copy link

nikodunk commented Nov 26, 2021

Aha! Found the solution in a comment on the other thread. The updated location for the apple-t2.conf file is:
/usr/share/alsa-card-profile/mixer/profile-sets/apple-t2.conf (instead of /usr/share/pulseaudio/alsa-mixer/profile-sets/apple-t2.conf)

Thank you both @Redecorating for this!

@bigbadmonster17
Copy link
Author

bigbadmonster17 commented Nov 30, 2021

@nikodunk that's right! I forgot to edit that as the pressing issue was getting a working profile for the built in speaker thanks for pointing it out :)

@nikodunk
Copy link

nikodunk commented Nov 30, 2021

Of course! Yes thank you for your profiles - they work well on my Macbook Air :). I'd maybe edit the links above to avoid confusion in the future. Thanks again @bigbadmonster17 !

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