#
#asahi-dev · 2023-04-16 15:03
povikright
#asahi-dev · 2023-04-16 15:03
marcanI won't claim to know what the "right" thing is here but that's what's happening right now
#asahi-dev · 2023-04-16 15:03
marcanso clearly hw_free alone isn't going to work unless we add an explicit mute path in there
#asahi-dev · 2023-04-16 15:02
marcanhw_free is getting called from the ioctl path, while the mute and later shutdown are getting called from the device close path
#asahi-dev · 2023-04-16 15:01
povikerr, i though you wrote hw_params
#asahi-dev · 2023-04-16 15:01
marcanwell it is calling it after prepare :p
#asahi-dev · 2023-04-16 15:01
marcanso if you want to do it that way the codec drivers would have to mute on hw_free too (I think some do)
#asahi-dev · 2023-04-16 15:01
poviknot after prepare
#asahi-dev · 2023-04-16 15:01
marcanhw_free is an ioctl that userspace can send at any time AIUI, and which does not trigger a mute
#asahi-dev · 2023-04-16 15:00
povikthough maybe pmdown_time messes up the ordering
#asahi-dev · 2023-04-16 15:00
povikthat would still mean it's ok to turn off the clock there since hw_params happens *before* prepare
#asahi-dev · 2023-04-16 15:00
marcanhttps://mrcn.st/p/qAy7Uwdw one of the logs
#asahi-dev · 2023-04-16 14:59
povik16:55 <@marcan> hw_free is symmetrical to hw_params AIUI
#asahi-dev · 2023-04-16 14:59
povikah, you are probably right
#asahi-dev · 2023-04-16 14:59
povik16:55 <@marcan> shutdown is called when the device is closed
#asahi-dev · 2023-04-16 14:55
marcanhw_free is symmetrical to hw_params AIUI
#asahi-dev · 2023-04-16 14:55
marcanshutdown is called when the device is closed
#asahi-dev · 2023-04-16 14:55
marcanpovik: I added WARN_ON(1) to get stack traces and printks to log what is happening
#asahi-dev · 2023-04-16 14:49
povikunless the driver is unloaded
#asahi-dev · 2023-04-16 14:48
povik* not sure 'shutdown' is ever called, usually
#asahi-dev · 2023-04-16 14:48
povikalso i am not sure
#asahi-dev · 2023-04-16 14:48
povikso that the way it was makes sense
#asahi-dev · 2023-04-16 14:48
poviki thought hw_free is symmetrical to prepare, where we turn on the clocks
#asahi-dev · 2023-04-16 14:48
povikmarcan: how did you check hw_free indeed happens before the mute?
#asahi-dev · 2023-04-16 14:47
povikugh. tweaking asoc ordering...
#asahi-dev · 2023-04-16 13:07
jannauI don't think so. iirc the product ids are unique even if the vendor id would matches across different busses
#asahi-dev · 2023-04-16 13:05
marcanspi though, I think that would get matched already?
#asahi-dev · 2023-04-16 13:04
marcanso yeah, I guess this doesn't block dockchannel
#asahi-dev · 2023-04-16 13:04
marcanif it's just the default keyboard it's fine, it won't match the apple one nor do Fn emu
#asahi-dev · 2023-04-16 13:01
jannauyes, it should be handled by the default HID keyboard support
#asahi-dev · 2023-04-16 13:00
marcanOTOH I could just upstream the keyboard stuff with the no Fn emulation idea to begin with, even if we still carry downstream patches to add emulation until the xkb stuff is ready
#asahi-dev · 2023-04-16 12:59
marcanif we add this driver, I think the keyboard will work to some extent even without other patches, and then we might end up in trouble
#asahi-dev · 2023-04-16 12:59
marcanbecause right now the keyboards don't work *at all*, which means doing whatever I want with Fn is not a regression
#asahi-dev · 2023-04-16 12:59
marcanand yeah, I need to clean up the shutdown path and submit this to linux, *however*, I'm partially slacking on that on purpose so we can figure out the Fn key story
#asahi-dev · 2023-04-16 12:58
marcannah, we're still good for the size, as long as they don't double it
#asahi-dev · 2023-04-16 12:56
kettenisbut that is best done once we have bindings
#asahi-dev · 2023-04-16 12:56
ketteniswe still have to get the mtp stuff in u-boot upstream at some point...
#asahi-dev · 2023-04-16 12:56
marcanthey did increase the init message lengths though, I hope we aren't going to overflow the fifo with our trick for that...
#asahi-dev · 2023-04-16 12:55
kettenisheh
#asahi-dev · 2023-04-16 12:55
marcanwe don't even parse that stuff in u-boot
#asahi-dev · 2023-04-16 12:55
marcanoh actually, don't need to
#asahi-dev · 2023-04-16 12:54
marcanI can do that one
#asahi-dev · 2023-04-16 12:54
marcanalso I guess I should fix mtp there too
#asahi-dev · 2023-04-16 12:53
marcan(the GPU sign-extends so it needs the high bit)
#asahi-dev · 2023-04-16 12:53
marcanoh yeah, APPLE_RTKIT_BUFFER_REQUEST_IOVA should be 43, 0 (you don't care, only the GPU cares about those high bits, but just out of technicality)
#asahi-dev · 2023-04-16 12:52
marcanthey already had 44 bits, which is enough for current machines with up to 42-bit address space everywhere
#asahi-dev · 2023-04-16 12:52
marcanyeah, it's weird...
#asahi-dev · 2023-04-16 12:52
kettenisand then decided it wasn't enough and made more space by shifting the address
#asahi-dev · 2023-04-16 12:52
kettenismarcan: strange though it's like they made more space for the address
#asahi-dev · 2023-04-16 12:49
marcanit's like the other buffer requests except the field defs are different and the address is in 4K pages

plus ›