libera/#maemo-leste/ Friday, 2022-11-11

freemangordonsicelo: where, I cannot remember who had issues, but I remember it was related with kernel size07:08
freemangordonfrom a brief look at the config:07:14
freemangordonCONFIG_REMOTEPROC=y07:14
freemangordonCONFIG_EXTCON=y07:14
freemangordonalso, I don;t see why all FS types are built-in, the same for IP stuff07:17
freemangordonalso, there are various trace/debug options that can (and I think should) be disabled07:17
freemangordonuvos__: see a9081a008f84819ab2f3da596bf89afa16beea9408:20
uvos__hmm?08:21
uvos__just waking up08:21
freemangordonwell, look at the commit while having your coffee :)08:22
freemangordonin regards to usb charging08:22
uvos__kernel commit i assume08:22
freemangordonsure]08:22
freemangordonthis one as well 7d21114dc6a2d53babef43a84a8d8db2905d283d08:23
freemangordonwhat I am trying to say is:08:23
freemangordonwe have to create extcon device that recognizes usb host/charger being attached and calls  extcon_set_state_sync()08:26
freemangordonand then register phy notifier in cpcap_charger08:26
freemangordonand all will start working, IIUC08:26
freemangordonI really need tmlind or sre to confirm that08:27
tmlindfreemangordon: are you trying to configure charger negotiation?08:30
uvos__yes he is08:31
tmlindok08:31
uvos__freemangordon: yeah thats what it sounds like08:31
uvos__configure/implement08:31
freemangordontmlind: but, what I don't understand is, which phy shall cpcap_charger register notifier to? mausb-hdrc or mapphone?08:33
tmlindi think drivers/usb/phy is the legacy framework, we're using driver/phy.. not sure if they work together08:33
tmlindfreemangordon: phy-cpcap-usb driver is the one for the micro-b usb port08:34
freemangordonseems like, I had to comment the check in musb_gadget_vbus_draw() so usb_phy_set_power() to be called08:34
freemangordontmlind: I understand that, but gadget drivers bind to musb driver, no?08:34
tmlindyeah08:34
freemangordonso the call usb_phy_set_power() on musb phy08:34
freemangordonso, cpcap-charger shall register to musb, not to phy-cpcap-usb08:35
freemangordonto receive notifications for usb_phy_set_power() calls, no?08:35
tmlindmaybe grep first if drivers/usb/phy is still supposed to be used though08:36
freemangordonumm, in 5.18 it is08:36
tmlindso how does it interact with drivers/phy?08:36
freemangordoncpcap_usb_try_musb_mailbox() ;)08:37
tmlindthat's old legacy stuff too..08:37
freemangordonthis is what we have08:38
freemangordonunless this was changed in 6.x08:38
tmlindright, but not sure we should start mixing in anything from the old drivers/usb/phy08:38
freemangordonwhat I propose doe not really depend on that08:38
tmlindoh ok08:39
freemangordonextcon support is provided by the FW, see 7d21114dc6a2d53babef43a84a8d8db2905d283d08:39
tmlindi don't think extcon is needed either.. we already use iio framework08:40
freemangordonit is, for charger detection08:40
freemangordonat least that's what I understood08:40
freemangordonthe other option is to have   charger_detect phy callback08:41
uvos__if tmlind knows one looking at a some other power subsystem driver that supports negotiation might help08:41
tmlindmy gut feeling is that we should be able to do this nowadays with just drivers/phy and iio.. but maybe extcon is still needed08:41
uvos__negotation/geting power limit from a usb framework08:41
tmlindgadgetfs configures the usb-b power limit for the device08:42
freemangordonuvos__: well, I grepped all over the place, the only one that uses it is wm831x_power.c08:42
uvos__freemangordon: hard to belive that support is not widespread08:43
freemangordontmlind: yes, and gadget driver calls usb_phy_set_power()08:43
freemangordonbelieve it08:43
tmlindok08:43
uvos__freemangordon: tht kind of suggsts its not the right way to do it or?08:43
freemangordonand that in turn calls usb_phy_set_charger_current()08:43
tmlindheh seems like vbus should be just a regulator to linux :)08:44
freemangordonuvos__: see https://www.mail-archive.com/linux-usb@vger.kernel.org/msg93172.html08:44
freemangordontmlind: how is that related to USB host config in terms of gadget08:45
uvos__im also pretty shockt this was added in 2017 only..08:45
freemangordonme too08:45
freemangordonbut it is what it is08:45
freemangordonand that's why there are no users :)08:45
tmlindseems like there should be a better way nowadays :)08:45
* tmlind going offline in a few mins08:46
freemangordontmlind: ok, please, LMK what it is, and I will implement it08:46
tmlindno idea :)08:46
freemangordonheh08:46
freemangordonwhy "seems like" then?08:46
tmlindkind of wondering about the extcon part.. but maybe that's how it's supposed to look like08:47
freemangordonactually, axtcon seems fine, as it detects not only chargers, but ACA and carcit and wantever08:47
freemangordon*extcon08:47
tmlindok, maybe grep around in iio also in case there's something there nowadays08:48
freemangordonoh, typo day it seems ;)08:48
freemangordontmlind: I am grepping for the last 2 days maybe08:48
tmlindgrep harder :)08:48
uvos__is that a flag?08:48
tmlindgrep -H maybe? :)08:48
freemangordonand seems nobody cares about limiting charging current08:48
freemangordontmlind: grep what for?08:48
freemangordonsunxi are using extcon, for sure08:49
freemangordonso is palmas08:49
freemangordonetc08:49
tmlindfreemangordon: sorry just kidding, i guess there's no better solution08:49
freemangordonah, ok :)08:49
freemangordonit seems this was borrowed from android switch_something08:50
freemangordonand actually this is what d4 vendor kernel uses08:50
tmlindok08:50
uvos__no wonder usb pd is a mess, if few even manag to implement usb 2.0 power xD08:50
freemangordonpd == power distribution?08:51
* tmlind bbl later tonight08:51
freemangordonbye08:51
uvos__usb power delivery08:51
uvos__recent spec08:51
uvos__(is a)08:51
freemangordonok08:56
Wizzupwhere do you guys set a bluetooth headset as output for audio?15:59
Wizzupfreemangordon: hmm got this http://dpaste.com/C8JFKKRNA16:01
Wizzupah maybe this is done from blueman16:03
freemangordonWizzup: do you have Xorg log file as well?16:03
Wizzupargh, I just restarted the device16:05
freemangordonit should be in /home/user16:06
freemangordonit is copied from /tmo on reboot :)16:06
freemangordon*/tmp16:06
Wizzupok16:09
Wizzup>manager16:14
WizzupPair & trust your device in blueman, connect audiosink. You can close blueman now. The quality seems a bit better in 'offline mode'.16:14
Wizzupthis is frustratingly vague16:14
Wizzup"connect audiosink"16:14
Wizzupfreemangordon: http://dpaste.com/4TDQCJZWM16:16
Wizzupheadset also keeps connecting and disconnecting?16:17
* Wizzup gives up16:22
Wizzupthe wiki also does not say if i runs as root or not16:25
WizzupIf that still does not work, or you are using PulseAudio's system-wide mode, also load the following PulseAudio modules (again these can be loaded via your default.pa or system.pa):16:27
Wizzupaha...16:27
WizzupNov 11 16:32:00 localhost pulseaudio: modules/bluetooth/bluez5-util.c:1052:get_managed_objects_reply:GetManagedObjects() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.73" (uid=111 pid=2343 comm="/usr/bin/pulseaudio --fail=1 --daemonize=1 --syste") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error16:32
Wizzupname="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=2962 comm="/usr/sbin/bluetoothd ")16:33
Wizzuphum16:33
freemangordonWizzup: could you enable debug of omap xorg driver?16:39
Wizzupfreemangordon: how a quick howto?16:44
Wizzupwow the leste wiki made bluetooth look so easy :)16:44
* Wizzup gives up for now for real16:44
freemangordonWizzup: /usr/share/X11/xorg.conf.d/99-omap.conf16:46
freemangordon"Device" section16:46
freemangordonOption          "Debug"         "true"16:46
Wizzuphm now I see it (the hp)16:47
Wizzupfreemangordon: ok, will do16:47
Wizzupbtw, ofono also lacks bt privs it seems16:48
Wizzupfwiw I did modify /etc/dbus-1/system.d/bluetooth.conf to allow pa to query for devices16:51
freemangordonok, this usb phy notifier thing seems like a total mess17:29
freemangordoneveryone seems to call  atomic_notifier_call_chain() with absolutely unrelated parameters17:30
freemangordonomap musb code calls this https://elixir.bootlin.com/linux/v6.1-rc4/source/drivers/usb/musb/omap2430.c#L15517:34
freemangordonbut usb phy charger code calls this: https://elixir.bootlin.com/linux/v6.1-rc4/source/drivers/usb/phy/phy.c#L13217:35
freemangordonOTOH, phy-ab8500-usb calls it like https://elixir.bootlin.com/linux/v6.1-rc4/source/drivers/usb/phy/phy-ab8500-usb.c#L39217:36
freemangordontmlind: ^^^ !?!17:37
_uvos_Wizzup: i dident have to anything special to get bt  audio to work on d417:42
_uvos_on mapphones bt call audio cant possibly work17:42
sicelowhy17:45
_uvos_well on mapphones bt call audio works by haveing cpcap switch around the connections so that the bt chip is directly connected to the modem17:50
_uvos_so you have to somehow configure the bt chip or modem so that the dais line up17:51
_uvos_and i have no idea how thats suposed to work17:51
Wizzupuvos: weird, I had to do various things to make it work18:11
Wizzupuvos: maybe you run something as root instead of as user or something?18:12
Wizzupper the dbus bluetooth rules pulseaudio is clearly not allowed to talk to it18:12
Wizzupit only allows services with the group bluetooth18:12
Wizzupwhich even our 'user' is not, currently18:12
Wizzupuvos: bionic just reset, with wifi connected (and bt on)20:13
Wizzupuvos: buzz: have you seen ofono go crazy when bt headset is connected?21:06
Wizzupit just calls poll forever21:07
buZzi havent tried a bt headset yet!21:07
buZzonly BT speakers21:07
Wizzupwait, what -did- you try?21:07
buZzjust eh , plain 'boomboxes' like the kids have nowadays :P21:07
buZzand a bt headphone , which is just the same as a speaker for BT21:08
buZznot a microphone having headset21:08
Wizzupyeah21:08
Wizzupmaybe this causes ofono to go nuts21:08
buZzmaybe ... i'll try to get such BT hw soonish to try21:09
Wizzupit also crackles a bit unless you set some pa latency21:10
Wizzupbut hey, the driver works enough that this just work21:12
Wizzups21:12
Wizzupso that's something :)21:12
WizzupI think I'll mostly just stick to the good ol cable21:15
buZz:D21:15
buZzi think we can get it way more reliable without much changes21:15
buZzbut, once setup, the BT speaker output at least, is rocksolid21:15
Wizzupyou hear no crackles?21:15
buZzonly when wifi is on during ;)21:15
sicelobtw, wired headphone works fine for voice calls?21:15
Wizzupright, I have wifi on21:15
Wizzupsicelo: I don't remember if I tested this fully21:16
WizzupI remember there was an issue but maybe it was solved21:16
buZzWizzup: afaik 'using wifi during BT' is some known bad thing , isnt it on wiki?21:16
Wizzupwell, maybe21:19
Wizzuptmlind: freemangordon: https://paste.villavu.com/raw/7529/ this is what caused my d4 to get real hot21:30
Wizzupthe messages repeats really, really often and causes syslog to use 100%21:31
Wizzuphuh, just happened again21:34
Wizzupbtw, others also do this: https://github.com/ev3dev/ev3dev.github.io/pull/24/files/50787e9fae767f4a8e5e1748c5bb70b40eb9f259#diff-a9f813bb4c68981de126bda83f8f678b2a0ab006ed11a137b7f0878c063de44aR4621:43
_uvos_sigh my isp's ip got banned here22:26
_uvos_again22:26
_uvos_wired call audio definatly should work22:27
_uvos_but nothing switches to it atm automaticly22:27
_uvos_i have used a bt headset extensively22:28
_uvos_never seen any issues with that22:28
_uvos_i use a bose qc3522:28
_uvos_its a pair of headhones that support the high quality audio profile, and the headset profile22:29
_uvos_works fine in both modes22:29
Wizzupwith wifi on?22:30
_uvos_i hear crackels sometimes on bt22:30
_uvos_yes22:30
_uvos_but also crackles on wired22:30
_uvos_sometimes too22:30
_uvos_this is a pa issue22:30
_uvos__using the alsa device directly is without crackles22:32
_uvos__none of the stuff you linked was nessecary at all here22:33
WizzupI don't hear them on wired I htink22:33
Wizzup_uvos__: it was for me22:34
Wizzupby default 'user' doesn't even have bt access22:34
_uvos__besides loading the right pa modules, starting bluez and modrobin the driver i dident have tondo anything22:34
Wizzupweird22:34
_uvos__right you have to do that too22:34
_uvos__but really thats it22:34
Wizzupwell pa was erroring out accessing bluez22:35
Wizzupover dbus22:35
_uvos__load-module module-bluez5-device22:35
_uvos_and load-module module-bluez5-discover22:37
_uvos_are the modules22:37
_uvos_Wizzup: wierd22:38

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