2026-06-27
00:00pb17 has quit [Ping timeout: 480 seconds]
00:01Mary has quit [Quit: .]
00:02Mary has joined #asahi-dev
00:05maettu102 has quit [Quit: brb]
00:05maettu102 has joined #asahi-dev
00:07pb17 has joined #asahi-dev
00:49hdbngr has joined #asahi-dev
00:58hdbngr has quit [Ping timeout: 480 seconds]
01:18pb17 has quit [Ping timeout: 480 seconds]
01:24pb17 has joined #asahi-dev
01:55ipatch_ has joined #asahi-dev
01:55ipatch has quit [Read error: Connection reset by peer]
01:58hdbngr has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:00nnym has quit [Remote host closed the connection]
02:00nnym has joined #asahi-dev
02:05first_thunder02 has quit [Read error: Connection reset by peer]
02:05first_thunder02 has joined #asahi-dev
02:06hdbngr has quit [Ping timeout: 480 seconds]
02:14gargantua has quit [Ping timeout: 480 seconds]
02:21tobhe has joined #asahi-dev
02:28tobhe_ has quit [Ping timeout: 480 seconds]
02:39getz has quit [Quit: metastasizing...]
02:44gargantua has joined #asahi-dev
03:12nora has joined #asahi-dev
03:13nora_ has quit [Ping timeout: 480 seconds]
03:18pb17 has quit [Ping timeout: 480 seconds]
03:25pb17 has joined #asahi-dev
03:31donaldh has quit [Ping timeout: 480 seconds]
03:38hdbngr has joined #asahi-dev
03:46hdbngr has quit [Ping timeout: 480 seconds]
04:49hdbngr has joined #asahi-dev
04:58hdbngr has quit [Ping timeout: 480 seconds]
05:23donaldh has joined #asahi-dev
05:46hdbngr has joined #asahi-dev
05:58hdbngr has quit [Ping timeout: 480 seconds]
06:12gargantua has quit [Ping timeout: 480 seconds]
06:17hdbngr has joined #asahi-dev
06:26hdbngr has quit [Ping timeout: 480 seconds]
06:42sofus has joined #asahi-dev
06:47chadmed has quit [Quit: Konversation terminated!]
06:51hdbngr has joined #asahi-dev
06:54mildsunrise has quit [Quit: disconnect]
06:54mildsunrise has joined #asahi-dev
07:00weirdtreething has quit [Remote host closed the connection]
07:00weirdtreething has joined #asahi-dev
07:00hdbngr has quit [Ping timeout: 480 seconds]
07:09hdbngr has joined #asahi-dev
07:11mattia013 has joined #asahi-dev
07:17hdbngr has quit [Ping timeout: 480 seconds]
07:28leiowhat for? Should be possible to use v4l2 directly for firefox for example, might need to fix some support bugs and such though
07:29JamesCalligeros[m]the v4l2 request api is not well supported by anything. ffmpeg requires patches that have not yet been merged (and it still doesnt handle it properly), firefox is not the be-all-end-all of video decode software, and no one is interested in constructing gstreamer pipelines by hand for desktop use
07:30JamesCalligeros[m]everything on the desktop assumes va-api or whatever the nvidia one is is present, and stuff that doesnt is going to very quickly move to vk video. look at how quick firefox was to adopt it vs v4l2.
07:31leioby my reading firefox supported v4l2 for rpi in 116 and vk video in 153; maybe that's not request api or assumes ffmpeg patches though
07:32JamesCalligeros[m]firefox requires a "proper" v4l2-m2m, not request aiui
07:34JamesCalligeros[m]yes, external patches.... that have not been merged.... and nothing that consumes ffmpeg other than mpv effectively uses....
07:35JamesCalligeros[m]and even though mpv uses it "well" it still wont actually pick it unless you force it to with -hwdec, which is also a problem because it wont automatically pick dmabuf-wayland as the output driver either, so you dont even get zerocopy by default
07:36JamesCalligeros[m]this is not a situation that we alone can fix, so the path of least resistance is to just do what everyone else already supports, which is vaapi or increasingly vk video
07:42leioare you sure firefox doesn't work with the ffmpeg patch? https://wiki.postmarketos.org/wiki/Hardware_video_acceleration#Usage suggests it might, saying the ffmpeg patch makes it work
07:43JamesCalligeros[m]hasnt worked at all in the past week of testing on any of my devices
07:44leiomight be something stupid that some firefox debug log reveals? https://bugzilla.mozilla.org/show_bug.cgi?id=1852765 had some log knobs asked for for debugging another chip
07:45leionot many things work seamlessly with vk either, so otherwise maybe option 1 with long-term option 3?
07:46leiogstreamer parts should be able to work seamlessly as well with v4l2, if they don't, maybe I can take a look at that; but it's not like many things use it, especially on plasma systems
07:47JamesCalligeros[m]gstreamer worked fine, my point was more that we cannot ship something that requires users to do some magic pipeline incantation just to have working video decode.
07:48JamesCalligeros[m]"oh yeah just install gst-plugins-bad but make sure your distro builds it with v4l2codecs so you get the v4l2slh264dec component and make sure your pipeline uses it and...."
07:50JamesCalligeros[m]apparently it works with stateless if you have the ffmpeg request api patches applied, but i could not get it to work at all
07:51JamesCalligeros[m]meh doesnt matter right now, todays project has been brainstorming moving most of the garbage to firmware
07:51leiodon't you get gstreamer use v4l2slh264dec automatically when using decodebin2 or decodebin3? That's what practically everything would actually be using, and then it'd work automatically for those
07:52JamesCalligeros[m]yeah except some distros dont build v4l2codecs
07:52JamesCalligeros[m]including gentoo, which i guess could be fixed with a patch to gst-plugins-bad ebuild, but i think its one of those "do not build this it has external deps" ones
07:52hdbngr has joined #asahi-dev
07:52JamesCalligeros[m]most of the garbage has to move to firmware anyway so we can support multiple decode streams at once, so its going to happen regardless
07:53JamesCalligeros[m]the stateless decoders dont come from that
07:53JamesCalligeros[m]they come from -bad
07:54JamesCalligeros[m]anyways i wrote a terrible janked up syslog thingy for the firmware and it "works" in the sense that it will write a log to a ringbuffer and kick the application core to read it, but its awful and idk where in sram we can put it without exploding stuff the driver is doing
07:55sofusJamesCalligeros[m]: we already support multiple decode streams at once, its just kinda bad
07:55leioand other distros just need an appropriate dep, I wager. But yeah, that's a story when its ready to ship somewhere, to go together with that
07:56JamesCalligeros[m]yeah... it chokes easily and i think the cm3 is better poised to track streams in progress and dispatch arriving frames to the decoder units
07:57JamesCalligeros[m]https://github.com/chadmed/avd-fw/tree/work/interface i put some notes and the crap logger here, but im sure you have better ideas :P
07:57JamesCalligeros[m]the cm3 would only need to keep track of in-flight streams and the state of each decoder and maaaybe the dpb for each stream
07:58JamesCalligeros[m]but the latter can just be iovas to something on host memory probably
07:58JamesCalligeros[m]basically i just think reprogramming the decoders on every slice is cpu grunt work that we shouldnt really be waking up the big app cores to do
08:00chaos_princessdo the same thing as apple is doing and log using message selectors, not real strings
08:00JamesCalligeros[m]i dont think we need one right now but if we push more stuff into firmware it could be useful
08:01JamesCalligeros[m]forgor to push the notes, there should be some brainfart notes in there now
08:01hdbngr has quit [Ping timeout: 480 seconds]
08:02JamesCalligeros[m]also powering up and down and reinitialising at runtime is a design choice, we dont have to do that
08:02JamesCalligeros[m]i cant remember if apple does or not
08:03JamesCalligeros[m]and its still fundamentally stateless, the only state we care about is stuff that is in flight
08:03JamesCalligeros[m]the kernel should not care if it gets shut down because if the kernel shuts it down then there are no more streams being decoded
08:06sofusapple is *super* quick to power down so i think the cost of power up/down is low, but i suppose that should be tested. Right now it powers down sometimes during decode
08:07JamesCalligeros[m]If we’re storing anything that needs to survive a power cycle sure, but i dont think that would be the case right
08:07JamesCalligeros[m]If we pause a video and it shuts down we can just reprogram the stream can we not
08:09hdbngr has joined #asahi-dev
08:10JamesCalligeros[m]The whole thing or just the faulting vp?
08:11JamesCalligeros[m]Aaaaaaa
08:13sofusi think your notes are in the right direction, theres still the question of generation the instruction stream on the cm3 vs ap
08:16JamesCalligeros[m]Not documented in the adt?
08:18sofushttps://github.com/ArcaneNibble/m1n1/blob/00f3db7fcde9c87277387e9c3d4a679326fd9817/proxyclient/experiments/avd.py#L606
08:20hdbngr has quit [Ping timeout: 480 seconds]
08:23jannaulibva-v4l2-request has kinda the same issue that it requires magic configuration. you have to `export LIBVA_DRIVER_NAME=v4l2_request` to use it. That could be fixed with libva patches
08:23hdbngr has joined #asahi-dev
08:35sofusfor sure its something in the instruction stream then, i would just need to trace macos doing it (i think)
08:35jannaudon't spend effort on it, I'm asking because I saw an error while testing mpv/ffmpeg/vaapi with libva-v4l2-request
08:36jannauI'm at a stage where this could a millionm different things. I would the combination to support nv12 just fine
08:41hdbngr has quit [Ping timeout: 480 seconds]
08:43Ariadne_ is now known as Ariadne
08:44hdbngr has joined #asahi-dev
08:46jannauisn't that V4L2_PIX_FMT_NV20? see https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-yuv-planar.html
08:49JamesCalligeros[m]It would be cool to support planar yuv. DCP can scan them out with some magic combination of iosurface values which is not a common thing aiui
08:52JamesCalligeros[m]Yeah we already support semiplanar
08:59sofussomething unrelated, i think its safe to remove the 'Battery status is OK?' message from macsmc-power https://pastebin.com/1V7qsKbF
09:00hdbngr has quit [Remote host closed the connection]
09:00hdbngr has joined #asahi-dev
09:01JamesCalligeros[m]nonsense caused by smc firmware, it’s harmless and will be fixed
09:05chaos_princessoh, so they are now sending it for general battery updates?
09:05chaos_princessyea, just remove the message then, it is useless
09:09hdbngr has quit [Ping timeout: 480 seconds]
09:26JamesCalligeros[m]fwiw free to discard all of my opinions and just do whatever, i have no idea what im doing
09:31hdbngr has joined #asahi-dev
09:40hdbngr has quit [Ping timeout: 480 seconds]
09:40hdbngr has joined #asahi-dev
09:48JamesCalligeros[m]sofus: youll have to play with the memmap, i forgot where the cm3 sram base is so i just kept adding offset to the base until it stoped breaking interrupt handlers
09:48JamesCalligeros[m]But take whatever you want
09:50JamesCalligeros[m](And get rid of the command and completion buffers if you dont want to go down the route i was thinking of)
09:55jamie_ has joined #asahi-dev
10:03JamesCalligeros[m]Lets gooooooo
10:03JamesCalligeros[m]I had a loca kernel branch that acked the irq but i had to go out (hence matrix acc) so didnt get around to parsing the log message
10:06JamesCalligeros[m]I just sent the one, read the log then acked
10:11chaos_princessif you are going with packing into an int, what you could do is put them into a dedicated section with the linker commands, and then have the printf-equivalent write pointers to syslog. Linux side will then look up the message in the fw blob
10:14hdbngr has quit [Ping timeout: 480 seconds]
10:14JamesCalligeros[m]Is that what rtk syslog does?
10:14chaos_princessi do not know how that works
10:16integralpilot has joined #asahi-dev
10:17pb17 has quit [Ping timeout: 480 seconds]
10:20JamesCalligeros[m]Idk if using the mailbox like that is a good idea. We will get a lot of interrupts
10:21JamesCalligeros[m]Perhaps better to send either like a log msg id that can then be referenced from the blob or just use the ring buffer
10:21integralpilotjannau: you were sending a new M3 dts patch upstream when -rc1 drops right? is it okay if you include the t8122 i2c fixes in that? ill push now
10:23JamesCalligeros[m]You didnt get one for each write to the mbox?
10:23pb17 has joined #asahi-dev
10:26sofus has quit [Quit: Lost terminal]
10:28sofus has joined #asahi-dev
10:32integralpilothere, pushed the commit: https://github.com/IntegralPilot/linux2/commit/ebad5b03d3924652c081b9e635e1c65f8eb0236b
10:33JamesCalligeros[m]Still getting garbage vi data?
10:34integralpilotyeah, i tried a little bit more today but still not right so gave up
10:35JamesCalligeros[m]Did you manage to get the raw samples from the visense capture pcm?
10:35JamesCalligeros[m]You might have to patch out the speakersafetyd interlock from the kernel driver
10:37integralpilottrying to get the raw samples now (gave up trying to fiddle around the slot numers blind)
10:38hdbngr has joined #asahi-dev
10:38JamesCalligeros[m]The slots are probably fine
10:40integralpilotadt had v/i the other way around so tried that but didnt fix it
10:46hdbngr has quit [Ping timeout: 480 seconds]
10:55hdbngr has joined #asahi-dev
10:57chadmed has joined #asahi-dev
11:04hdbngr has quit [Ping timeout: 480 seconds]
11:29integralpilot has quit [Ping timeout: 480 seconds]
11:31integralpilot has joined #asahi-dev
11:34hdbngr has joined #asahi-dev
11:51hdbngr has quit [Ping timeout: 480 seconds]
11:56hdbngr has joined #asahi-dev
12:05hdbngr has quit [Ping timeout: 480 seconds]
12:12integralpilotokay so just finished collecting the raw data
12:12integralpilotnow time to analyse!
12:13chadmed has quit [Remote host closed the connection]
12:14hdbngr has joined #asahi-dev
12:14pb17 has quit [Ping timeout: 480 seconds]
12:15pb17 has joined #asahi-dev
12:21integralpilotokay so i think what the issue is is that the channel map might be wrong
12:21integralpilotis that possible?
12:26sofus has quit [Quit: Lost terminal]
12:29hdbngr has quit [Ping timeout: 480 seconds]
12:34JamesCalligeros[m]As in the dai link has the wrong mapping?
12:35integralpilotthats what i thought, but then i tried to make it what seemed like the right one and it got worse so i think i was just reading the data wrong
12:36integralpilotin the data, i just see like tiny numbers near 0 and 32767 and -32768
12:37integralpilotso not a good sign
12:37integralpiloti can't imagine what is going wrong though
12:44xingjianll has joined #asahi-dev
12:45JamesCalligeros[m]Try fiddling with the bus keeper masks
12:51xingjianll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:57hdbngr has joined #asahi-dev
12:57integralpilotwill try tmrw, thanks
13:00integralpilotim a bit confused actually sorry, what are those?
13:01JamesCalligeros[m]The 0xf0f0/0x0f0f in the codec dt nodes
13:01JamesCalligeros[m]Try swap them
13:02integralpilotah okay, thanks!
13:05chadmed has joined #asahi-dev
13:05hdbngr has quit [Ping timeout: 480 seconds]
13:15integralpilotIT WORKS NOW!!!!
13:17integralpilotaudio is like fully working, i can't believe it
13:17integralpilotit was the bus keeper masks
13:19integralpilotthe very first thing played on M3 (well, base at least) that i used to test it was this lol, traumatic tone that every aussie kid knows: https://www.youtube.com/watch?v=d34JBc51PGQ
13:19integralpilotanyway thanks again, can't believe that fixed it, so happy rn
13:19integralpilot has quit [Quit: integralpilot]
13:21xingjianll has joined #asahi-dev
13:26chadmedhm ive got the ring buffer working on the fw side but idk if the sram mapping is correct. ive put the ring buffer at 0x10010000 + 0x4000, but reading avd->sram + 0x4000 which should be the write cursor gives nonsense values that may or may not be encoded instructions
13:26chadmed(ive added a memset/memclear and initialised 0x10010000 + 0x4000 to all zeroes, so after i do a bootup log the write cursor should be 1)
13:33sofus has joined #asahi-dev
13:37chadmedah that'd do it then. also interesting that the ap only has 16k of the cm3's memory mapped
13:38fugi5 has quit [Quit: bye]
13:38fugi5 has joined #asahi-dev
13:39chadmed"yeah cm3 ram base is 0x20000000 except for all the times its not also you might get 4k of ram or 512m of ram who knows"
13:48chadmedeh its almost midnight im sure im missing something very stupid and obvious that i will wake up, see immediately and be extremely embarrassed about
13:50chadmednah my issue is i put the logbuffer at 0x10014000, set all its bytes to 0, readl(avd->sram + 0x4000) and get what looks like encoded instructions (read cursor: 3716147649)
13:55hdbngr has joined #asahi-dev
13:58chadmedyes and when you put it there it overwrites firmware, which is bad. when you put it at 0x10014000 its fine and everything works and the m3 writes to it, but avd->sram does not point to 0x10010000 so it cannot be read
14:00chadmed has quit [Quit: Konversation terminated!]
14:03chadmed has joined #asahi-dev
14:06hdbngr has quit [Ping timeout: 480 seconds]
14:13hdbngr has joined #asahi-dev
14:34sofus has quit [Quit: Lost terminal]
14:40pb17 has quit [Ping timeout: 480 seconds]
14:42pb17 has joined #asahi-dev
15:30xingjianll has quit [Remote host closed the connection]
15:32hdbngr has quit [Ping timeout: 480 seconds]
15:36hdbngr has joined #asahi-dev
15:44yuyichao_ has quit [Quit: Konversation terminated!]
15:44yuyichao has joined #asahi-dev
17:08hdbngr has quit [Ping timeout: 480 seconds]
17:10crabbedhaloablut has quit []
17:12cowanh[m] has joined #asahi-dev
17:13crabbedhaloablut has joined #asahi-dev
17:16hdbngr has joined #asahi-dev
17:32hdbngr has quit [Ping timeout: 480 seconds]
17:42hdbngr has joined #asahi-dev
17:54mattia013 has quit [Ping timeout: 480 seconds]
17:55hdbngr has quit [Ping timeout: 480 seconds]
17:58mattia013 has joined #asahi-dev
18:03hdbngr has joined #asahi-dev
18:12hdbngr has quit [Ping timeout: 480 seconds]
18:19hdbngr has joined #asahi-dev
18:33hdbngr has quit [Ping timeout: 480 seconds]
18:34hdbngr has joined #asahi-dev
18:43hdbngr has quit [Ping timeout: 480 seconds]
18:51hdbngr has joined #asahi-dev
19:00hdbngr has quit [Ping timeout: 480 seconds]
19:10hdbngr has joined #asahi-dev
19:11Lyude has quit [Quit: Bouncer restarting]
19:13Lyude has joined #asahi-dev
19:19hdbngr has quit [Ping timeout: 480 seconds]
19:26paulwalker has quit [Remote host closed the connection]
19:27hdbngr has joined #asahi-dev
19:31paulwalker has joined #asahi-dev
19:33paulwalker has quit [Remote host closed the connection]
19:35hdbngr has quit [Ping timeout: 480 seconds]
19:43hdbngr has joined #asahi-dev
19:43paulwalker has joined #asahi-dev
19:57mattia013 has quit [Quit: mattia013]
19:59hdbngr has quit [Remote host closed the connection]
19:59hdbngr has joined #asahi-dev
20:12paulwalker has quit [Remote host closed the connection]
20:12hdbngr has quit [Ping timeout: 480 seconds]
20:19hdbngr has joined #asahi-dev
20:45hdbngr has quit [Ping timeout: 480 seconds]
20:49coroner21 has joined #asahi-dev
20:54coroner21 has quit [Quit: leaving]
20:55hdbngr has joined #asahi-dev
21:01aissen has quit [Quit: brb]
21:02Yushi_ has joined #asahi-dev
21:06Yushi has quit [Ping timeout: 480 seconds]
21:08* leiojust reads about defmt crate for other reasons and recalls the cm3 logging talk here from before
21:08aissen has joined #asahi-dev
21:10Yushi_ is now known as Yushi
21:11chaos_princessrust would make that part easier, but its a c project for now
21:12hdbngr has quit [Ping timeout: 480 seconds]
21:21hdbngr has joined #asahi-dev
21:30hdbngr has quit [Ping timeout: 480 seconds]
21:38hdbngr has joined #asahi-dev
21:39paulwalker has joined #asahi-dev
21:47hdbngr has quit [Ping timeout: 480 seconds]
21:55hdbngr has joined #asahi-dev
22:04hdbngr has quit [Ping timeout: 480 seconds]
22:12hdbngr has joined #asahi-dev
22:20hdbngr has quit [Ping timeout: 480 seconds]
22:28hdbngr has joined #asahi-dev
22:37hdbngr has quit [Ping timeout: 480 seconds]
22:45hdbngr has joined #asahi-dev
22:51paulwalker has quit [Remote host closed the connection]
22:52paulwalker has joined #asahi-dev
22:53tobias^ has quit [Quit: leaving]
22:54hdbngr has quit [Ping timeout: 480 seconds]
23:02a4acg has joined #asahi-dev
23:03a4acg has quit []
23:03a4acg has joined #asahi-dev
23:03hdbngr has joined #asahi-dev
23:04a4acg has quit [Remote host closed the connection]
23:05a4acg has joined #asahi-dev
23:05averne_ has quit [Ping timeout: 480 seconds]
23:12hdbngr has quit [Ping timeout: 480 seconds]
23:13a4acg has quit [Ping timeout: 480 seconds]
23:20hdbngr has joined #asahi-dev
23:26a4acg has joined #asahi-dev
23:27a4acg_ has joined #asahi-dev
23:27a4acg has quit [Remote host closed the connection]
23:29a4acg_ has quit [Remote host closed the connection]
23:32hdbngr has quit [Ping timeout: 480 seconds]
23:36hdbngr has joined #asahi-dev
23:57gargantua has joined #asahi-dev
23:57a4acg has joined #asahi-dev
23:58hdbngr has quit [Ping timeout: 480 seconds]