#
…

2022-08-16

00:06surge9n has joined #asahi-dev
00:14surge9n has quit [Ping timeout: 480 seconds]
00:21Nspace has quit []
00:21Nspace has joined #asahi-dev
00:39surge9n has joined #asahi-dev
00:40uniq has joined #asahi-dev
00:47surge9n has quit [Ping timeout: 480 seconds]
00:53jluthra has quit [Remote host closed the connection]
00:54jluthra has joined #asahi-dev
01:03uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:12surge9n has joined #asahi-dev
01:16uniq has joined #asahi-dev
01:20surge9n has quit [Ping timeout: 480 seconds]
01:43surge9n has joined #asahi-dev
01:51surge9n has quit [Ping timeout: 480 seconds]
02:01uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:16uniq has joined #asahi-dev
02:28uniq is now known as sortIuniq
02:46sortIuniq is now known as uniq
03:00skipwich has quit [Quit: DISCONNECT]
03:01skipwich has joined #asahi-dev
03:22amarioguy has quit [Remote host closed the connection]
03:23PyroPeter has joined #asahi-dev
03:25pyropeter3 has quit [Ping timeout: 480 seconds]
03:27uniq has quit [Ping timeout: 480 seconds]
03:46uniq has joined #asahi-dev
04:06dmmcf has joined #asahi-dev
04:14chadmed has quit [Quit: Konversation terminated!]
04:17chadmed has joined #asahi-dev
04:24dmmcf has quit [Ping timeout: 480 seconds]
04:30marcanheh, CONFIG_TRACE_MMIO_ACCESS showed up on 6.0, cute
04:30marcansomewhat moot with the hypervisor though :)
04:53marcanpovik: I really don't know what commits I should be using for 6.0; the macaudio driver in both branches differs quite a bit and neither is quite right.
04:53marcanI just pushed something that compiles at least, but it's probably wrong :)
05:00c10l has quit [Quit: Bye o/]
05:00c10l has joined #asahi-dev
05:58MajorBiscuit has joined #asahi-dev
06:00Major_Biscuit has joined #asahi-dev
06:06MajorBiscuit has quit [Ping timeout: 480 seconds]
06:23uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:00duban has quit [Quit: I'm out]
07:01duban has joined #asahi-dev
07:11uniq has joined #asahi-dev
07:15the_lanetly_052__ has joined #asahi-dev
07:15isoriano has joined #asahi-dev
07:31uniq has quit [Ping timeout: 480 seconds]
07:34the_lanetly_052__ has quit [Ping timeout: 480 seconds]
07:58isoriano has quit [Remote host closed the connection]
08:00Ry_Darcy has joined #asahi-dev
08:21mazmarcan: that's a QC debugging special.
08:24arndmarcan: I'm also not sure if the CONFIG_TRACE_MMIO_ACCESS implementation is generally that useful. This has been going for a while, and as I understand, the authors mainly need it as a debugging tool for qcom chips that completely hang when a broken driver accesses an MMIO location that is owned by EL3. We'll see if someone can make it work for anything else
08:25arndUnfortunately the ideas that I had for making it more general tended to also break their use case.
08:36pjakobssonarnd, I've been hacking on a driver for decklink capture cards and found that it's also very useful to have a stack dump on each trace. It's pretty heavy but provides lots of useful information when interacting with binary blobs.
08:37arndpjakobsson: so does the code we merged work for this usecase?
08:38pjakobssonarnd, I haven't looked at it yet. Give me a minute.
08:39arndif you have any ideas for improvements, I'm sure others can benefit from that as well
08:41surge9n has joined #asahi-dev
08:42pjakobssonIn my specific case I have access to a shim where I can catch all os specific calls that the driver does. That is probably more powerful.
08:43pjakobssonBut I'll have a look to see if any of my ideas can be used for mmio trace
08:44uniq has joined #asahi-dev
08:45arndpjakobsson: I think the idea to use tracepoints on each mmio access is generally useful, if you can filter the results in a useful way to get the trace you want. What I don't know is whether the implementation we have is good enough for that. My hope would be that one can use bpf (https://lwn.net/Articles/683504/) for filtering the results to get just the right ones
08:45arndbut I have no experience actually doing that
08:51pjakobssonarnd, where is the code you merged? I assumed you meant it got merged into mainline but can't find any recent changes.
09:00uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:01povikmarcan: yeah, i don't have anything prepared you should be using for 6.0, really; as you saw, asahi-sound-wip, which is roughly my working latest and is in step with upstreaming, has diverged a lot from the old stuff merged in asahi
09:01povik(as there were no new features until recently, i didn't push for syncing)
09:01uniq has joined #asahi-dev
09:02DmitrySharshakov[m]povik: could you please elaborate how do volume caps work in the WIP driver?
09:02povikanyway, i am away at the moment, but on friday i can flesh out the new branch for merging
09:03povikthis time we may push it with UCM userspace config, which i suppose should be easy to do it with the reference distro
09:03povikjust another package to overlay...
09:03DmitrySharshakov[m]Are they just preventing setting volume above 70% or make 100% set 70% in software (i.e. scaling the volume). So, if userspace wants to set max, should it be 100 or 70?'
09:03DmitrySharshakov[m] * Are they just preventing setting volume above 70% or make 100% set 70% in software (i.e. scaling the volume). So, if userspace wants to set max, should it be 100 or 70?
09:04povikDmitrySharshakov[m]: userspace sees 100% as the max, which is translated to the capped level
09:05DmitrySharshakov[m]Did you have an opportunity to test whether 800 Hz HPF does work alright?
09:06poviknot yet, i didn't get to the hardware since i wrote that patch i linked
09:06povikon friday i will
09:06DmitrySharshakov[m]I'm now doing stuff for PipeWire/WirePlumber (PW issue #2210), and of course main target audience for this feature is Asahi
09:06povikah, i was wondering if you are the same dmitry i get all that eam
09:06povik* emails from :)
09:06DmitrySharshakov[m]Alright, sorry for disturbance
09:06poviknot at all
09:07DmitrySharshakov[m]povik: Hmm, what's the email?
09:07poviki am subscribed to the thread...
09:07DmitrySharshakov[m]I'm the same Dmitry as who wrote some concepts in PW issue, I'm also sh7dm on GH and Reddit
09:08DmitrySharshakov[m]povik: PW issue 2210? Yes, I has wrote a bit there, now implementing DSP profile probing inside WirePlumber
09:09DmitrySharshakov[m]With those Lua scripts Pro audio is set automatically
09:09DmitrySharshakov[m]Also, is id like `alsa_output.pci-0000_03_00.6.pro-output-0` (but of course name of Mac audio card) sufficient to tell the difference?
09:10DmitrySharshakov[m]We need some way for autodetection of that, so ALSA device should have an appropriate metadata like `alsa_output.j314` for WirePlumber to load the correct profile
09:12DmitrySharshakov[m]That is the only way to get it upstreamable, like just push those configs in Arch Linux ARM or any other repos and let software load it only when required. AFAIK now a Python script installs correct profiles according to DT it reads from sysfs. However, it'd look weird if PipeWire reads DT to find this out. Maybe kernel driver should have those labels to be properly identifiable?
09:15surge9n has quit [Ping timeout: 480 seconds]
09:17pjakobsson has quit [Ping timeout: 480 seconds]
09:19chadmedyeah this is why it really needs to be new functionality inside pw itself with autoconfig based on a directory structure
09:19chadmedwe really cannot ship janky ass lua scripts, its seriously no better than what we're doing now
09:19DmitrySharshakov[m]chadmed: Yes, that's what I'm trying to accomplish
09:19chadmedactually its worse because youre moving from a well defined config format to lua
09:19DmitrySharshakov[m]Lua scripts are used to configure WirePlumber
09:20chadmedyeah im aware, what im saying is that its simply not a good enough solution in the long term
09:20chadmedand if we were satisfied with shipping lua scripts we would just keep doing what we're doing now because it achieves the exact same thing
09:20chadmedexcept maybe the "dont load if the hardware isnt there" bit
09:21DmitrySharshakov[m]It's a no-go to just set into configuration of PW. Session manager should have a new config which it handles by its Lua engine. Not really shipping those in Asahi, but WP having such code and using it to discover DSP-enabled hardware
09:21DmitrySharshakov[m]So my question was about finding out model from within ALSA API
09:22chadmedyeah but what im saying is we still have to ship and install some sort of script and the DSP, which is exactly what we're doing now
09:22chadmedmoving that into WP and lua scripts just kicks the can down the road
09:22uniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:23povikyes, the card has id to recognize it as, say, j314
09:23povikand userspace should discover that to apply dsp
09:23povikchadmed's current scripts are proof of concept, not a long term solution
09:23povikthat's understood
09:23chadmedideally for the long term, WP/PW would just automatically check some standardised directory structure for DSPs matching some standardised naming scheme, much like linux-firmware, without the need for having to ship lua scripts on a per device basis
09:24DmitrySharshakov[m]povik: Precisely this. DSP configs can then be shipped in generic distro packages without problems of them working where they shouldn't
09:24chadmedwhich is why my script installs the DSP to /usr/share/pipewire/devices/apple/*, to demonstrate how such a directory structure might look. the actual config fragment is just to mask the fact that PW cannot yet do this automatically without user intervention
09:25DmitrySharshakov[m]chadmed: Yes, so how are `macaudio` ALSA devices labeled currently
09:25pjakobsson has joined #asahi-dev
09:25chadmedthe driver exposes a human readable device name to the userspace api
09:28Ry_Darcy has left #asahi-dev [#asahi-dev]
09:28DmitrySharshakov[m]chadmed: Well, yes. I'm implementing a core WirePlumber logic and then a formatted config file is placed into `/usr/share/wireplumber/dsp.d/apple/j314x.lua` as a file containing a call to a function like `registerDSP({...filter-chain props...}, { "node.nick", "=", "J314" }) (which catches the device name from ALSA), and maybe some more configs like whether or not Pro Audio mode should be enabled.
09:31DmitrySharshakov[m]Also that custom config might (later, when I do design this) provide a function which takes 2 numbers and returns 6 of them to implement volume passthrough. So if user sets volume to the virtual sink, WirePlumber receives the evant, it's passed to a configured function which tells us how is L/R volume mapped to all of the 6 channels configured and then sent to ALSA node for the driver to feed volume into hardware, which should be
09:31DmitrySharshakov[m]beneficial compared to software sound attenuation or earlier stages
09:31uniq has joined #asahi-dev
09:32DmitrySharshakov[m]<chadmed> "the driver exposes a human..." <- Thanks, that means we can find the node by an object manager interest with a constraint like `Constraint { "node.nick", "=", "J314" }`! That's great
09:42surge9n has joined #asahi-dev
09:47uniq has quit [Quit: Textual IRC Client: www.textualapp.com]
10:25pjakobsson has quit [Ping timeout: 480 seconds]
11:09povikwith the volume passthrough, i think you need to map to volume to particular controls by name, not to the 6 channels
11:10povikbecause there's no implicit association of the controls to channels that alsa would provide
11:11povikso you have a bag of controls, then a 6-channel pcm device
11:11povikand the relation between the two comes from hardware-specific userspace configuration
11:12poviks/to map to/to map the/
11:12DmitrySharshakov[m]povik: Hmm, I mean passing it to ALSA node in PipeWire
11:12DmitrySharshakov[m]AFAIK in case of current macaudio setup it's a Pro Audio with 6 channels
11:13DmitrySharshakov[m]WirePlumber never works with ALSA libraries, so I'm talking about PipeWire abstraction of hardware volume. However I might need to dig deeper
11:17DmitrySharshakov[m]Today I might be ready with sort of `dsp-monitor` which discovers nodes that require DSP and applies rules. Also that'd be the start for the config file structure and format
11:17DmitrySharshakov[m]Volume optimization stuff will come later as it's even less noticeable for users (if noticeable at all). I only have some assumptions that efficiency, dynamic range and quality might have some improvements when volume changes are being sent to the amp hardware. So, for now task #1 for me is to do convenience + config things and only after that experiment with HW volume
11:19povikright, sounds good to me
11:19povikso it's at another abstraction layer that the mapping to hw controls happens
11:19povikyou just supply the piece at your layer
11:21josh has joined #asahi-dev
11:21josh has quit []
11:22josh has joined #asahi-dev
11:22josh is now known as josh02
11:23benpoulson has joined #asahi-dev
11:26josh02 has quit []
11:31josh has joined #asahi-dev
11:33josh has quit []
11:48pjakobsson has joined #asahi-dev
11:56Ry_Darcy_ has joined #asahi-dev
12:19tdsrts^ has joined #asahi-dev
12:38josh has joined #asahi-dev
12:41josh has quit []
13:39dmmcf has joined #asahi-dev
13:42Chainfire has joined #asahi-dev
13:44tdsrts^ has quit [Ping timeout: 480 seconds]
13:58dmmcf has quit [Ping timeout: 480 seconds]
13:58cynthia has quit [Remote host closed the connection]
13:58cynthia has joined #asahi-dev
14:18dmmcf has joined #asahi-dev
14:27isoriano has joined #asahi-dev
14:50isoriano has quit [Remote host closed the connection]
14:52dmmcf has quit [Ping timeout: 480 seconds]
14:55amarioguy has joined #asahi-dev
15:02isoriano has joined #asahi-dev
15:03amarioguybtw a bit confused on something, since i'm placing the completion in the smbus struct how would i be able to complete the action inside the irq handler (i'm not sure if i can pass the smbus struct to the irq handler)
15:12svenyou can
15:13svenyou pass a void pointer when you request the irq and that one will be passed along to your irq handler
15:19amarioguyah perfect
15:27Race has quit [Ping timeout: 480 seconds]
15:54MajorBiscuit has joined #asahi-dev
15:56Major_Biscuit has quit [Ping timeout: 480 seconds]
16:27MajorBiscuit has quit [Ping timeout: 480 seconds]
16:33bisko has joined #asahi-dev
16:48benpouls_ has joined #asahi-dev
16:54benpoulson has quit [Ping timeout: 480 seconds]
17:09benpouls_ is now known as benpoulson
17:25c10l has quit [Quit: Bye o/]
17:26c10l has joined #asahi-dev
18:36Michael[m]123 has joined #asahi-dev
19:04Votes78 has quit [Killed (NickServ (Too many failed password attempts.))]
19:05Votes78 has joined #asahi-dev
19:19isoriano has quit [Quit: Leaving]
19:20isoriano has joined #asahi-dev
19:20isoriano has quit []
19:20ckb has joined #asahi-dev
19:31isoriano has joined #asahi-dev
19:31MajorBiscuit has joined #asahi-dev
19:32thinkalex[m] has joined #asahi-dev
19:36ckb has quit [Quit: leaving]
19:43ckb has joined #asahi-dev
19:50pi2 has quit [Remote host closed the connection]
19:51pi2 has joined #asahi-dev
20:02isoriano has quit [Quit: Leaving]
20:03ckb has quit [Quit: leaving]
20:04ckb has joined #asahi-dev
20:05isoriano has joined #asahi-dev
20:20isoriano has quit [Quit: Leaving]
20:23isoriano has joined #asahi-dev
20:33isoriano has quit [Quit: Leaving]
20:35isoriano has joined #asahi-dev
20:39isoriano has quit []
20:41isoriano has joined #asahi-dev
21:02isoriano has quit [Quit: Leaving]
21:03isoriano has joined #asahi-dev
21:31clararussell[m] has joined #asahi-dev
21:38isoriano has quit [Remote host closed the connection]
21:45isoriano has joined #asahi-dev
21:45MajorBiscuit has quit [Ping timeout: 480 seconds]
21:53carlosstive[m] has joined #asahi-dev
21:54isoriano has quit [Quit: Leaving]
21:58kazukih[m] has joined #asahi-dev
21:59isoriano has joined #asahi-dev
22:07isoriano has quit [Quit: Leaving]
22:10isoriano has joined #asahi-dev
22:18surge9n has quit [Ping timeout: 480 seconds]
22:20isoriano has quit [Remote host closed the connection]
22:23isoriano has joined #asahi-dev
22:32isoriano has quit [Remote host closed the connection]
22:33isoriano has joined #asahi-dev
22:36Race has joined #asahi-dev
22:43isoriano has quit [Remote host closed the connection]
22:45surge9n has joined #asahi-dev
22:46RoelAlejandroPerezCandanoza[m] has joined #asahi-dev
22:47isoriano has joined #asahi-dev
22:53surge9n has quit [Ping timeout: 480 seconds]
22:57isoriano has quit [Quit: Leaving]
22:57Donaldbtc[m] has joined #asahi-dev
23:16hutchinson70[m] has joined #asahi-dev
23:17surge9n has joined #asahi-dev
23:25surge9n has quit [Ping timeout: 480 seconds]
23:35ptrc has quit [Remote host closed the connection]
23:36ptrc has joined #asahi-dev
23:51surge9n has joined #asahi-dev
23:51Donaldbtc[m] has quit [autokilled: This host violated network policy. Mail support@oftc.net if you feel this is in error. (2022-08-16 23:51:39)]
23:53psykose has left #asahi-dev [#asahi-dev]
23:59surge9n has quit [Ping timeout: 480 seconds]
…