#
#asahi-dev · 2022-12-02 06:01
marcan...which doesn't mean it's a free-for-all for packaging unstable software
#asahi-dev · 2022-12-02 06:01
ashichadmed: which are unsupported
#asahi-dev · 2022-12-02 06:01
chadmed#asahi-alt is for discussing non-reference distributions
#asahi-dev · 2022-12-02 06:00
ashimarcan: If it is discouraged to use "random" branchen, then indeed you should make things private. It is totally clear that no one here should expect anything to work, but I thought #asahi-alt is all unsupported anyway, so we can tinker like we want including pointing people to what we did to make things work.
#asahi-dev · 2022-12-02 06:00
chadmedah wait no theyre 16 bit pcm samples right
#asahi-dev · 2022-12-02 06:00
chadmedtas2764 page 28
#asahi-dev · 2022-12-02 05:59
tpw_rules(of which pdf)
#asahi-dev · 2022-12-02 05:59
tpw_ruleswhich page?
#asahi-dev · 2022-12-02 05:59
chadmedthe datasheet literally says theyre 16-bit floats
#asahi-dev · 2022-12-02 05:58
tpw_ruleschadmed: got nerd sniped again and i really cannot see how those v/isense values would be floats. they will just be counts relative to the full scale in the datasheet
#asahi-dev · 2022-12-02 05:56
chadmedspeaker DRM :P
#asahi-dev · 2022-12-02 05:55
marcan(of some opaque value)
#asahi-dev · 2022-12-02 05:55
marcancould just be a mixer control write
#asahi-dev · 2022-12-02 05:55
marcan(so no other app can trigger it)
#asahi-dev · 2022-12-02 05:55
marcanso it doesn't have to be anything complicated, just something explicit
#asahi-dev · 2022-12-02 05:55
marcanthe only security required is that regular users should not be able to blow up the speakers, and that it should never happen "by accident"
#asahi-dev · 2022-12-02 05:55
marcanit's about the handshake, and yes root
#asahi-dev · 2022-12-02 05:54
dsharshakovYes, marcan's idea is very nice, kernel has no problem finding idle streams. However, I want to better know how would you trust a process? Probably it just has to be root, know the handshake and boost volume only after opening the VISENSE pcm
#asahi-dev · 2022-12-02 05:54
chadmedit should be fine if theyre on their own pcm, i had issues earlier this week trying to open the speaker pcm while pipewire had it open at the same time
#asahi-dev · 2022-12-02 05:53
chadmedyeah
#asahi-dev · 2022-12-02 05:53
marcanv/i separately is not enough to calculate power because you don't know the power factor
#asahi-dev · 2022-12-02 05:52
marcanyou actually multiply v*i sample-wise
#asahi-dev · 2022-12-02 05:52
marcanah yeah, that makes no sense, it's audio-rate data
#asahi-dev · 2022-12-02 05:52
chadmedyeah
#asahi-dev · 2022-12-02 05:52
chadmedright. ive modeled them as read only elems on the ctl interface but that probably doesnt make a lot of sense. shouldnt be too hard to change if we have a dedicated pcm to open
#asahi-dev · 2022-12-02 05:52
marcansince they come in the same way as input audio data as far as the hardware is concerned, I don't see much reason to reinvent that wheel
#asahi-dev · 2022-12-02 05:51
marcanprobably a dedicated PCM for that
#asahi-dev · 2022-12-02 05:51
marcanI assume so
#asahi-dev · 2022-12-02 05:50
chadmedah so V/ISENSE will be channels on a PCM?
#asahi-dev · 2022-12-02 05:49
marcanmy current idea is we want the safety capture PCM to always be available, but simply cease to deliver data when the output is idle, and the daemon should compensate for that algorithm-wise
#asahi-dev · 2022-12-02 05:48
marcanthere will be a keepalive of some sort, though that keepalive may be implicit in "is actively reading the PCM data". I need to see how that would work, and also how it will all work when the TX side PCM is closed or idle
#asahi-dev · 2022-12-02 05:48
chadmedawesome
#asahi-dev · 2022-12-02 05:48
marcanyes
#asahi-dev · 2022-12-02 05:48
chadmedoh okay, so as long as the process dies and does nothing else to the CTL interface the kernel will handle the rest?
#asahi-dev · 2022-12-02 05:48
marcan(yes this will require core ALSA changes, we'll bikeshed it I'm sure, but I will not ship a solution that does not have that level of safety in some form)
#asahi-dev · 2022-12-02 05:47
marcanyou should not need to implement any emergency measures in userspace
#asahi-dev · 2022-12-02 05:47
marcanI absolutely want this to have things like only allowing a trusted/special process to raise levels above the max and resetting when that fd is closed or when a keepalive fails
#asahi-dev · 2022-12-02 05:47
marcanchadmed: don't bother with panic hooks, all that will be handled in the kernel
#asahi-dev · 2022-12-02 05:46
chadmedgnight!
#asahi-dev · 2022-12-02 05:46
tpw_rulesman i am awful at words tonight. probably a sign it's way past my bedtime. good luck and bye
#asahi-dev · 2022-12-02 05:45
tpw_rulesfp-safe*
#asahi-dev · 2022-12-02 05:45
tpw_rulesi recognize actually activating fp mode in the kernel is a path to sadness
#asahi-dev · 2022-12-02 05:44
tpw_rulessorry i meant to write driver there
#asahi-dev · 2022-12-02 05:44
tpw_rulesor even 32
#asahi-dev · 2022-12-02 05:44
chadmedV/ISENSE are lines hooked up to the amp output. ISENSE is a shunt resistor and VSENSE just measures the voltage across the voice coil
#asahi-dev · 2022-12-02 05:44
tpw_rulesand i mean 16 bit float for this purpose can surely be done as 64 bit fixed point integers to an acceptable level of accuracy
#asahi-dev · 2022-12-02 05:43
tpw_rulesdoes it get feedback from the speakers?
#asahi-dev · 2022-12-02 05:43
chadmedmacos does it inside coreaudio as part of the DSP graph
#asahi-dev · 2022-12-02 05:43
chadmedunpack this and do floating point maths in the kernel?
#asahi-dev · 2022-12-02 05:43
chadmed bits as padding.

plus ›