#
…

2022-09-02

00:00e1eph4nt has quit [Ping timeout: 480 seconds]
00:10e1eph4nt has joined #asahi-dev
00:34derzahl has quit [Ping timeout: 480 seconds]
00:47derzahl has joined #asahi-dev
01:22e1eph4nt has quit [Ping timeout: 480 seconds]
01:25amarioguy has quit [Remote host closed the connection]
01:26amarioguy has joined #asahi-dev
01:34e1eph4nt has joined #asahi-dev
01:34derzahl has quit [Ping timeout: 480 seconds]
01:40derzahl has joined #asahi-dev
02:03derzahl has quit [Ping timeout: 480 seconds]
02:13Rui has quit []
02:51e1eph4nt has quit [Ping timeout: 480 seconds]
02:57derzahl has joined #asahi-dev
03:02e1eph4nt has joined #asahi-dev
03:32dmmcf has joined #asahi-dev
03:44dmmcf has quit [Quit: dmmcf]
03:48coolshaurya has quit [Quit: Client limit exceeded: 20000]
04:17davrosm1_2 has joined #asahi-dev
04:19bluetail215140 has quit []
04:19bluetail215140 has joined #asahi-dev
04:22e1eph4nt has quit [Ping timeout: 480 seconds]
04:24davrosm1_2 has quit [Remote host closed the connection]
04:25davrosm1_2 has joined #asahi-dev
04:26e1eph4nt has joined #asahi-dev
04:26davrosm1_2 has quit []
05:13derzahl has quit [Ping timeout: 480 seconds]
05:15derzahl has joined #asahi-dev
05:37e1eph4nt has quit [Ping timeout: 480 seconds]
05:46e1eph4nt has joined #asahi-dev
05:52davrosm1_2 has joined #asahi-dev
05:54davrosm1_2 has quit []
05:58davrosm1_2 has joined #asahi-dev
06:00davrosm1_2 has quit []
06:24davrosm1_2 has joined #asahi-dev
06:25davrosm1_2 has quit []
06:31davrosm1_2 has joined #asahi-dev
06:32davrosm1_2 has quit []
06:43davrosm1_2 has joined #asahi-dev
06:53e1eph4nt has quit [Ping timeout: 480 seconds]
06:59davrosm1_2 has quit [Quit: This computer has gone to sleep]
07:11kloenk has quit [Remote host closed the connection]
07:14kloenk has joined #asahi-dev
07:19e1eph4nt has joined #asahi-dev
07:23derzahl has quit [Ping timeout: 480 seconds]
07:27e1eph4nt has quit [Ping timeout: 480 seconds]
07:47e1eph4nt has joined #asahi-dev
07:51davrosm1_2 has joined #asahi-dev
07:53davrosm1_2 has quit []
07:58kloenk has quit [Remote host closed the connection]
07:59kloenk has joined #asahi-dev
08:01e1eph4nt has quit [Ping timeout: 480 seconds]
08:10e1eph4nt has joined #asahi-dev
08:20kettenisrmk: I'll comment from an OpenBSD/U-Boot perspective today
08:47davrosm1_2 has joined #asahi-dev
08:48davrosm1_2 has quit []
08:53davrosm1_2 has joined #asahi-dev
08:54davrosm1_2 has quit []
08:54davrosm1_2 has joined #asahi-dev
08:56davrosm1_2 has quit []
08:59Race has joined #asahi-dev
09:10jluthra_ has quit [Remote host closed the connection]
09:10jluthra_ has joined #asahi-dev
09:13davrosm1_2 has joined #asahi-dev
09:13rmksomeone needs to explain this:
09:13rmk> > + ret = apple_smc_rw_u32(smcgp->smc, key, CMD_IRQ_MODE, &val);
09:13rmk> > + return (!ret) ? GPIO_LINE_DIRECTION_IN : GPIO_LINE_DIRECTION_OUT;
09:13rmk> What is the meaning of val in this case?
09:13rmkit looks to me like a bug.
09:14davrosm1_2 has quit []
09:15rmkah, helps to read the code comments... I wonder why Andy didn't
09:17e1eph4nt has quit [Ping timeout: 480 seconds]
09:19davrosm1_2 has joined #asahi-dev
09:22davrosm1_2 has quit []
09:22davrosm1_2 has joined #asahi-dev
09:24davrosm1_2 has quit []
09:25davrosm1_2 has joined #asahi-dev
09:26davrosm1_2 has quit []
09:27davrosm1_2 has joined #asahi-dev
09:28davrosm1_2 has quit []
09:28davrosm1_2 has joined #asahi-dev
09:29davrosm1_2 has quit []
09:30davrosm1_2 has joined #asahi-dev
09:32davrosm1_2 has quit []
09:37davrosm1_2 has joined #asahi-dev
09:38davrosm1_2 has quit []
09:40rmkis 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.
09:40davrosm1_2 has joined #asahi-dev
09:41davrosm1_2 has quit []
09:42e1eph4nt has joined #asahi-dev
10:49e1eph4nt has quit [Ping timeout: 480 seconds]
10:54davrosm1_2 has joined #asahi-dev
10:55davrosm1_2 has quit []
11:00e1eph4nt has joined #asahi-dev
11:06davrosm1_2 has joined #asahi-dev
11:07davrosm1_2 has quit []
11:08e1eph4nt has quit [Ping timeout: 480 seconds]
11:17e1eph4nt has joined #asahi-dev
11:25e1eph4nt has quit [Ping timeout: 480 seconds]
11:25ChaosPrincess has quit [Quit: WeeChat 3.5]
11:26ChaosPrincess has joined #asahi-dev
11:34e1eph4nt has joined #asahi-dev
11:38rmkI think a decision also needs to be reached about the %p4ch printf specifier and the smc_key thing (both points brought up by Andy)
11:39rmkmaybe rather than typedefing a u32 as smc_key, what about struct { char key[4]; } ? That can then be printed using "%.4s".
11:41rmkthat'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
12:06kettenisrmk; mfd device are weird in that respect, some use compatibles, some rely on named nodes
12:12povikrmk: 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)
12:15akspecs_ has quit [Remote host closed the connection]
12:15akspecs has joined #asahi-dev
12:42e1eph4nt has quit [Ping timeout: 481 seconds]
13:04e1eph4nt has joined #asahi-dev
13:29derzahl has joined #asahi-dev
13:39Race has quit [Ping timeout: 480 seconds]
13:56gabuscus_ has quit [Ping timeout: 480 seconds]
14:07gabuscus has joined #asahi-dev
14:08derzahl has quit [Ping timeout: 480 seconds]
14:12e1eph4nt has quit [Ping timeout: 480 seconds]
14:14e1eph4nt has joined #asahi-dev
14:18derzahl has joined #asahi-dev
14:22e1eph4nt has quit [Ping timeout: 480 seconds]
14:30e1eph4nt has joined #asahi-dev
14:39e1eph4nt has quit [Ping timeout: 480 seconds]
14:43e1eph4nt has joined #asahi-dev
15:01arawat[m] has quit [Quit: Client limit exceeded: 20000]
15:09rmkkettenis: I think you're about to get a "DT describes the hardware" response :(
15:13kettenisthe SMC is largely software ;)
15:19tanty has quit [Remote host closed the connection]
15:21tanty has joined #asahi-dev
15:46kettenisanyway, many thanks for pushing this forward
16:37rmkI'll continue looking at it next week while I'm on the boat (still need to pack the m1 mini)
16:59e1eph4nt has quit [Ping timeout: 480 seconds]
17:05pabloscloud[m] has left #asahi-dev [#asahi-dev]
17:08e1eph4nt has joined #asahi-dev
17:10bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:12svenmarcan: 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
17:17e1eph4nt has quit [Ping timeout: 480 seconds]
17:35e1eph4nt has joined #asahi-dev
18:22marcansven: lol
18:25marcanrmk: I'll go over the discussion on sunday if that's okay
18:27svenseriously… who came up with this crap
18:28svenPretty sure DCP does some magic though. I’ve copied macOS MMIO pokes completely and the dptx clock didn’t come up
18:31jannausven: dpxbar trace for a thunderbolt 3 display: https://gist.github.com/jannau/836902d87f115d03c635eeb128b834c9 as far as I can see nothing interesting
18:32svenIt selected dpin0, that confirms those are for tunneling :)
18:40e1eph4nt has quit [Ping timeout: 480 seconds]
18:48e1eph4nt has joined #asahi-dev
18:51heli0s[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
18:51heli0s[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?
18:51heli0s[m]I lurk around but haven't been able to infer if any knowledge of this was found while reverse engineering the audio part.
18:57marcanit's controlled by the driver
18:57marcanpovik already implemented that stuff I think
18:58povikthis is measuring the impedance from within m1n1
18:59povikthe high-voltage mode on the codec are controlled by the driver
18:59povikthe wip linux driver doesn't control it yet
19:00povikit can be a knob in alsamixer
19:01mactheknife[m] has joined #asahi-dev
19:02heli0s[m]Thank you for the replies. That's excellent work.
19:03povikso yes, it should be possible to manually select the mode
19:03povikprobably the driver will select its best guess based on impedance when the headphones are plugged in
19:03povikand it can be overridden from userspace later
19:04povikand there can be another read-only knob with the impedance :p
19:05povikso the mode policy could be left out of the kernel driver completely
19:05povikbut then there's the N audio servers problem
19:09heli0s[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.
19:09heli0s[m]As far as I know, you're limited to the auto-selection in macOS.
19:09heli0s[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.
19:09* svenhates DCP
19:10* povik's thoughts are with sven
19:59e1eph4nt has quit [Ping timeout: 480 seconds]
20:04as400[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...
20:06svendunno about the firmware itself, but the IPC protocol is pretty insane
20:07e1eph4nt has joined #asahi-dev
20:17Glanzmann has quit [Ping timeout: 480 seconds]
20:33as400[m]sven: win with the protocol may be your next child you never expected. Like the famous 4k patch :)
20:37roxfan has quit [Ping timeout: 480 seconds]
21:03kloenk has quit [Remote host closed the connection]
21:04kloenk has joined #asahi-dev
22:06jeffmiw has joined #asahi-dev
22:26e1eph4nt has quit [Ping timeout: 480 seconds]
22:31roxfan has joined #asahi-dev
22:34e1eph4nt has joined #asahi-dev
22:46jeffmiwsome update on the hwmon yak to shave: got a first version with 100 Temp sensors, for those interested https://github.com/jfbortolotti/linux/tree/hwmon_smc, output sample on mba m1 : https://borto.fr/nextcloud/s/qPqKKjCzWLEyiQja
22:47jeffmiwI will continue to work on it, looking at current/voltage/power. I updated the wiki yaks to shave page.
22:47jeffmiwAll feedbacks are more than welcome
22:48jeffmiwall dev done from my M1 mba :)
22:49jeffmiweven if it is getting warm to hot...
22:54povik> Temp CHARGER, BETWEEN INDUCTOR AND MOSFETS(TCHP)
22:54povikwhere are the strings like that from? adt?
22:57nela has quit [Ping timeout: 480 seconds]
22:59jeffmiwthis is coming from marcan's list of smc keys
23:02jeffmiw21:15 <marcan> very little is from macos/fieldtest, they have few actual references in the software
23:02povikah, just curious, thanks
23:04jeffmiwso marcan will be able to elaborate more than me on how he came with that, I'm curious too :). I used it as a reference
23:10Manouchehri has quit [Quit: Connection closed for inactivity]
23:15nela has joined #asahi-dev
23:25povikjeffmiw: i get 'file not found' on the link with output sample
23:29povikwhat do i run to get an output like that?
23:30povik-/bin/sh: sensors: not found
23:30poviklet's rebuild the rootfs then
23:31jeffmiwpacman -S extra/lm_sensors
23:32povikif only
23:32jeffmiwwhich model are you using ?
23:33povikthis is some static initramfs i am running
23:33jeffmiwlet me know how it goes
23:33povikshould in a moment
23:35jeffmiwI will be interested to see the output of the m1n1 proxyclient/experiments/smc.py on this machine to compare to j313
23:36jeffmiwfor now, smc temp sensors are hard coded based on what I see on j313 but may move some of this in some DT at some point
23:40jeffmiwjust as a note, my dev branch is based of a july version of asahi branch(based on 5.19.0-rc5), not tested on a more recent version yet
23:42jeffmiwwill get some sleep now, interested to see the result on your side
23:43povikjeffmiw: list of Ts on j314: https://tpaste.us/yv7n
23:47jeffmiwthanks. full output for all keys (~1400ish) will be useful too for the other sensors(current/voltage/...)
23:50povikand here's what sensors give me: https://tpaste.us/Yrj4
23:50jeffmiw has quit [Quit: Konversation terminated!]
23:50povik(in addition to the dmesg flood ;) )
…