<rmk>
ah, helps to read the code comments... I wonder why Andy didn't
e1eph4nt has quit [Ping timeout: 480 seconds]
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
<rmk>
is there a reason that the child nodes of the smc device don't have compatibles? from what I can see, having compatibles would make the code easier and avoid stuff such as: pdev->dev.of_node = of_get_child_by_name(pdev->dev.parent->of_node, "gpio"); in the child drivers.
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
e1eph4nt has joined #asahi-dev
e1eph4nt has quit [Ping timeout: 480 seconds]
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
e1eph4nt has joined #asahi-dev
davrosm1_2 has joined #asahi-dev
davrosm1_2 has quit []
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
e1eph4nt has quit [Ping timeout: 480 seconds]
ChaosPrincess has quit [Quit: WeeChat 3.5]
ChaosPrincess has joined #asahi-dev
e1eph4nt has joined #asahi-dev
<rmk>
I think a decision also needs to be reached about the %p4ch printf specifier and the smc_key thing (both points brought up by Andy)
<rmk>
maybe rather than typedefing a u32 as smc_key, what about struct { char key[4]; } ? That can then be printed using "%.4s".
<rmk>
that's legal, because the precision is specified to limit the number of characters written, and it's permitted for the null byte to be absent
<kettenis>
rmk; mfd device are weird in that respect, some use compatibles, some rely on named nodes
<povik>
rmk: that would print the key in reverse on little-endian (see the thread, hopefully you can make sense of it even though i didn't reply to all at one point)
akspecs_ has quit [Remote host closed the connection]
akspecs has joined #asahi-dev
e1eph4nt has quit [Ping timeout: 481 seconds]
e1eph4nt has joined #asahi-dev
derzahl has joined #asahi-dev
Race has quit [Ping timeout: 480 seconds]
gabuscus_ has quit [Ping timeout: 480 seconds]
gabuscus has joined #asahi-dev
derzahl has quit [Ping timeout: 480 seconds]
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
derzahl has joined #asahi-dev
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
arawat[m] has quit [Quit: Client limit exceeded: 20000]
<rmk>
kettenis: I think you're about to get a "DT describes the hardware" response :(
<kettenis>
the SMC is largely software ;)
tanty has quit [Remote host closed the connection]
tanty has joined #asahi-dev
<kettenis>
anyway, many thanks for pushing this forward
<rmk>
I'll continue looking at it next week while I'm on the boat (still need to pack the m1 mini)
e1eph4nt has quit [Ping timeout: 480 seconds]
pabloscloud[m] has left #asahi-dev [#asahi-dev]
e1eph4nt has joined #asahi-dev
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sven>
marcan: oh dear... i'm looking into this dp alt mode dcp thing and I only realized just how cursed the entire DCP protocol is now
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
<marcan>
sven: lol
<marcan>
rmk: I'll go over the discussion on sunday if that's okay
<sven>
seriously… who came up with this crap
<sven>
Pretty sure DCP does some magic though. I’ve copied macOS MMIO pokes completely and the dptx clock didn’t come up
<sven>
It selected dpin0, that confirms those are for tunneling :)
e1eph4nt has quit [Ping timeout: 480 seconds]
e1eph4nt has joined #asahi-dev
<heli0s[m]>
Some of the new Macs have a feature for detection of impedence of connected headphones, in order to provide more or less voltage to the headphone jack, as described here: https://support.apple.com/en-us/HT212856
<heli0s[m]>
The question is - is this controlled by firmware? If so, would it be possible to manually select one of the high and low voltage modes in software?
<heli0s[m]>
I lurk around but haven't been able to infer if any knowledge of this was found while reverse engineering the audio part.
<marcan>
it's controlled by the driver
<marcan>
povik already implemented that stuff I think
<povik>
this is measuring the impedance from within m1n1
<povik>
the high-voltage mode on the codec are controlled by the driver
<povik>
the wip linux driver doesn't control it yet
<povik>
it can be a knob in alsamixer
mactheknife[m] has joined #asahi-dev
<heli0s[m]>
Thank you for the replies. That's excellent work.
<povik>
so yes, it should be possible to manually select the mode
<povik>
probably the driver will select its best guess based on impedance when the headphones are plugged in
<povik>
and it can be overridden from userspace later
<povik>
and there can be another read-only knob with the impedance :p
<povik>
so the mode policy could be left out of the kernel driver completely
<povik>
but then there's the N audio servers problem
<heli0s[m]>
I was asking because I was reading in audio forums that the high voltage mode was only ever active for very high impedence headphones.
<heli0s[m]>
As far as I know, you're limited to the auto-selection in macOS.
<heli0s[m]>
For headphones that have high impedence that doesn't quite reach the watermark defined by Apple, this could be another advantage for Asahi Linux.
* sven
hates DCP
* povik
's thoughts are with sven
e1eph4nt has quit [Ping timeout: 480 seconds]
<as400[m]>
sven: entire it nowadays is a crap. Even those databases that store your money in a bank are major crap. But I didn't know that a firmware that runs on bare metal cpus are crap too. It's creepy...
<sven>
dunno about the firmware itself, but the IPC protocol is pretty insane
e1eph4nt has joined #asahi-dev
Glanzmann has quit [Ping timeout: 480 seconds]
<as400[m]>
sven: win with the protocol may be your next child you never expected. Like the famous 4k patch :)
roxfan has quit [Ping timeout: 480 seconds]
kloenk has quit [Remote host closed the connection]