#
…

2023-02-24

00:18Fanfwe42 has joined #asahi-dev
00:18Fanfwe has quit [Remote host closed the connection]
01:31derzahl has quit [Ping timeout: 480 seconds]
01:41derzahl has joined #asahi-dev
02:15Fanfwe has joined #asahi-dev
02:15Fanfwe42 has quit [Ping timeout: 480 seconds]
02:26cylm has joined #asahi-dev
02:51zef has joined #asahi-dev
02:52kettenis has quit [Ping timeout: 480 seconds]
02:58zef_ has quit [Ping timeout: 480 seconds]
03:25kettenis has joined #asahi-dev
03:53kevans91this may be a stupid question, but is there some hardwar prereq for enabling the FPU (M1) that I might be missing? We take our very first floating point exception from el0, setup cpacr_el1, instruction barrier; the subsequent ldp to q0/q1 causes an apparent hang (no exception AFAICT)
03:53kevans91hardware, even
04:07kevans91I don't really see anything we do differently than, say, OpenBSD, in response to EXCP_FP_SIMD
04:11Fanfwe42 has joined #asahi-dev
04:11Fanfwe has quit [Read error: Connection reset by peer]
04:30supay has joined #asahi-dev
04:43marcanpovik: FWIW the safe cap is -14dB lower than the current one (at that volume level no speaker can overheat with worst-case input)
04:43marcanso that has to be the DVC level cap when no safety daemon is running
04:43marcanthe thing is though, especially for the tweeters, the headroom helps a *lot*
04:44marcanyou can hear it in the IWTLW demo: the snares during the dubstep part of the song sound nice and crisp, but when the insane clipped pads come in, they overload and throttle
04:44marcanthen they gradually come back after that part
04:45marcanfor less ridiculous inputs, that means you can have some pretty loud everything and still sound crisp even if the tweeters are running at like 4x max steady-state power during HF transients or even more (that's 6dB free headroom)
04:46marcanmax steady-state for woofers is 1.3W, about 1.0W for tweeters
04:46marcanbut the peak power the amps can put out is like 22W
04:47marcan(well, 11W peak for a sine, 22W is peak for a square/IWTLW)
04:47marcanso we basically have ~8x power headroom give or take, which is not ridiculous when ~4x is clearly actually useful
04:48marcanso I don't think we want to cap lower
04:48marcanthis is all for j314
05:58WindowPa- has joined #asahi-dev
06:03WindowPain has quit [Ping timeout: 480 seconds]
07:22jeffmiw has quit [Ping timeout: 480 seconds]
07:27akemin_dayo has quit [Ping timeout: 480 seconds]
07:35cylm_ has joined #asahi-dev
07:37cylm has quit [Ping timeout: 480 seconds]
07:41akemin_dayo has joined #asahi-dev
09:34nyilas has joined #asahi-dev
09:45hir0pro has joined #asahi-dev
10:19hir0pro has quit [Ping timeout: 480 seconds]
10:27eiln has quit [Remote host closed the connection]
10:28hir0pro has joined #asahi-dev
10:46eiln has joined #asahi-dev
10:47MajorBiscuit has joined #asahi-dev
11:09hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:35ChaosPrincesssven: additional thing w.r.t firmware names - we already use that same firmware-name in dt scheme for dockchannel firmware
11:35svenwhich also isn't upstream and I'd probably have the same comment there
11:35ChaosPrincessi guess you convinced me to go grab the compatible from the root node
11:36svenmaybe wait for the dt maintainer's opinion ;)
11:51kettenisI'm not necessarily against having the firmware name in the binding (and there is plenty of prior art)
11:52kettenisbut having a directory name in there is a mistake if you ask me
11:52chadmed has quit [Remote host closed the connection]
12:02nyilas has quit [Remote host closed the connection]
12:11chadmed has joined #asahi-dev
12:14chadmedmarcan: speakersafetyd still only works with 48 kHz. silver lining is that it seems pretty infallible for 48 kHz sources with the DSP graph on top of it!
12:16chadmedeasy workaround for now if you want to ship something Soon(tm) is just lock to 48 kHz in the pipewire config file, but that will still break alsa and pulse users
12:20chadmedi still think long term if we _really_ dont want to worry about excursion we're going to need virt bass. if that can be implemented easily with biquads it would probably end up being easier on the CPU than the ridiculous multiband compressor we have now
12:20chadmedwhich only really exists to maintain a constant-ish sound profile as we clamp down the woofers
12:21chadmedall that overexcursion happens below 200-ish hz so cutting that out and replacing it with the psychoacousic effect would mean we should be able to get rid of the compressor and save a boatload of energy
12:29WindowPa- has quit [Quit: ZNC 1.8.2 - https://znc.in]
12:29WindowPain has joined #asahi-dev
12:30rowanG337 has joined #asahi-dev
12:32rowanG337sven: I saw your post that you're looking for someone with a TB4 OWC Hub. I have an OWC one: https://eshop.macsales.com/shop/owc-thunderbolt-hub
12:32rowanG337What logging do you need exactly?
12:32rowanG337I also have a M2 MBP Max if you want something from OSX
12:34rowanG337and I can see in LSPCI something with Goshen Ridge: `0000:01:00.0 PCI bridge: Intel Corporation Thunderbolt 4 Bridge [Goshen Ridge 2020] (rev 03)`
12:36hir0pro has joined #asahi-dev
12:38svenrowanG337: is that lspci output without the hub connected?
12:38rowanG337No with the hub connected. I can post the Full lspci output
12:39sventhat would be helpful. essentially I'm looking for a machine with a usb4 host controller as well
12:40svenyup, look like that's a thunderbolt 4 host! :)
12:40svencan you run a kernel with thunderbolt debug out enabled?
12:41rowanG337Sure. If you tell me how I can do that.
12:41rowanG337Is that a kernel build option?
12:42sventhe duct tape version is to replace dev_dbg, etc with dev_err drivers/thunderbolt/tb.h
12:43svenI think there's a way to use dyndbg to just enable it for thunderbolt as well as long as the kernel is compiled with CONFIG_DYNAMIC_DEBUG
12:44sventhunderbolt.dyndbg=+p in the boot args maybe
12:44rowanG337I will do the ducktape option. That should work for sure
12:44rowanG337does kernel version matter?
12:44svennot really
12:45svenwhat I'm curious about is the output when booting the machine without the hub connected, then connecting only the hub and then connecting another device after the hub
12:46eiln has quit [Quit: Page closed]
12:46rowanG337Oke I will manage that. I probably do it tommorow since right now I use the laptop for work :).
12:46hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:47svensure :)
12:47svenI essentially want to compare the path and tunnel creation on a host that's known to work with what my m1 driver does
12:56svenrowanG337: oh, also lspci -xxxx would be useful but note that lspci claims that's "(dangerous; root only)"
12:56svenprobably because it can trigger bugs in broken hardware and maybe require a reboot I guess
12:58rowanG337I added it
12:58svennice, thanks!
13:01rowanG337Just for the record
13:01rowanG337only `tb_dbg` needs to refer `dev_err`
13:02rowanG337`tb_info`, `tb_warn` etc
13:02rowanG337stay as they are
13:02svendepends on your log level I think. I have them all patched to dev_err just for good measure *shrug*
13:02rowanG337Oke I will do that as well to be sure.
13:08povikmarcan: i get why the headroom is desirable but can we be sure there won't be mechanical damage if we overstep apple's envelope?
13:10chadmedive done some pretty heinous things to this machine and no harm has come of the overexcursion
13:10chadmednothing audible anyway
13:11chadmedyou have to be _really_ hammering these sorts of speakers for a fair amount of time to cause permanent/audible damage
13:12chadmedand like i said if we "officially" support some sort of psychoacoustic bass thingy in pipewire we can just set the high pass on the woofer amps to 100hz and eliminate most if not all the overexcursion issues
13:12svenpovik: nice!
13:13povikand the options actualy *do* work! :D
13:13chadmedpovik: making them work was the tricky part!
13:13* svenis looking forward to a picture of this old thunderbolt display I have connected to my mac mini :>
13:14svenjust need to figure out why dcpext doesn't like dp-over-tbt tunnels
13:32hir0pro has joined #asahi-dev
13:38kesslerd has quit [Remote host closed the connection]
13:39jannaupovik: \o/
13:40jannauhow does that work from macaudio PoV. do we a single display audio output device or one for each dcp?
13:42jannauI guess we need to start thinking about how we model the output ports for the display subsystem in the device tree
13:43povikthere's a separate sound card for each dcp. and it all is independent of macaudio.c
13:43povikthe driver ended up not involving ASoC even
13:45poviki spawn a device here, and then the driver in gpu/drm/apple/audio.c binds on it
13:45povikthat driver should move to sound/apple/dcp_audio.c or similar
13:45povikit just needs to be further decoupled from the rest of dcp
13:46povik(does #include "parser.h" at the moment)
13:46arnd has quit []
13:47arnd has joined #asahi-dev
13:48povikin the devicetree all that happens is that the dcp node gets an apple,audio-xmitter prop referencing a dpaudio node
13:50jannaumaybe afk/epic/parser should be moved to drivers/soc/apple if the audio driver depends on parser
13:51povikbut it's not the epic bits that the audio driver depends on, just general parsing of the apple structures
13:51povikthough that might be moved there too, right
13:51jannaunaming is a little weird since the mapping between dcp and output port will become deynamic
13:52kesslerd has joined #asahi-dev
13:52poviki was thinking it makes sense keeping the parsing with dcp, just reworking the interface between dcp/dcp_audio so that the parsing is abstracted away from the audio driver
13:52povikactually it pretty much is already
13:52poviklet's see why do i need parser.h
13:54jannauthat sounds liek we should try to keep paerser with drm/apple
13:54Fanfwe42 has quit [Ping timeout: 480 seconds]
13:54povikyeah, i just call the 'parse_*' functions directly from audio.c
13:55povikto be in line with other drm/audio drivers we should abstract this away to a set of callbacks in the platform data given to the audio device
13:56povikthis is the decoupling i had in mind
13:56Fanfwe has joined #asahi-dev
13:57povikjannau: re naming, there's getProductAttributes on the audio epic service
13:57povikwe can patch that through to the audio device (it reads the data already, but merely exposes them in debugfs)
13:57povikand it can use the remote device name in naming of the sound card
13:58povikalthough i don't see a way to do dynamic audio device naming in ucm
13:58jannauthat's the display's name
13:59povikit has bunch of info, including the display model
13:59poviki found out in what week my display was manufactured :D
14:00kesslerd_ has joined #asahi-dev
14:00jannauso derived from EDID
14:02poviktechnically the ALSA sound card has to have a static name depending on the DCP instance only
14:03povikbut we can offer further info for sound servers on read-only device controls
14:03jannauI think it would make more sense to have dynamic names based on which port dcp is muxed to
14:03MajorBiscuit has quit [Ping timeout: 480 seconds]
14:04jannauso probably only three distinct options: hdmi, usb-c, thunderbolt
14:05povikthere's one way to do it
14:05povikwe can have individual jacks corresponding to hdmi, usb-c, thunderbolt on the sound card
14:05jannaunot even sure if the distinction between usb-c and thunderbolt makes sense
14:06povikand their plug state will reflect to what port the dcp is routed to
14:07povikthis can propagate into picking up the right 'SectionDevice' from ucm, which contains the name to be presented to users
14:07jannauah, that makes sense. naming the cards after their dcp(ext) would work then
14:08gladiac has joined #asahi-dev
14:13povikit would be hard to do otherwise, the alsa cards would need to be recreated dynamically probably
14:13povikbut the alsa card name need not be the name presented to users, and there might even be some other way to influence the latter than by jack state
14:14dsharshakov has joined #asahi-dev
14:15hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:16dsharshakovMaybe it's better to create it dynamically with the monitor name in place, since desktop HDMI audio does the same (IIRC being snd-hda-intel inside)
14:17povikreally? are you sure?
14:17dsharshakovit's more expected to see display name from EDID there, not the port type
14:17hir0pro has joined #asahi-dev
14:17dsharshakovAMDGPU shows monitor name
14:18dsharshakovAnd Radeon is being an HDA device. Unsure about the exact mechanisms
14:19hir0pro has quit []
14:20poviklooking at ^-- once more we can maybe substitute from a sysfs file into the name
14:20poviknot sure how well will that sit with upstrem though
14:20povik*upstream
14:20poviki am surprised there doesn't seem to be a way to use something read from a device control
14:20dsharshakovMaybe see how vc4 or others solve this (not having HDA)
14:21povikmaybe by involving the enable sequences?
14:21povikdsharshakov: you don't know how annoying it is trying to make sense of the other drivers :D
14:21poviklevels of indirection everywhere...
14:24dsharshakovvc4 uses ASoC and viewing through it doesn't seem to show anything related to feeding EDID data to snd_*
14:25povikah, now i realize i have read sound/soc/codecs/hdmi-codec.c
14:25dsharshakovDo existing UCM configs implement something similar
14:25povikcards using that won't be recreated dynamically
14:26povikas probably won't be any ASoC based cards
14:27povikso let's take one hdmi-codec.c based card and read its ucm, yeah
14:27rowanG337 has quit [Remote host closed the connection]
14:27dsharshakovWait, you said your DCP audio driver isn't using ASoC, didn't you?
14:27povikis the __number merely a card number?
14:28povikyeah, it's not
14:28povikbut it doesn't matter for this
14:28jannauvc4 is probably bad example since it's display out is afaik hdmi only and has no dynamic switching
14:28povikanything asoc can does we can do in the alsa driver too
14:28dsharshakovwell, nothing related here. but I clearly remember seeing monitor name in say pw-dump's
14:28poviks/can does/can do/
14:28jannaumsm, mediatek or rockchip might be better eaxample with displayport/usb-altmode support
14:29povikmaybe the sound servers have special-cased support for hdmi
14:29poviki vaguely remember something like that
14:29hightower2 has quit [Ping timeout: 480 seconds]
14:30povikwhoa what?
14:30povikthe only hits for __Number in alsa-ucm are in that file
14:30povikand it isn't documented as having special meaning
14:31povik> The arguments in the macro are refered as the variables with the double underscore name prefix (like *__variable*).
14:31povikah, this is probably what's going on
14:31povikthe whole thing is a macro
14:31dsharshakov> maybe the sound servers have special-cased support for hdmi
14:31dsharshakovalright, found some, will link in a sec
14:33dsharshakovfound by brief ripgrepping
14:34povikso it looks for an 'ELD' control
14:34dsharshakovso apparently it's reported in some non-ordinary way but uses that ELD
14:34povikwhich is something hdmi-codec.c has
14:34dsharshakov> The ELD format is specific to HDA Intel sound cards
14:35povikwhere is that from?
14:35dsharshakovbut at least we (PW) shouldn't check for it being an HDA device. ALSA and PA might be different though
14:37dsharshakovAnd UCM is optional in that mix (maybe can be avoided), ACP can handle that just fine
14:37povikACP is the pipewire alsa layer?
14:37dsharshakovALSA Card Profile, yes, it's implemented by PW
14:38povikit's a profile for pipewire, it doesn't have meaning outside of pipewire, right?
14:38dsharshakovYes, idk how PA handles devices without UCM and how does it treat HDMI
14:38povikok, making sure i understand it right
14:40dsharshakovprofile-wise, have you checked passthrough modes on HDMI (Dolby TrueHD, DTS, other codec bitstreamed directly to AV receiver)?
14:40dsharshakovmight also be architecturally important
14:41poviki don't understand those words
14:41poviki get a blob from the dcp describing the available formats and channel layouts
14:41povikand i translate that into alsa talk
14:42dsharshakovSNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE or something like this
14:42povikah, i think we won't support that
14:42dsharshakovSPDIF-like data offloading. Apparently driver has something to do with that
14:43dsharshakovNo RE sample like supporting TV to test?
14:43povik'RE sample like'?
14:44dsharshakovSomething to attach and trace with to see how it's handled
14:45dsharshakovMany modern TVs should have that sort of thing, and macOS is likely to take advantage of that (since no immersive audio is possible with PCM only)
14:46povikwhy wouldn't immersive audio be possible otherwise? it's not possible to send a many-channel pcm stream over hdmi?
14:47dsharshakovI mean stuff like Atmos apparently only existing in compressed forms (pass bitstream to the AV receiver which decodes metadata to render sound objects)
14:47dsharshakovnot just 7.1 which is handled by HDMI PCM
14:48ChaosPrincesspovik: atmos and similar crap only exist as patent-encumbered undocumented format, and everyone just sends them to the AV receiver to decode, instead of decoding it on player cpu
14:49povikyeah, sounds like crap :D
14:49povik(pun not intended)
14:51dsharshakovAFAIK also possible to offload just because of why not, even if it's just some spdif encoded format
14:51jannaubandwidth (you can have more than 7.1 channels) and you need missing knowledge of the speaker config (and room) to mix it correctly
14:51dsharshakovbut maybe that can be left for later
14:55povikanyway indeed i don't have a TV with fancy sound regimes to test the driver against, but i implemented some features into the driver so people can post what DCP advertises about different displays
14:55povikso we will see about this
14:56kettenisjannau: isn't the bandwidth of some extra audio channels negligable compared to 4K video? ;)
14:56povikbtw speaker layout is already parsed out from the DCP blob and pushed to userspace
14:57povikalthough there's one thing i don't understand about the channel layout negotiation
14:57povikbut seeing the blob corresponding to different displays should help with that
14:59hir0pro has joined #asahi-dev
15:03dsharshakov has quit [Remote host closed the connection]
15:05jannaukettenis: it's transmitted during video blanking and max channels, samplerate and resolution is specified. I missed that it was increased to 32 channels in dp 1.4
15:34rkjnsn_ has quit [Quit: Page closed]
15:36hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:46hir0pro has joined #asahi-dev
15:49svenhrm, there’s a “CF VID” that seems to be somehow related to usb4 mode in the tipd chip
15:49svenany idea what that could be? can’t find anything related to USB PD called “CF”
15:51hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:01gladiac has quit [Quit: k thx bye]
16:05eiln has joined #asahi-dev
16:06hir0pro has joined #asahi-dev
16:07cylm has joined #asahi-dev
16:13cylm_ has quit [Ping timeout: 480 seconds]
16:17hir0pro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:23stickytoffee has quit [Quit: brb]
16:42nyilas has joined #asahi-dev
16:49hir0pro has joined #asahi-dev
16:55cylm has quit [Ping timeout: 480 seconds]
17:03pb17 has joined #asahi-dev
17:06stickytoffee has joined #asahi-dev
17:16povikjannau: upping LMB_MAX_REGIONS to 32 doesn't seem to help with the reservation errors
17:26m2231puppy has joined #asahi-dev
17:27m2231puppy has quit []
17:59bluetail has quit [Quit: The Lounge - https://thelounge.chat]
18:01bluetail has joined #asahi-dev
18:17hightower2 has joined #asahi-dev
18:33kettenispovik: and what about LMB_RESERVED_REGIONS?
18:33bluetail has quit [Quit: The Lounge - https://thelounge.chat]
18:33kettenisthe lmb ifdefs are a complicated maze that even confused the core u-boot developers recently
18:40svencute, looks like xnu can freeze all drivers on a pci bus, reassign resources and then thaw everything again. looks it supports my usb4 hub to dock to another dock setup that way
18:41svenlooks like that’s a special power state called kIOPCIDevicePausedState
18:41povikkettenis: will test
18:41svenstill doesn’t explain why it gets hotplug interrupts and I don’t though :(
18:54kesslerd__ has joined #asahi-dev
18:57kesslerd has quit [Ping timeout: 480 seconds]
18:57kesslerd_ has quit [Ping timeout: 480 seconds]
18:58kesslerd has joined #asahi-dev
19:13bluetail has joined #asahi-dev
19:30svenuhhh… why does it not access the config space of the bridge that gets the hotplug
19:30svenwhy does it instead access something in the config space if the root port
19:31svenim going to be very annoyed if it turns out that all hotplug interrupts are routed to some apple-specific thing in the root port
19:43hightower2 has quit [Remote host closed the connection]
19:51povikit should let people grab the sound mode blobs of various displays
20:00kesslerd has quit [Remote host closed the connection]
20:01kesslerd has joined #asahi-dev
20:13svenAppleThunderboltPCIUpAdapter<0xfffffe167554b800>::upstreamPCIDeviceNotification 🙃
20:14svenyup. looks like apple treats hotplug on *every* bridge using that OOB notification
20:44derzahl has quit [Ping timeout: 480 seconds]
20:53hightower2 has joined #asahi-dev
20:54derzahl has joined #asahi-dev
21:58nyilas has quit [Remote host closed the connection]
23:01chadmed has quit [Quit: Konversation terminated!]
23:09chadmed has joined #asahi-dev
23:47Droop has quit [Ping timeout: 480 seconds]
…