2022-03-08
00:01skoobasteeve_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
00:01skoobasteeve has joined #asahi-dev
00:02jnn is now known as jn
00:03skoobasteeve has quit []
00:04skoobasteeve has joined #asahi-dev
00:24chadmedpovik: do you know how apple handles crossover frequencies and EQing of the speaker arrays in these machines? is it DSP in CoreAudio or is there some magic sauce somewhere at a lower level?
00:24bisko has quit [Read error: Connection reset by peer]
00:59user982492 has joined #asahi-dev
01:07jnn has joined #asahi-dev
01:10jn has quit [Ping timeout: 480 seconds]
03:27PhilippvK has joined #asahi-dev
03:30phiologe has quit [Ping timeout: 480 seconds]
03:46kov has quit [Quit: Coyote finally caught me]
03:46kov has joined #asahi-dev
03:48amw has joined #asahi-dev
05:21marcan< kettenis> what I would like to do in OpenBSD is have a single stereo sample stream and be able for the amplifier codecs to pick the right channel out of that stream
05:22marcanwe could do that as a stopgap if the hardware can do it, but it definitely wouldn't be the long-term solution
05:31chadmedit would be nice to expose those things to userland. i find the j314s speakers just a teeny bit too boomy under whatever macos does so id like to drop out 100-200hz and 4k-6k a little bit to clear them up
05:39marcanprobably in ALSA, done with profiles in such a way that downstream software just sees it as a stereo device
05:39marcanideally it should be transparent to PA/JACK/whatever you put in front, though of course nothing stops you from bypassing it and hitting the hardware directly, or writing your own custom profile
05:48shenki has quit [Quit: leaving]
05:48marcanwe can have e.g. card/device profiles that insert a filter to generate the streams for the individual speakers
05:51marcanchances are with that and existing ALSA infra we can make all this work without too much fuss
05:51marcanas far as the kernel goes, its only job is to provide a multichannel output device with one channel per speaker
05:53chadmedmy one thing was just that you cant guarantee itll be present on whatever distro a user picks, but that doesnt really matter too much imo. we could just put a "hey if you want your speakers to not sound crap, install this plugin" line on the wiki somewhere. plus whatever we choose to do will ship with Asahi
05:53gladiac has joined #asahi-dev
05:54marcanbut the core distro-agnostic things we can do are 1) getting the kernel/DT stuff done, 2) try to upstream such an EQ plugin so distros pick it up, and 3) upstream the profiles/impulses
05:54marcanalternatively, provide a packageable repo with 3) and distros can package 2) and have it depend on that
05:54user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:56marcanin the end there is always going to be some level of tweaks that distros will have to do to make things smooth on these (or any) machines; our job is to make that *possible* and relatively painless, not magically happen for every distro :-)
05:56user982492 has joined #asahi-dev
05:57marcanpovik: what's the DT situation, btw? think we can ship something forward-looking for speaker support on most of the laptops at least, even if the kernel is in flux?
05:58marcaneither way today I'm going to work on the installer again, I want to add an "upgrade my m1n1/u-boot" option so users can at least do that easily in the future
06:00marcanI'm also getting the feeling working on chainloading sooner than I intended might be a good idea; punt on the signatures for now (not like ALARM does secureboot anyway yet), if I can just have it chainload from FAT that's already a big win
06:01marcanI really like the idea that our first release will let us improve hardware support with only a `pacman -Syu`
06:04chadmeditll be a necessity for end users at some point regardless i think. all the messages kmutil throws at you about it being able to blow your computer up and irradiate your house are scary
06:17marcanwas just thinking of doing it later originally but.... eh, it's going to help me get a release out by agonizing less about what makes the first cut
07:44povikmarcan: we can ship something forward-looking but not 100% guaranteed it won't need to change
07:46poviki have worked my way to a custom compatible on the sound node: https://github.com/povik/linux/blob/asahi-sound-wip/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi#L266
07:47povikalso the MCA binding changed when i added proper power domain support (needs audio_p also passed in)
07:55povik has quit [Read error: Connection reset by peer]
07:55povik has joined #asahi-dev
07:56chadmedif UCM needs to match the model string, i would just add the actual model ID, so like "MacBook Pro J314/6 Integrated Audio"
07:58tanty has quit []
07:58poviki am inclided to ship all of the new audio stuff. in the evening if i find time i should do a pass over it, get in shape and let people test it
08:00chadmedUCM uses the card name as referenced by aplay -l, so on OF platforms that should be the model string. spaces are replaced with hyphens
08:00kettenisanyway, I think sending a 4-channel (or even 6-channel) stream down to MCA should be fine as well in cases where a software equalizer is preferred
08:04poviki see there's some DC-blocking filter at least on the tas2764 (which i reference for speakers on j314)
08:18clrwf0x80 has joined #asahi-dev
08:35the_lanetly_052__ has joined #asahi-dev
08:45clrwf0x80https://github.com/AsahiLinux/asahi-installer will end up with tar czf ../installer.tar.gz .
08:51tanty has joined #asahi-dev
09:18jnn is now known as jn
09:45clrwf0x80 has quit [Remote host closed the connection]
09:58user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:09j`eyChaosPrincess: oh right, I thought it must be you, would e strange if another person did it too :P
10:10ChaosPrincessi am at the point where it reads files from disk and checks signatures
10:22subject38[m] has joined #asahi-dev
11:10chadmedpovik: ucm2 actually uses the alsa/kernel driver name from sysfs to pick a config profile, not the model string from the DT
11:15chadmedseems like ucm is able to probe the alsa driver for the actual card's name, which im guessing is what comes from the dt model string?
11:21chadmedtheres a function to register a long name for the card. the docs make reference to using it to grab DMI information on systems with intel hda, but the actual function seems to just take a pointer to a char, so we could just feed snd_soc_of_parse_card_name to it and see if that works i guess
11:21chadmedthe docs say it specifically exists to let UCM differentiate between devices that all use the same driver
11:22chadmedhttps://www.kernel.org/doc/html/v4.15/sound/kernel-api/alsa-driver-api.html#c.snd_soc_set_dmi_name
11:23povik> In computing, Direct Media Interface (DMI) is Intel's proprietary link between the northbridge and southbridge on a computer motherboard.
11:24poviki can't believe intel got their own function like that, instead of some generic approach to this very generic problem
11:26chadmedthe first argument to the function is the pointer to snd_soc_card so i guess it just attaches itself to the device in the driver
11:27povikPossible card long names may be: DellInc.-XPS139343-01-0310JH ASUSTeKCOMPUTERINC.-T100TA-1.0-T100TA Circuitco-MinnowboardMaxD0PLATFORM-D0-MinnowBoardMAX
11:28kettenisgiven the software development quality control in the PC world, the DMI model should be seen as a random string that might bear a relationship to the actual hardware you're running on ;)
11:29kettenisI currently disable the SMBIOS support in U-Boot since it assumes there is memory below the 4GB mark
11:29povikargh, i have been putting off writing ucm configuration, now it seems we might even need to touch ucm code
11:30chadmedhttps://git.alsa-project.org/?p=alsa-ucm-conf.git;a=blob;f=ucm2/ucm.conf here is how ucm gets its card names
11:31chadmedyeah so im saying that if it turns out the dmi name function behaves as we think it does, all we need to do is name the ucm config file the same thing as the model string in the dt
11:33chadmedwell i guess the "proper" way they want you to do it is have a separate ASoC driver for each device. this dmi name function seems to have been added as a hack to get around that in the first place
11:35chadmedhttps://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm__conf.html <- this just refers to it as the "original ucm card name"
11:36povikwhat about having an driver-specific configuration file, which then looks up a model-specific file based on ${CardName} ?
13:13King_InuYasha has joined #asahi-dev
13:29WindowPain has joined #asahi-dev
13:38yuyichao has quit [Ping timeout: 480 seconds]
13:44riker77 has quit [Ping timeout: 480 seconds]
13:49riker77 has joined #asahi-dev
14:04yuyichao has joined #asahi-dev
14:15mazmarcan: perf stuff now queued. feel free to also merge my irq/aic-pmu branch in your tree if you need to resolve conflicts.
14:22klaus has joined #asahi-dev
14:45amarioguy has joined #asahi-dev
14:59amarioguy has quit [Ping timeout: 480 seconds]
15:00amarioguy has joined #asahi-dev
15:20Gaelan_ is now known as Gaelan
16:41amarioguy has quit [Ping timeout: 480 seconds]
17:07marcanmaz: cool, think AICv2 can go in if I respin it tomorrow? (just changing that reg entry thing)
17:08mazmarcan: ideally, I'd like an ack from robher on the binding. if he can rubber stamp that, I'll take the series in.
18:47___nick___ has joined #asahi-dev
18:48___nick___ has quit []
18:49___nick___ has joined #asahi-dev
18:51Method has quit [Quit: ZNC 1.8.2+deb1+bionic2 - https://znc.in]
18:51Method has joined #asahi-dev
19:08the_lanetly_052__ has quit [Ping timeout: 480 seconds]
19:48yuyichao_ has joined #asahi-dev
19:52yuyichao has quit [Ping timeout: 480 seconds]
20:10user982492 has joined #asahi-dev
20:12gladiac has quit [Quit: k thx bye]
20:21povikat first i thought it would be too involved because ASoC doesn't let the machine driver selectively disable codecs
20:40ketteniswhat happens if you send the same sample stream to all three speakers for a single stereo channel?
21:03povikkettenis: i played around with it for a bit (by overlapping the TDM slots as you would probably do)
21:08user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:25kettenisI've parked the audio driver stuff for OpenBSD for now since I've been working on getting the m1 pro/max working and improving the OpenBSD installer a bit
22:08user982492 has joined #asahi-dev
22:25will[m]12 has joined #asahi-dev
22:30will1[m] has joined #asahi-dev
22:37user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:51alyssa has joined #asahi-dev
22:58crabbedhaloablut has quit []
22:58crabbedhaloablut has joined #asahi-dev
23:00crabbedhaloablut has quit []
23:00crabbedhaloablut has joined #asahi-dev
23:01yuyichao_ has quit [Ping timeout: 480 seconds]
23:20yuyichao_ has joined #asahi-dev
23:25amarioguy has joined #asahi-dev
23:25user982492 has joined #asahi-dev
23:37amarioguy has quit [Ping timeout: 480 seconds]
23:51amarioguy has joined #asahi-dev