libera/#maemo-leste/ Sunday, 2024-07-07

freemangordonarno11: is it possible to set stream reate from ucm?11:52
freemangordon*rate11:52
arno11freemangordon: not possible imo13:32
freemangordonarno11: ani idea why I cannot select device 1 from UCM?13:36
freemangordon*any13:36
freemangordonsee https://pastebin.com/cbSu2Vcx13:36
arno11ok let me check13:36
freemangordonbut when I set PlaybackPCM "hw:${CardId},1" in UCM, I get "[pulseaudio] (alsa-lib)conf.c: Unknown parameter 1"13:37
freemangordonmaybe I don;t understand what it is about13:37
freemangordonwhen it is 0, it sets on cpcap-hifi-013:38
freemangordonbut I want to set on cpcap-voice-113:38
arno11ok, need few min13:40
freemangordonok13:40
freemangordonLMK if you need more info13:41
arno11(it is so different from n900, i need to check mapphone ucm)13:41
arno11ok13:41
freemangordonok13:42
freemangordonI want VoiceCall.conf to refer to device 1, not device 013:42
freemangordonmaybe not possible, as it sets controls, dunno13:42
freemangordonbut, something sets rate to 8000 during call13:43
freemangordonI am not able to identify who13:43
arno11so for voicecall.conf, indeed it uses card 0. must be PlaybackPCM "hw:${CardId},1" in each SectionDevice13:47
arno11to use card113:47
freemangordonno, it uses card 113:47
freemangordon,0 is device13:47
freemangordonso, it uses card 1,013:48
freemangordonwhich is hifi13:48
freemangordonbut I want to use 1,113:48
freemangordonwhich is voice13:48
freemangordoncard 0 is HDMI13:48
arno11ah yes i forgot that (Wizzup already told me...)13:49
arno11so really don't know atm13:50
freemangordonok13:50
arno11let me few min again13:50
arno11looking @mappphone ucm again, you should try hw:${CardId},1 imo13:56
freemangordonI did13:56
freemangordon"but when I set PlaybackPCM "hw:${CardId},1" in UCM, I get "[pulseaudio] (alsa-lib)conf.c: Unknown parameter 1""13:57
arno11ah yes sorry, ok13:57
arno11(just need time to understand mapphone stuff :P)13:57
arno11btw the noise in earpeace is a static noise or ?13:59
freemangordonno13:59
freemangordonit changes when the other side speaks13:59
freemangordondeffinitely a wrong freq13:59
arno11ah ok13:59
arno11yep13:59
freemangordonbut I can't get kernel to set it, as I can't get alsa/pa/ucm/whatever to do anything about t14:00
freemangordonwell...14:00
arno11indeed14:00
freemangordoncpcap_voice_hw_params() (in the diver is called)14:00
freemangordonbut I don;t want to hack code there, but want everything to come through DT14:01
freemangordonnot sure it is possible though14:01
freemangordontmlind: ping14:02
tmlindfreemangordon: pong14:03
freemangordontmlind: I was able to get calls working on d4 without motmdm hack (the one that sets dai tdm etc)14:06
freemangordonby using  audio-graph-card2 and codec2codec link14:06
freemangordonso, voice dai gets properly powered up etc on call14:06
freemangordonhowever, I am not able to make kernel set proper tdm/clocl/format14:07
freemangordonso, shall I hack cpcap_voice_hw_params() to do that, by either calling asoc_simple_hw_params() or directly?14:08
freemangordonor this is not a hack, but the proper way?14:08
freemangordontmlind: ^^^14:09
arno11freemangordon: codec2codec uses 48000 rate ?14:14
tmlindfreemangordon: cool that's great news14:15
freemangordonarno11: no, but I have no idea what rate it uses14:16
freemangordonarno11: but that's irrelevant anyways14:16
freemangordontmlind: with kernel 6.6 that is, 6.1 does not support c2c links14:16
tmlindfreemangordon: so with the set_tdm whatever calls you can configure the mcbsp time divsion multiplexing, not sure what clock needs to be set to14:17
freemangordonyes, I know14:17
tmlindi recall voice calls need to change the clock to a different value from hifi and voice codecs?14:18
freemangordonyes, correct14:18
freemangordonbut the point is - shall I do that from cpcap_voice_hw_params() ?14:18
freemangordonsomehow set_tdm gets called for hifi14:19
tmlindhmm not sure how that should be handled properly.. so if a voice call needs to change the mcbsp clock, what are hifi and voice going to do?14:19
freemangordonbut not for voice14:19
tmlindhas voice registered the set_tdm callback?14:20
freemangordonyes14:20
freemangordonbut it is not called14:20
tmlindweird, maybe there's some bug that it only gets called to the first or last registered codec and not all of them?14:20
freemangordoncould be14:20
tmlindso it might be able to write the voice call codec to just do qmi call with no serial n_gsm stuff.. that is if the settings are just modem nvram value changes14:21
tmlindmight be worth diffing the nvram before and after voice call volume change for example14:22
freemangordonyeah, but I want it first working as it is, witjout the hack14:22
tmlindrigth14:22
tmlindit should not matter what the control bus is :)14:22
tmlindno idea about the codec2codec link14:23
freemangordonsee v14:24
freemangordonhttps://pastebin.com/JGEKkyrj14:24
freemangordonyeah c2c is something new14:24
freemangordonhttps://kernel.org/doc/html/latest/sound/soc/codec-to-codec.html14:24
freemangordonmore or less our use case - audio playback without CPU involved14:25
freemangordonso I made it work in terms of DAPM14:25
tmlindok cool14:25
freemangordonI can hear noise and the other side hears me more or less ok14:25
freemangordonnoise changes when the other side speaks14:26
tmlindso the old hack you're trying to fix is the voice call codec just rudely reconfiguring registers?14:26
freemangordonthe hack I am trying to fix is motmdm calling set_tdm, set_ckl etc of cpcap14:26
freemangordonwhen  call is registered14:27
tmlindok14:27
freemangordonthis https://github.com/maemo-leste/droid4-linux/blob/maemo-6.6.y/sound/soc/codecs/motmdm.c#L54814:28
freemangordonso, without dt changes, nothing happens on call14:28
freemangordonwith then  cpcap_voice_hw_params() gets called14:29
freemangordon*with them14:29
tmlindoh ok14:29
freemangordonso, basically, I want to know if I shall do like this https://github.com/maemo-leste/droid4-linux/blob/maemo-6.6.y/sound/soc/tegra/tegra_audio_graph_card.c#L16514:30
tmlindare you seeing similar voice call modem status messages also over the ttyUSB4 or ttyUSB5 whatever the at port is?14:31
freemangordonno idea14:31
freemangordonI didn't check as I am focused on making it work as is (without the hack ofc)14:31
tmlindok14:32
freemangordonI guess we'll be able to get rid of dlci alltogether14:32
freemangordonbut not now :_)14:32
freemangordon:)14:32
freemangordonso, what do you think about https://github.com/maemo-leste/droid4-linux/blob/maemo-6.6.y/sound/soc/tegra/tegra_audio_graph_card.c#L165 ?14:32
freemangordonshall we do the same?14:32
freemangordonif   asoc_simple_hw_params() is called, that would set TDM/clocks, whatever from DT14:33
freemangordonbut I don't know if this is the proper way14:33
freemangordonthus my question :)14:33
tmlindsure the more generic the easier to maintain, i just don't know enought about also to comment really14:33
tmlindmaybe there's some tdm configuration that would work for everything..14:34
freemangordonugh,   asoc_simple_hw_params() was dropped in 6.714:35
tmlindheh ok14:35
freemangordonwell, it was replaced with  simple_util_hw_params14:35
freemangordonwhich I guess does the same14:35
freemangordonyeah, they just renamed it14:36
freemangordonok, I'll do that14:37
freemangordonwill ping you when I'm ready to see if you like it :)14:37
tmlindok yeah i'll check the irc every few days at least14:38
freemangordonthanks!14:38
tmlindthank you14:40
arno11Wizzup: i built drnoksnes a bit differently to avoid the buggy additional deps. it works fine from HAM :) (only for armhf and no gui atm)15:20
arno11works ootb using '/usr/bin/drnoksnes -c /usr/games/drnoksnes.conf /game_path'15:23
arno11fullscreen works (4:3)15:24
arno11Ctl+Shift+N for compo OFF and 'f' for fullscreen15:29
Wizzupgreat, back in a few ours15:35
Wizzupphoenix is back, leste is back, will fix build vm today19:41
freemangordonWizzup: not that great, as I still can't make it work properly, but yeah, some progress22:43
freemangordonplease, when you have some spare time, try to understand https://elixir.bootlin.com/linux/v6.10-rc6/source/sound/soc/generic/audio-graph-card2-custom-sample.dtsi#L11322:44
Wizzupok, probably another day or two out :)22:52
Wizzupat leas tmost infra is back22:52

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!